import java.io.*;
import java.util.*;
-
+import java.util.List;
import java.awt.*;
import jalview.analysis.AlignSeq;
{}).invoke(jmf));
cl.getMethod("addAnnotations", new Class[]
{ Alignment.class }).invoke(jmf, al);
- replaceMatchingSeqsWith(prot, al, AlignSeq.PEP);
+ replaceMatchingSeqsWith(seqs, annotations, prot, al, AlignSeq.PEP, false);
}
} catch (ClassNotFoundException q)
{
new Class[]
{ FileParse.class }).invoke(annotate3d, new Object[]
{ new FileParse(getDataName(), type) }));
- replaceMatchingSeqsWith(rna, al, AlignSeq.DNA);
+ replaceMatchingSeqsWith(seqs, annotations, rna, al, AlignSeq.DNA, false);
}
} catch (ClassNotFoundException x)
{
* @param ochains
* @param al
* @param dnaOrProtein
+ * @param removeOldAnnots when true, old annotation is cleared before new annotation transferred
*/
- private void replaceMatchingSeqsWith(ArrayList<SequenceI> ochains,
- AlignmentI al, String dnaOrProtein)
+ public static void replaceMatchingSeqsWith(List<SequenceI> seqs, List<AlignmentAnnotation> annotations, List<SequenceI> ochains,
+ AlignmentI al, String dnaOrProtein, boolean removeOldAnnots)
{
if (al != null && al.getHeight() > 0)
{