[Bioperl-l] Copying features

Rob Edwards redwards at utmem.edu
Sat May 10 22:21:25 EDT 2003


Is there a way to copy a feature from one sequence to another, but have the 
recipient sequence get a new feature.

For example, if you do this:

 my $newseqobj=$seqobj;
 my @feats=$seqobj->get_SeqFeatures;
 foreach my $feat (@feats) {
  $newseqobj->add_SeqFeature($feat);
 }
 my @newfeats=$newseqobj->get_SeqFeatures;
 
Then @newfeats and @feats are the same features, and if you change an 
attribute in one of the features it changes the other.

One way to do this is obviously to read all the feature tags and make a new 
feature with those tags on the new sequence, but I was wondering if this had 
already been coded and I have missed it in the docs.

Thanks

Rob


More information about the Bioperl-l mailing list