organism source of isolation and country source
2
0
Entering edit mode
8.0 years ago
mlagadodji • 0

Hello, Does anyone know how to retrieve organism source and country of isolation from NCBI or Genbank set of data with perl or python scripts?

sequence genome • 1.6k views
ADD COMMENT
1
Entering edit mode
ADD COMMENT
0
Entering edit mode
2.9 years ago

from Bio import SeqIO gb_file = "filename_of_gb.txt"

for gb_record in SeqIO.parse(open(gb_file,"r"), "genbank") : for feat in gb_record.features: if feat.type == 'source': source = gb_record.features[0] for qualifiers in source.qualifiers: if qualifiers == 'isolation_source': isolation_source = source.qualifiers['isolation_source'] C = " Name %s \t Organism %s \t isolation_source %s " % (gb_record.name,gb_record.annotations["source"],isolation_source[0]) f = open('Newfile.xls','a') print(C,file = f) f.close()

ADD COMMENT
0
Entering edit mode

Use the above python script to retrieve isolation source from the save genbank file

ADD REPLY

Login before adding your answer.

Traffic: 1979 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6