[Biopython] Bio.GenBank .Scanner ?

Ara Kooser akooser at unm.edu
Mon Oct 11 22:30:04 UTC 2010


Hello all,

   I found a partial answer to my question. I've download all the  
GenBank files for Strep. sp. AA4. I am using SeqIO to look at the  
information in the files. The documentation recommends using SeqIO. I  
am searching for the tag that will only extract:
      CDS             1..5256
                      /locus_tag="StAA4_010100030484"
                      / 
coded_by="complement(NZ_ACEV01000078.1:25146..40916)"
                      /note="COG3321 Polyketide synthase modules and  
related
                      proteins"
                      /transl_table=11
                      /db_xref="CDD:33130"

this /coded_by="complement(NZ_ACEV01000078.1:25146..40916)" line from  
the GenBank files.
The api documentation on-line discusses the parse_feature which is  
what I think I need. I am not sure the best way to pull out that one  
line. My current code is:
from Bio import SeqIO
gb_file = "sequences.gp"
for gb_record in SeqIO.parse(open(gb_file,"r"), "genbank"):
     gb_feature = gb_record.features[2]
     print gb_feature


Thank you for your time and help.
Ara






More information about the Biopython mailing list