|Don't ask to ask, just ask|
Re: Reading in Qual File Using Bio::SeqIOby biohisham (Priest)
|on Jul 01, 2010 at 22:13 UTC||Need Help??|
This qual format is similar to FastA but it has its own module interfaces at 'Bio::Seq::PrimaryQual' and Bio::SeqIO::qual, you are mixing between Bio::SeqIO and the others since Bio::SeqIO is the general wrapper for many other packages that intelligently handle many different formats each having their own peculiarities. It is still flexibly possible to interchange methods under such a generalized wrapper btw with some significant differences (read 'potential for things to go wrong!')...
However BioPerl can gift you valuable hints were you adhering to and observing the mantra of:
at the top of your program and declaring your variable accordingly, this can save you needless tail-chasing. $qual_obj->seq is better written as $qual_obj->qual
The above code's $qual_obj can still be initialized directly through Bio::SeqIO:
You can also read this file in as a FastA file since it has the '>' record identifier, however, each qual record would not be indexed in an array as is the case in the above example since reading the file as a FastA would slurp in all qual values into a single string that is treated as a protein sequence by BioPerl.
Kudos for providing examples of code and input :)...
Excellence is an Endeavor of Persistence. A Year-Old Monk :D .