[Biococoa-dev] About BCSequence (again ;-)
Charles Parnot
charles.parnot at gmail.com
Mon Jul 4 16:57:45 EDT 2005
On Jul 4, 2005, at 2:12 AM, Alexander Griekspoor wrote:
> If I understand it right, a BCSequence object than becomes "typed"
> on the basis of the BCSequenceSet it has been assigned right? Koen
> or Charles, could you do a proposal on what the BC world would look
> like if we choose this model of the general BCSequence object.
> Could you perhaps speculate/describe:
>
> 1 how you create such objects
> 2 what role sequence sets play in this
> 3 how one would be able to get its "type"
> 4 how you would do a simple reverse and what would be returned (for
> DNA and Protein)
> 5 how you would do a translation from DNA to Protein
> 6 how annotations would fit it?
Just as an exercise, I will briefly answer these questions:
1. The objects are created by the IO or by passing a string:
- the type might be guessed
- the type might be passed as argument, in which case the
default BCSymbolSet is used (with all the ambiguous symbols)
- a symbol set is passed as argument, which restrict the symbols
that can be used
2. Symbol sets (I think that is what you meant?) are used to filter
the sequence symbols. They are also used to translate from char to
BCSymbol, as a char meaning is dependent on the symbol set, e.g. can
be an alanine or an adenosine. The symbol set is the best object to
ask. For performance, we might end up having a char/BCSymbol array as
one of the ivar.
3. The type is set by an ivar. The BCSymbolSet also has a type and
has to be the same. This is the current implementation.
4. To get the reverse, you take all the chars and put them backwards.
Ah!
OK, I guess you meant 'complement'. If not DNA, return self.
Otherwise, you get the array of symbols, and ask each symbol its
complement, and then create the array of chars.
5. The current code is fine. I would however make BCCodon a subclass
of BCSymbol for consistency.
6. Annotations are independent of sequence type.
OK, we are done, let's call it version 1.0 ;-)
charles
--
Xgrid-at-Stanford
Help science move fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford
Charles Parnot
charles.parnot at gmail.com
More information about the Biococoa-dev
mailing list