[Biopython] gff3 problem
Michal
mictadlo at gmail.com
Thu Apr 7 12:54:12 UTC 2011
On 04/05/2011 11:22 PM, Brad Chapman wrote
> in_handle = open(in_file)
> for rec in GFF.parse(in_handle):
> for feature in rec.features:
> print feature.type, feature.location
> print feature.qualifiers
> for sub_feature in feature.sub_features:
> print " ", sub_feature.type, sub_feature.location
> in_handle.close()
>
> This will print out details of each feature. For instance, here is
> a gene with exon sub_features:
>
> gene [2234:3344]
> {'Note': ['Elongation factor P (EF-P) family protein n:2 Tax:Arabidopsis RepID:D7L774_ARALY'],
> 'source': ['x'], 'ID': ['BC-x.1'], 'Name': ['BC-x.1']}
> exon [2234:2279]
> exon [2422:2535]
> exon [2609:2691]
> exon [2762:2864]
> exon [2971:3049]
> exon [3125:3251]
> exon [3320:3344]
>
> Hope this helps,
> Brad
>
Thank you it works.
More information about the Biopython
mailing list