Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Feb 18, 2025
1 parent 58a9605 commit 83a8228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipes/WDL/tasks/tasks_ncbi.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -1342,12 +1342,14 @@ task genbank_special_taxa {
if any(node == 11320 for node in this_and_ancestors):
# flu A needs subtype specified in the serotype column
with open("genbank_source_overrides.json", "wt") as outf:
# This taxid matches a specific named strain
match = re.search(r'\(([^()]+)\)+$', taxdb.names[taxid])
if match:
subtype = match.group(1)
print("found Influenza A subtype {}". format(subtype))
json.dump({'serotype':subtype}, outf)
else:
# Influenza A has a number of taxids at the subtype level
match = re.search(r'(\w+)\s+subtype$', taxdb.names[taxid])
if match:
subtype = match.group(1)
Expand Down

0 comments on commit 83a8228

Please sign in to comment.