[Biojava-dev] Sequence cloning with annotations & features...

David Huen smh1008 at cam.ac.uk
Wed Mar 30 01:51:07 EST 2005


On Mar 29 2005, David Jung wrote:

> Hello.
> I was wondering if someone could suggest the best way to
> clone a Sequence (since it isn't a Cloneable).  I'd like
> to clone the raw sequence, annotations and features.
> I know how to clone the raw sequence and annotations,
> but aren't sure how to clone features, including
> all nested features recursively.
> (This is so that I can add features to the clone
> and they won't appear on the original Sequence)

If persistence of the cloned sequence is not required, I think it is 
possible to create a ViewSequence on the original. All features of the 
original are visible in the view but features added to the view are not 
visible on the original.

Regards,
David Huen



More information about the biojava-dev mailing list