[Biojava-l] New class RevCompSequence
David Waring
dwaring@u.washington.edu
Wed, 6 Mar 2002 12:28:35 -0800
I just added RevCompSequence to ...bio/seq/impl/. As you might expect it is
for reverse complementing a Sequence.
All features of the underlying sequence are reflected onto the
RevCompSequence using a ProjectedFeatureHolder.
Calling createFeature() on a RevCompSequence creates a feature on the
underlying
sequence.
Non-Stranded features will return the reverse compemented view of the
sequence when getSymbols() is called that is to say if you get what you
expect as if your RevCompSequence.
All changes in the underlying Sequence are immediatly reflected in the
RevCompSequence.
I have provided a clone() method that will create a new (SimpleSequence)
that is no longer tied to the original sequence.
I think that all sub-features are handled properly, but let me know if you
see any potential problems.
David
PS. To support this I made small changes to ProjectedFeatureHolder,
ProjectedFeature and ProjectedStrandedFeature