Skip to content

Commit

Permalink
Handle list of current HGNC IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Feb 8, 2025
1 parent a00147a commit 42bec7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/indra_cogex/analysis/gene_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ def parse_gene_list(gene_list: Iterable[str]) -> Tuple[Dict[str, str], List[str]
hgnc_ids.append(entry)
else: # probably a symbol
hgnc_id = hgnc_client.get_current_hgnc_id(entry)
if hgnc_id:
# Handle special case where an outdated symbol
# corresponds to multiple current HGNC IDs
if isinstance(hgnc_id, list):
hgnc_ids.append(hgnc_id[0])
elif hgnc_id:
hgnc_ids.append(hgnc_id)
else:
errors.append(entry)
Expand Down

0 comments on commit 42bec7a

Please sign in to comment.