X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=bb01faf572af6765cd08fd56091ded280899fe35;hb=00ffcffb372b1dc7bc4dc75a2c263f2f35570e72;hp=d8ca9a77adcf12e2088403d8fea0dc89f7f3590b;hpb=61c11ca07415db042c5ddcbbc6255e1dce3e7b2f;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index d8ca9a7..bb01faf 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -22,7 +22,7 @@ package MCview; import java.io.*; import java.util.*; - +import java.util.List; import java.awt.*; import jalview.analysis.AlignSeq; @@ -279,7 +279,7 @@ public class PDBfile extends jalview.io.AlignFile {}).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) { @@ -307,7 +307,7 @@ public class PDBfile extends jalview.io.AlignFile 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) { @@ -323,9 +323,10 @@ public class PDBfile extends jalview.io.AlignFile * @param ochains * @param al * @param dnaOrProtein + * @param removeOldAnnots when true, old annotation is cleared before new annotation transferred */ - private void replaceMatchingSeqsWith(ArrayList ochains, - AlignmentI al, String dnaOrProtein) + public static void replaceMatchingSeqsWith(List seqs, List annotations, List ochains, + AlignmentI al, String dnaOrProtein, boolean removeOldAnnots) { if (al != null && al.getHeight() > 0) {