[Bioperl-l] SeqIO: input from memory not file

Jason Stajich jason@chg.mc.duke.edu
Fri, 2 Feb 2001 15:10:47 -0500


----- Original Message -----
From: "J. Schaefer" <schaefer@u.washington.edu>
To: <bioperl-l@bioperl.org>
Sent: Friday, February 02, 2001 2:16 PM
Subject: [Bioperl-l] SeqIO: input from memory not file


> Hi-
>
> I'm just getting into bioperl and have found a limitation which I
> haven't been able navigate around.
>
> I would like to create a series of SeqIO:Seq objects directly from an
> array of sequence references.  The constructors for SeqIO:Seq only allow
> new objects to be made from files, filehandles or STDIN.
>
> I am able to make a PrimarySeq object directly from memory, but I can't
> see how to convert a PrimarySeq into a SeqIO:Seq.

It's easier than that. If you want to make a seq you would do
my $seq = new Bio::Seq(-seq => 'AAGCGAGAGAGAG',
                                            -moltype=>'dna', -id =>
'myseq1');

See the documentation for Bio::Seq (perldoc Bio::Seq)

>
> Am I just missing something?  Or should I just write a temporary file and
> slurp it in with SeqIO:Seq?
>
> Thanks for your feedback,
>
> Jonathan
>
> ---------------------------------------------------------------
> Jonathan B. Schaefer
>
> Beavo Lab University of Washington
> Box 357280, Room K363 Molecular and Cellular Biology Program
> 1959 NE Pacific St.             v:(206)221-4585
> Seattle, WA 98195-7280 f:(206)685-3822
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>