Convert HGNC ids to their symbol (#1972)

There are entries in some var indexes like HGNC:18790. We'd like to convert that to its symbol, NSG1.
This commit is contained in:
Marcus Kinsella
2020-11-06 09:27:49 -08:00
committed by GitHub
parent 39a1124c35
commit e892e64685
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -109,6 +109,9 @@ class HGNCSymbolChecker:
if record[field] is not np.nan:
for symbol in record[field].split("|"):
yield format_symbol(symbol)[0]
# Sometimes something like HGNC:1234 appears in datasets, which we
# want to fix as well.
yield record["hgnc_id"]
hgnc_records = pd.read_csv(hgnc_dataset_path, sep="\t", header=0, low_memory=False).to_dict("records")