[Bioperl-l] sequence trace data
Chad Matsalla
chad@dieselwurks.com
Thu, 19 Dec 2002 14:44:05 -0600 (CST)
On Thu, 19 Dec 2002, Robson Francisco de Souza wrote:
> Just a thought: Bio::Seq::SeqWithQuality objects aggregate a
> Bio::PrimarySeq and a Bio::Seq::PrimaryQual object. The last one holds
> the
> quality array and is-a Bio::Seq:QualI. Should there be also a
> Bio::Seq::TraceI and a Bio::Seq::PrimaryTrace object and should
> Bio::Seq::Read aggregate a Bio::PrimarySeq and a
> Bio::Seq::PrimaryTrace?
And then a SequenceWithTraceData ? Returned from SeqIO::scf.pm?
package Bio::Seq::SequenceTrace;
@ISA = qw(Bio::Seq::SeqWithQuality);
That way it can be returned from SeqIO::scf::read_seq and polymorphism
will prevent it from breaking stuff that is already out there.
The new methods in SequenceTrace will deal with things like:
# get and set the trace data for this object
$reference_to_array = $st->trace($base,\@trace_points); AAAH! Overloading...
# get a subtrace
$reference_to_array = $st->subtrace($base,$start,$end);
# synthesize a false trace
$reference_to_array = $st->false_trace("a",Bio::Seq, $accuracy);
Any objections or comments?
> I must confess that I don't like this path. What about adding a
> general holder for base-associated data, able to associate even
> several
> values to each base in a sequence? I mean, tomorrow we may need to
> annotate another data for all o almost all sequences in a huge
> sequence
> and Bio::SeqFeatures will not be pratical for this task. We could have
> a
> simple interface for sequence objects which can associate arrays of
> values
> to intervals in a sequence... ooops! Isn't this a feature tag? Well, I
> don't think so... but the ideia is just that: a set of methods to
> associate arrays of values to intervals in sequences and, even better,
> features. This general interface could be built in a way that
> Bio::Seq::PrimaryQual and Bio::Seq::Read could inherit from it.
I think that a trace is a special case because it has a lot of data that
is not necessarily associated with a base or a base-call- it is the
stuff _inbewteen_.
> > Bio::Seq::SeqWithQualityI should probably inheriet from
> > Bio::PrimarySeqI
I was not planning to have an interface for this- I view it as an
implementor of interfaces. Do you think that SequenceWithTrace data
should inherit from it though? Because really SequenceWithTrace is an
extension of SequenceWithQuality (in the real world, whatever _that_
is).
Chad Matsalla