[Bioperl-l] SeqIO: input from memory not file
Ewan Birney
birney@ebi.ac.uk
Fri, 2 Feb 2001 20:15:20 +0000 (GMT)
On Fri, 2 Feb 2001, Hilmar Lapp wrote:
> "J. Schaefer" wrote:
> >
> > 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.
> >
> > Am I just missing something? Or should I just write a temporary file and
> > slurp it in with SeqIO:Seq?
> >
>
No. I think you are looking for the Bio::Seq constructor, like
$seq = Bio::Seq->new( -seq=> 'ATGGGGTGGGTTTATGGGG' , -id => 'id');
right?
If you have a file as an array of lines from a file there is a perl module
to make it "look like" a file... (? IO::String....?)
> I'm not sure I understand your question. There is no SeqIO::Seq class.
> Would you like to emulate a sequence stream (Bio::SeqIO compliant
> object) from an array of sequence objects? If so, is there a
> particular reason that you can't pass on the array of seq objects to
> the method which would otherwise receive the sequence stream?
>
> Hilmar
> --
> -------------------------------------------------------------
> Hilmar Lapp email: lapp@gnf.org
> GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
> -------------------------------------------------------------
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>.
-----------------------------------------------------------------