[Bioperl-l] Write features in a gbk
Hilmar Lapp
hlapp at drycafe.net
Thu Mar 6 04:05:25 UTC 2014
Bio::SeqIO->new() creates a Bio::SeqIO object, not a Bio::Seq object.
Bio::SeqIO is for writing (or reading) sequence objects to/from a file.
If you want to add a feature object to a sequence object, create the
sequence object.
-hilmar
On Wed, Mar 5, 2014 at 8:36 PM, Antony03 <antony.vincent.1 at ulaval.ca> wrote:
> Hi,
>
> I want to write some features to generate a new gbk file. I try like this:
> #!/usr/bin/perl
>
>
>
> use Bio::Seq;
> use Bio::SeqIO;
> use Bio::SeqFeature::Generic;
>
>
> $feat = new Bio::SeqFeature::Generic(-start => 40,
> -end => 80,
> -strand => 1,
> -primary => 'exon',
> -source => 'internal' );
>
> $seqobj = Bio::SeqIO->new(-file => '>test.gbk', -format => 'genbank');
> $seqobj->add_SeqFeature($feat); # Add the SeqFeature to the Seq object
>
> But I got this error:
> Can't locate object method "add_SeqFeature" via package
> "Bio::SeqIO::genbank" at ./annotation.pl line 17.
>
> Thank!
>
>
>
>
>
> --
> View this message in context:
> http://bioperl.996286.n3.nabble.com/Write-features-in-a-gbk-tp17342.html
> Sent from the Bioperl-L mailing list archive at Nabble.com.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
--
Hilmar Lapp -:- lappland.io
More information about the Bioperl-l
mailing list