Created
April 15, 2017 08:48
-
-
Save coela/5fccaa19c891e24e9b58877751a164eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from Bio import SeqIO | |
fh = open(sys.argv[1],"r") | |
for gb_record in SeqIO.parse(fh, "genbank") : | |
for (index, feature) in enumerate(gb_record.features) : | |
if feature.type == 'source': | |
print "\t".join([gb_record.name,feature.qualifiers['db_xref'][0].split(":")[1]]) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment