Skip to content

Commit 4dd6901

Browse files
committed
more flu fixes
1 parent 65bd350 commit 4dd6901

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pipes/WDL/tasks/tasks_ncbi.wdl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,11 @@ task biosample_to_genbank {
887887
### Influenza-specific isolate naming was handled above already and is required to be metadata-free
888888
# FTP submission pathway requires us to do the naming via the strain field
889889
type = outrow['organism'].split()[1] # A, B, C, D, etc
890-
state = outrow['geo_loc_name'].split(':')[1] if ':' in outrow['geo_loc_name'] else outrow['geo_loc_name']
890+
state = outrow['geo_loc_name'].split(':')[1].strip() if ':' in outrow['geo_loc_name'] else outrow['geo_loc_name']
891891
year = outrow['collection_date'].split('-')[0]
892892
outrow['strain'] = '/'.join([type, state, outrow['isolate'], year])
893+
if type == 'A':
894+
outrow['strain'] = '{}({})'.format(outrow['strain'], outrow['serotype'])
893895
print("new strain name: {}".format(outrow['strain']))
894896
elif outrow['organism'].startswith('Special taxon with special naming rules'):
895897
### Example special case here

0 commit comments

Comments
 (0)