[Bioperl-l] Question: creating an empty Bio::Seq object
Hilmar Lapp
hlapp@gnf.org
Mon, 2 Dec 2002 08:46:57 -0800
It should work the way you do it, but only 1.1.1 and later. Which version are you using?
-hilmar
> -----Original Message-----
> From: Scott Cain [mailto:cain@cshl.org]
> Sent: Monday, December 02, 2002 7:49 AM
> To: bioperl-l@bioperl.org
> Subject: [Bioperl-l] Question: creating an empty Bio::Seq object
>
>
> Hello all,
>
> I have a relatively simple question. I want to create a
> Bio::Seq object
> before I have the actual DNA sequence, but when I do know the
> length, so
> I would like to do something like this:
>
> my $bioseq = Bio::Seq->new ( -alphabet => 'dna'
> -accession_number => $name ,
> -length =>
> $$hash_ref{'seqlen'});
>
> however, this doesn't appear to work. Amusingly, if I do
> this and then
> do $bioseq->length, it answers with '9', since the test
> accession number
> I am using is 9 characters long (at least I assume that is where the 9
> is coming from). So, is there a way to construct a Bio::Seq
> and give it
> a length without actually having a DNA sequence?
>
> Thanks,
> Scott
>
>
> --
> --------------------------------------------------------------
> ----------
> Scott Cain, Ph. D.
> cain@cshl.org
> GMOD Coordinator (http://www.gmod.org/)
> 216-392-3087
> Cold Spring Harbor Laboratory
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>