Skip to content

Commit

Permalink
use raw name when no binomial nomenclature is found
Browse files Browse the repository at this point in the history
  • Loading branch information
wdingx committed Mar 16, 2018
1 parent f634deb commit 5cbd58d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/sf_extract_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ def organism_format(raw_data):
""""""
#Pseudomonas putida ND6
#[Pseudomonas syringae] pv. tomato str. DC3000
new_tag=raw_data.replace('[','').replace(']','').split(' ')[:2]
new_tag=new_tag[0][:1]+'.'+new_tag[1]
new_tag=raw_data
if ' ' in raw_data: #Binomial nomenclature
new_tag=raw_data.replace('[','').replace(']','').split(' ')[:2]
new_tag=new_tag[0][:1]+'.'+new_tag[1]
return new_tag
from Bio import SeqIO
with open('%s%s'%(path,'metainfo.tsv'), 'wb') as writeseq:
Expand Down

0 comments on commit 5cbd58d

Please sign in to comment.