/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
+import jalview.util.MessageManager;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.WsParamSetI;
rslt = aaservice.customAnalize(seqs, getJabaArguments());
} catch (WrongParameterException x)
{
- throw new JobSubmissionException(
- "Invalid parameter set. Check Jalview implementation.", x);
+ throw new JobSubmissionException(MessageManager.getString(
+ "exception.jobsubmission_invalid_params_set"), x);
}
}
List<AlignmentAnnotation> ourAnnot, String typeName,
String calcId, SequenceI dseq, int base, Score scr)
{
- System.out.println("Creating annotation on dseq:" + dseq.getStart()
- + " base is " + base + " and length=" + dseq.getLength()
- + " == " + scr.getScores().size());
+ jalview.bin.Console.outPrintln("Creating annotation on dseq:"
+ + dseq.getStart() + " base is " + base + " and length="
+ + dseq.getLength() + " == " + scr.getScores().size());
// AlignmentAnnotation annotation = new AlignmentAnnotation(
// scr.getMethod(), typeName, new Annotation[]
// {}, 0, -1, AlignmentAnnotation.LINE_GRAPH);
return annotation;
}
+ protected void replaceAnnotationOnAlignmentWith(
+ AlignmentAnnotation newAnnot, String typeName, String calcId,
+ SequenceI aSeq)
+ {
+ SequenceI dsseq = aSeq.getDatasetSequence();
+ while (dsseq.getDatasetSequence() != null)
+ {
+ dsseq = dsseq.getDatasetSequence();
+ }
+ // look for same annotation on dataset and lift this one over
+ List<AlignmentAnnotation> dsan = dsseq.getAlignmentAnnotations(calcId,
+ typeName);
+ if (dsan != null && dsan.size() > 0)
+ {
+ for (AlignmentAnnotation dssan : dsan)
+ {
+ dsseq.removeAlignmentAnnotation(dssan);
+ }
+ }
+ AlignmentAnnotation dssan = new AlignmentAnnotation(newAnnot);
+ dsseq.addAlignmentAnnotation(dssan);
+ dssan.adjustForAlignment();
+ }
+
private void constructAnnotationFromScore(AlignmentAnnotation annotation,
int base, int alWidth, Score scr)
{