[Bioperl-l] RE: :SeqIO HOWTO

Brian Osborne brian_osborne at cognia.com
Thu Nov 3 13:32:31 EST 2005


That was a beautiful answer.

You should write some HOWTOs!

Brian O.

On 11/3/05 11:52 AM, "Barry Moore" <bmoore at genetics.utah.edu> wrote:

> Li-
> If I understand you question correctly, you are asking if the variable
> that contains the sequence(s) ($inseq in your script) from you sequence
> file is a string (called a scalar in perl) as opposed to an array.  The
> answer is "neither".  The variable $inseq is a hash based Bio::SeqIO
> object that holds the details for reading sequences from your sequence
> file.  One of the methods associated with that object is next_seq which
> returns then next sequence in you file. Actually it returns another hash
> based object - a Bio::Seq object which contains all the details about
> the next sequence in the file.  That Bio::Seq object has a number of
> methods associated with it which allow you to retrieve details like
> display id and sequence.  So while $inseq is neither a scalar nor an
> array, in terms of what it can do, it would be better to think of it in
> terms of an array because it can read a file with many sequences in it,
> and you can step through those sequences with next_seq like you would
> step through the elements in an array with a for each loop.  Hope I
> answered the correct question.
> Barry
> P.S.  Try to remember to reply-all so that your questions go to the
> list, and not only to me.  That way others can contribute to the
> discussion as well.
>> -----Original Message-----
>> From: chen li [mailto:chen_li3 at yahoo.com]
>> Sent: Thursday, November 03, 2005 2:05 AM
>> To: Barry Moore
>> Subject: Bio::SeqIO HOWTO
>> Dear Dr. Moore,
>> Thank you very much.
>> You are right. The script works correctly only if the
>> input is in genbank format but not the fasta format.
>> One more question: I guess the read-in sequence is a
>> string but not an array, am I right?
>> Li
>> __________________________________
>> Yahoo! FareChase: Search multiple travel sites in one click.
>> http://farechase.yahoo.com
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list