[Bioperl-l] .qual are like fasta files

Heikki Lehvaslaiho heikki@ebi.ac.uk
Tue, 07 Aug 2001 09:22:31 +0100


Ewan Birney wrote:
> 
> Chad -
> 
> All this sounds great! Good stuff!
> 
> i think the deliberate copying of PrimarySeq to PrimaryQual is fine. I
> would put it in
> 
> Bio::Seq::PrimaryQual
> 
> so we don't mess up Bio::  namespace (despite the fact that
> Bio::PrimarySeq is there).
> 
> there is an argument that although PrimaryQual should basically look like
> a copy and paste, it should in fact use
> 
>   $obj->qual() # equivalent to ->seq, returns an array of numbers
> 
> and
> 
>   $obj->subqual(10,20) # equivalent to ->subseq
> 
> as it is not really a sequence and we will mislead people less.

Similarly, IO should not use Bio::SeqIO directly but inherit from it:
Bio::Seq::QualIO. I've done it for Bio::Variation::IO, make a copy of
it.  

(It would be so nice to move all implementing modules from Bio::
namespace and leave only generic Bio::IOI from which Bio::Seq::IO and
other modules could inherit. Unfortunately that would break all
existing programs... ;-( )


> I suspect inherieting from Bio::PrimarySeqI is probably a bad idea. open
> quesiton what one does with trunc. translate is not possible ;)
> 
> We really need a Bio::IdentifiableI interface that it could inheriet for
> the identifier set.

I agree. Let's put in Bio::IdentifiableI. Then Chad does not have to
nor inherit from Bio::PrimarySeqI nor duplicate code. 


> After than I would make a
> 
> Bio::Seq::SeqWithQuality
> 
> which would inheriet from Bio::Seq (hence have a Bio::PrimarySeq and
> all the other goodies) but have in addition a Bio::Seq::PrimaryQual, and
> give access to the quality values in many places.
> 
> (ewan spots a rather annoying memory circle there and somewhat curses his
> luck. - to do with Bio::SeqFeatureI->entire_seq giving back a
> Bio::PrimarySeq but ideal in this case you would want access to the
> Qual values as well but then if it pointed to the parent you would
> end up with a cycle. hmmmmm)

entire_seq() is not pat of the interface. It is only in
Bio::SeqFeature::Generic.

> Bio::SeqIO::phred  could then make a Bio::Seq::SeqWithQuality object
> 
> What do other people think?


Sounds good. 

	-Heikki

> -----------------------------------------------------------------
> Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> <birney@ebi.ac.uk>.
> -----------------------------------------------------------------
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________