[Bioperl-l] Multiple tags of same name in a Bio::SeqFeature::Generic object

Jason Stajich jason.stajich at duke.edu
Fri Nov 4 10:05:39 EST 2005


I think you need to do it in multiple steps per value.  The 1.5.1  
code will accept an array of values but I suspect that 1.4.0 only  
accepted one at a time

Does this work for you?
$feature->add_tag_value('db_xref', "InterPro:IPR001957");
$feature->add_tag_value('db_xref', "EMBL:AC123456");

On Nov 4, 2005, at 8:42 AM, Govind Chandra wrote:

> Hi,
>
> I wish to assign multiple tags of the same name in a
> Bio::SeqFeature::Generic object. What I am doing below does not  
> work. I
> did not expect it to. What I get is:
>
> FT                   /db_xref="InterPro:IPR001957"
>
> If I pass a reference to an array to a single db_xref tag, that  
> does not
> work either. I get:
>
> FT                   /db_xref="ARRAY(0x841da94)"
>
> If I pick up a feature from an embl file (rather than build my own)
> which has multiple db_xref tags and add it to my sequence using
> add_SeqFeature I do get multiple db_xref tags in the output. So I
> conclude that I am not building the Bio::SeqFeature::Generic object
> right.
>
> Could someone help me with this please. I am using BioPerl 1.4.0.
>
> Thanks
>
> Govind
>
> Govind Chandra
> Microbiology
> John Innes Centre
> Norwich UK.
>
>
>
> ### begin script ###
> use Bio::SeqIO;
> use Bio::Seq;
> use Bio::SeqFeature::Generic;
>
> $seq="agaagcgcaccgcacccgcgagcgccttcgccgcgggccctttcg";
>
> $seqout=Bio::SeqIO->new('-fh' => \*STDOUT, '-format' => 'embl');
>
> $seqobj=Bio::Seq->new('-seq' => $seq);
>
> #@xrefs=("GOA:Q8FUL7","HSSP:1J1V","InterPro:IPR001957");
>
> $feature=Bio::SeqFeature::Generic->new(-start => 10,
>                        -end => 20,
>                        -strand => 1,
>                        -primary => 'RBS',
>                        -tag => {
> #                        db_xref=> \@xrefs
>                         db_xref => "GOA:Q8FUL7",
>                         db_xref => "HSSP:1J1V",
>                         db_xref => "InterPro:IPR001957"
>                            }
>                       );
> $seqobj->add_SeqFeature($feature);
> $seqout->write_seq($seqobj);
>
> ### end script ###
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12




More information about the Bioperl-l mailing list