[Biojava-dev] Changes to Sequence in BioJava3
George Waldon
gwaldon at geneinfinity.org
Wed Nov 3 16:28:05 UTC 2010
Andy:
I think you should have the 3 methods getInverse(), getReverse() and getReverseComplement() and return either null or an exception when there is nothing that supports a method physically. Inverse and complement are often used when you manipulate nucleotide sequences as text for example and reverse-complement nucleotide sequences are used all the time. I know less fort peptides but I have seen retro-inverted sequences.
- George
On Wed, Nov 3, 2010 at 8:42 AM, Andy Yates <ayates at ebi.ac.uk> wrote:
Hi George,
The reason why the method name was called reverse() was to do "the right thing" when it came to a reverse of a Sequence. If the compound set supported complementing (as in DNA) then the right thing to get the reverse strand would be to return CGCA. If the method was called getReverseComplement() then what would that mean for those Sequences (peptides) which never had a complementing compound? The method has to apply to all levels of the Sequence interface for it to make sense.
If people can suggest a better name ( opposingStrand() would be on the right tracks) to indicate this state i.e.
DNA -> TGCG.opposingStrand() -> CGCA
PEP -> MVKV.opposingStrand() -> VKVM
Regards,
More information about the biojava-dev
mailing list