You'll get better help on the Bioperl mailing list and website.

Bio::SeqIO next_seq returns Bio::Seq objects. Follow the SYNOPSIS and you can't go wrong.

my $seqio = Bio::SeqIO->new(-format => $seqformat, -file =>$filename); while( my $seq = $seqio->next_seq ) { print "seq name is ", $seq->display_id, " desc is ", $seq->description(), "\n"; print "sequence is ", $seq->seq(), "\n"; }
You can do magic stuff if you want to treat it like a filehandle too (although I doubt this is what you were trying to do)
my $fh = Bio::SeqIO->newFh(-format =>$seqformat, -file =>$filename); while(<$fh>) { my $seq = $_; # do as before }
You can also process filehandles (all XXIO modules in Bioperl support this if the inherit from Bio::Root::IO). Usefile if you are pipine output from a program with your script and want to capture the stream and make it Bio::Seq objects.
my $fh; open($fh, "cat seqfile |") ||die $!; my $seqio = Bio::SeqIO->new(-format => $seqformat, -fh => $fh); # OR retrieve a sequence from the blast formatted db 'nt' # by GI number open(IN, "fastacmd -d nt -s 3264957 |") ||die $!; my $seqio = Bio::SeqIO->new(-format => 'fasta',-fh => \*IN); while( my $seq = $seqio->next_seq ) { #and so forth.... }

In reply to Re: Not sure about Bio::SeqIO by stajich
in thread Not sure about Bio::SeqIO by MonkPaul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.