[Biojava-l] New class RevCompSequence

David Waring dwaring@u.washington.edu
Wed, 6 Mar 2002 14:46:15 -0800


> This looks really nice, one question. Is there a way to find out what a
> location on a revComp sequence would be on the 'normal' sequence?
>
> Ie if something is at base 12 on the revcomp sequence what is it on the
> 'normal sequence'
>
> Mark
>

I've added the method getRCLocation().

Another note:
I decided that containsFeature() should return true for a feature on the
RevCompSeq or the underlying Sequence.

So

  for all Features returned by origSeq.features()
	RevSeq.containsFeature() returns true;
and

  for all Features returned by RevSeq.features()
	RevSeq.containsFeature() returns true;

but of course

  for all Features returned by RevSeq.features()
	origSeq.containsFeature() returns false;

since origSeq knows nothing about the projected features. This may seem
confusing but I think it makes sense that when you create a new RevCompSeq
it looks like it 'contains' all the features of the original. Any
complaints?




>
> > -----Original Message-----
> > From: David Waring [mailto:dwaring@u.washington.edu]
> > Sent: Thursday, 7 March 2002 9:29 a.m.
> > To: biojava
> > Subject: [Biojava-l] New class RevCompSequence
> >
> >
> > 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
> >
> > _______________________________________________
> > Biojava-l mailing list  -  Biojava-l@biojava.org
> > http://biojava.org/mailman/listinfo/biojava-l
> >
> =======================================================================
> Attention: The information contained in this message and/or attachments
> from AgResearch Limited is intended only for the persons or entities
> to which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipients is prohibited by AgResearch
> Limited. If you have received this message in error, please notify the
> sender immediately.
> =======================================================================
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l