: seq(new SeqSpan(o->seq)),
header(o->header),
species(o->species),
- annotation_list(o->annotation_list),
+ annotation_list(new SeqSpanRefList),
motif_list(o->motif_list)
{
+ // copy over the annotations in the other sequence ref,
+ // attaching them to our current sequence ref
+ for(SeqSpanRefList::const_iterator annot_i = o->annotation_list->begin();
+ annot_i != o->annotation_list->end();
+ ++annot_i)
+ {
+ size_type annot_begin= (*annot_i)->start();
+ size_type annot_count = (*annot_i)->size();
+
+ SeqSpanRef new_annot(seq->subseq(annot_begin, annot_count));
+ new_annot->setAnnotations((*annot_i)->annotations());
+ annotation_list->push_back(new_annot);
+ }
}
Sequence::Sequence(const SeqSpanRef& seq_ref)
} else {
annot_end = count;
}
-
- SeqSpanRef new_annot(seq->subseq(annot_begin, annot_end));
+ SeqSpanRef new_annot(new_seq.seq->subseq(annot_begin, annot_end));
new_annot->setAnnotations((*annot_i)->annotations());
new_seq.annotation_list->push_back(new_annot);
}