From: amwaterhouse Date: Tue, 29 Aug 2006 15:24:22 +0000 (+0000) Subject: createMapping alreadyMapped X-Git-Tag: Release_2_1_1~29 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=51eebe77f74dda2f4ff336dfe0fea0ed68b86e5b;p=jalview.git createMapping alreadyMapped --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 8cf676d..e65f37d 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1089,7 +1089,7 @@ public class Jalview2XML if(an[i].getSequenceRef()!=null) { jaa.createSequenceMapping( - al.findName(an[i].getSequenceRef()), 1 + al.findName(an[i].getSequenceRef()), 1, true ); al.findName(an[i].getSequenceRef()).addAlignmentAnnotation(jaa); } diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index d004c1a..08b5862 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -287,7 +287,7 @@ public class AnnotationFile if(refSeq!=null) { - annotation.createSequenceMapping(refSeq, refSeqIndex); + annotation.createSequenceMapping(refSeq, refSeqIndex, false); refSeq.addAlignmentAnnotation(annotation); } diff --git a/src/jalview/io/JnetAnnotationMaker.java b/src/jalview/io/JnetAnnotationMaker.java index 862b578..60fb601 100755 --- a/src/jalview/io/JnetAnnotationMaker.java +++ b/src/jalview/io/JnetAnnotationMaker.java @@ -18,11 +18,6 @@ */package jalview.io; import jalview.datamodel.*; -import java.net.URL; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.FileReader; - public class JnetAnnotationMaker { @@ -57,6 +52,11 @@ public class JnetAnnotationMaker AlignmentAnnotation annot; Annotation[] annotations = null; + int existingAnnotations = 0; + if(al.getAlignmentAnnotation()!=null) + existingAnnotations = al.getAlignmentAnnotation().length; + + while (i < preds.length) { String id = preds[i].getName().toUpperCase(); @@ -111,11 +111,14 @@ public class JnetAnnotationMaker if (seqRef != null) { - annot.createSequenceMapping(seqRef, 0); + annot.createSequenceMapping(seqRef, 1, false); seqRef.addAlignmentAnnotation(annot); } al.addAnnotation(annot); + al.setAnnotationIndex(annot, + al.getAlignmentAnnotation(). + length - existingAnnotations - 1); if (noMsa) {