[Bioperl-l] Announce: Bio::Seq::Quality

Marc Logghe Marc.Logghe at devgen.com
Thu Jul 14 11:54:10 EDT 2005

> The way I wrote Bio::Seq::Meta modules is that you can set 
> meta sets and sequence completely independently and 
> everything is stored within the object, but only that part of 
> the meta arrays are rerurned that have residues.
> I tried this out now and realised that it does not work for 
> padding the quality values:
> e.g. 
> $s = new Bio::Seq::Quality(-qual=> "6 6 7") $s->qual(); # 
> returns [] $s->qual_text(); # returns ''
> $s->seq(atcg);
> $qual_text(); # should return '6 6 7 0' but returns '6 6 7';

Ah, I see. The length checking + padding is only triggerd when one calls

> I have to tweak the code now. So, what do you think? Is the 
> automatic padding a good or bad thing? Should I get rid of it 
> or make sure it works as I planned? 

Personally I'd use that optionally by setting/resetting a padding flag
or something. I'd more be interested in having a way to validate your
Bio::Seq::Quality one way or another. In de case padding is switched
off, I'd like to know whether my sequence length is exactly the same as
my quality array. Does that make sense ?
Thing is, I am currently struggling with the Bio::Assembly* module
because we've noticed that the contig sequence object may contain gaps
and as a consequence is larger than the quality object that can be
extracted from the ace file produced by cap3. I'd like to include into
Bio::Assembly::IO::ace the feature that a Bio::Seq::Quality is created
*including* the cleaned contig sequence (gaps removed). In that process
it would be very usefull to have a way to check for inconsistencies. Not
sure however what to do when an inconsistency is actually occuring:
throw an exception, a warning, trash the contig or keep it, ???

> In other words, do you think it is better to let users make 
> their own mistakes and offer ways to check for 
> inconsistencies, or offer a "padded" fool proof system? (If 
> this fool gets it right in the first place.)

In conclusion I'd opt for a inconsistency check and an optional padding


More information about the Bioperl-l mailing list