Skip to content

Commit

Permalink
Merge pull request #154 from eastgenomics/fix_hgmd_url
Browse files Browse the repository at this point in the history
Fix HGMD URLs (#154)
  • Loading branch information
Yu-jinKim authored Jul 17, 2023
2 parents 6cdb0e9 + 756c8e1 commit 4b914db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/home/dnanexus/generate_workbook/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ def build(self, column, value, build) -> str:
url = None

# partially match against column names and add appropriate hyperlink
# for clinvar and hgmd, only match where the column will be named
# with CSQ_ (i.e. CSQ_HGMD) prefix and not capture other columns such
# as CSQ_HGMD_CLASS which do not need linking and would not
# build a valid URL
if 'gnomad' in column.lower():
url = self.gnomad(value, build)
elif 'cosmic' in column.lower():
Expand All @@ -189,7 +193,7 @@ def build(self, column, value, build) -> str:
value[column] = url.split('=')[1]
elif column.lower().endswith('clinvar'):
url = self.clinvar(value[column])
elif 'hgmd' in column.lower():
elif column.lower().endswith('hgmd'):
url = self.hgmd(value[column])

# below will be exact matches as columns are from --additional_columns
Expand Down

0 comments on commit 4b914db

Please sign in to comment.