al[i] = new Annotation(new Annotation("" + sq.getCharAt(i), "",
(char) 0, sq.findPosition(i)));
}
- AlignmentAnnotation alan = new AlignmentAnnotation("For "
- + sq.getName(), "Fake alignment annot", al);
+ AlignmentAnnotation alan = new AlignmentAnnotation(
+ "For " + sq.getName(), "Fake alignment annot", al);
// create a sequence mapping for the annotation vector in its current state
alan.createSequenceMapping(sq, sq.getStart(), false);
alan.setProperty("CreatedBy", "createAnnotation");
{
if (ala.annotations[p] != null)
{
- assertEquals("Mismatch at position " + p
- + " between annotation position value and sequence"
- + ala.annotations[p], (int) ala.annotations[p].value,
+ assertEquals(
+ "Mismatch at position " + p
+ + " between annotation position value and sequence"
+ + ala.annotations[p],
+ (int) ala.annotations[p].value,
ala.sequenceRef.findPosition(p));
}
}
alSeq2.setStart(sqTo.getStart() + align.getSeq2Start() - 1);
alSeq2.setEnd(sqTo.getStart() + align.getSeq2End() - 1);
alSeq2.setDatasetSequence(sqTo);
- System.out.println(new AppletFormatAdapter()
-.formatSequences(
- FileFormat.Stockholm, new Alignment(new SequenceI[] { sqFrom,
- alSeq1, sqTo, alSeq2 }), true));
+ System.out.println(new AppletFormatAdapter().formatSequences(
+ FileFormat.Stockholm, new Alignment(new SequenceI[]
+ { sqFrom, alSeq1, sqTo, alSeq2 }), true));
Mapping mp = align.getMappingFromS1(false);
AlignmentI all = new Alignment(new SequenceI[] { alSeq1, alSeq2 });
all.addAnnotation(almap1);
all.addAnnotation(almap2);
- System.out.println(new AppletFormatAdapter().formatSequences(
- FileFormat.Stockholm,
- all, true));
+ System.out.println(new AppletFormatAdapter()
+ .formatSequences(FileFormat.Stockholm, all, true));
for (int p = 0; p < alSeq1.getLength(); p++)
{
"Mismatch on Original To and transferred annotation on 1",
(orig1 != null) ? orig1.toString() : null,
(trans1 != null) ? trans1.toString() : null);
- String alm1 = ""
- + (almap1.annotations.length > p ? almap1.annotations[p].displayCharacter
- : "Out of range");
- String alm2 = ""
- + (almap2.annotations.length > p ? almap2.annotations[p].displayCharacter
- : "Out of range");
+ String alm1 = "" + (almap1.annotations.length > p
+ ? almap1.annotations[p].displayCharacter
+ : "Out of range");
+ String alm2 = "" + (almap2.annotations.length > p
+ ? almap2.annotations[p].displayCharacter
+ : "Out of range");
assertEquals("Position " + p + " " + alm1 + " " + alm2, alm1, alm2);
}
}
Assert.assertFalse(ann.isQuantitative(),
"Empty annotation set should not be quantitative.");
- ann = new AlignmentAnnotation("an", "some an", new Annotation[] {
- newAnnotation("4"), newAnnotation("1"), newAnnotation("1"),
- newAnnotation("0.1"), newAnnotation("0.3") });
+ ann = new AlignmentAnnotation("an", "some an",
+ new Annotation[]
+ { newAnnotation("4"), newAnnotation("1"), newAnnotation("1"),
+ newAnnotation("0.1"), newAnnotation("0.3") });
Assert.assertTrue(ann.isQuantitative(),
"All numbers annotation set should be quantitative.");
- ann = new AlignmentAnnotation("an", "some an", new Annotation[] {
- newAnnotation("E"), newAnnotation("E"), newAnnotation("E"),
- newAnnotation("E"), newAnnotation("E") });
+ ann = new AlignmentAnnotation("an", "some an",
+ new Annotation[]
+ { newAnnotation("E"), newAnnotation("E"), newAnnotation("E"),
+ newAnnotation("E"), newAnnotation("E") });
Assert.assertFalse(ann.isQuantitative(),
"All 'E' annotation set should not be quantitative.");
- ann = new AlignmentAnnotation("an", "some an", new Annotation[] {
- newAnnotation("E"), newAnnotation("1"), newAnnotation("2"),
- newAnnotation("3"), newAnnotation("E") });
+ ann = new AlignmentAnnotation("an", "some an",
+ new Annotation[]
+ { newAnnotation("E"), newAnnotation("1"), newAnnotation("2"),
+ newAnnotation("3"), newAnnotation("E") });
Assert.assertTrue(ann.isQuantitative(),
"Mixed 'E' annotation set should be quantitative.");
}