You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fdog/libs/addtaxon.py
+7-5
Original file line number
Diff line number
Diff line change
@@ -158,14 +158,16 @@ def create_genome(args):
158
158
iflen(id_dict) >0:
159
159
mapping_file='%s.mapping'%genome_file
160
160
withopen(mapping_file, 'w') asmp:
161
-
foro,ninid_dict.items():
162
-
mp.write('%s\t%s\n'% (o,n))
161
+
foridinin_seq:
162
+
ifidinid_dict:
163
+
mp.write(f'{id}\t{id_dict[id]}\n')
164
+
else:
165
+
mp.write(f'{id}\t{id}\n')
163
166
ifpipe==1:
164
167
print('\033[94mWARNING: Sequence IDs contain pipe(s). They will be replaced by "_"!\033[0m')
165
168
iflong_id=='yes':
166
-
print('\033[94mWARNING: Some headers longer than 80 characters have been automatically shortened. Please check the %s.mapping file for details!\033[0m'%genome_file)
167
-
ifpipe==1:
168
-
print('\033[94mWARNING: Please check the %s file for details!\033[0m'%mapping_file)
169
+
print('\033[94mWARNING: Some headers longer than 80 characters have been automatically shortened.\033[0m')
170
+
print('\033[94mPlease check the %s file for details!\033[0m'%mapping_file)
0 commit comments