Bioperl: Creating a SeqIO object
Aaron J Mackey
ajm6q@virginia.edu
Fri, 26 May 2000 16:19:40 -0400 (EDT)
I think you might want to do something like this, using IO::Scalar to turn
your string into a pseudo-filehandle:
$seqs = param('seqs'); # grab your CGI form variable.
$fh = new IO::Scalar \$seqs;
$in = new Bio::SeqIO -fh => $fh, -format => 'Fasta';
while($seq = $in->next_seq()) {
# do stuff with each $seq.
}
-Aaron
On Fri, 26 May 2000, gert thijs wrote:
> Hello,
>
> I hope this is not a stupid question, but I still haven't captured all the
> gory details of perl yet.
> I am developping a web interface where one can enter some DNA sequences that
> will be processed. Those DNA sequences should be in Fasta format. When I read
> the inputs of the web interface the sequences are stored as one long string in
> a variable $dnaseq. Now I am first writing this string to a file and then I
> use the filehandle to read the sequences into a new SeqIO object.
> But I was wondering if I can do this without writing $dnaseq to a file.
>
> tnx,
> Gert Thijs
>
>
--
o ~ ~ ~ ~ ~ ~ o
/ Aaron J Mackey \
\ Dr. Pearson Laboratory /
\ University of Virginia \
/ (804) 924-2821 \
\ amackey@virginia.edu /
o ~ ~ ~ ~ ~ ~ o
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================