[Bioperl-l] Extracting sequences from Genbank files

Roy Chaudhuri roy.chaudhuri at gmail.com
Thu May 24 06:49:08 EDT 2012


Isn't it "get_tag_values" not "each_tag_value"? Maybe you are using an 
old version, in which case you should probably upgrade to the most 
recent BioPerl (1.6.901). You could also look at "get_tagset_values", 
which does not throw an error if the tag is not present, so saves having 
to call has_tag.

Cheers,
Roy.

On 24/05/2012 11:27, Brian Forde wrote:
> Hello,
>
> I have been modifying a script which extracts all the protein sequences
> from a genbank file and saves them in a multi-fasta file.
>
> I wish the fasta header to have both the locus_tag of the protein and the
> product. However I cannot get the  product tag to write to the fasta header
>
> this is the relevant section of the script
>
>   $s->display_id($f->has_tag('locus_tag') ? join(',',sort
> $f->each_tag_value('locus_tag')) :
>                             $f->has_tag('product') ?
> join(',',$f->each_tag_value('product')):
>                             $s->display_id);
>
> is "product" not an actual tag
>
> regards
>
> Brian
>
>
>




More information about the Bioperl-l mailing list