SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
StringBuilder sb = new StringBuilder();
sb.append("123456");
SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
StringBuilder sb = new StringBuilder();
sb.append("123456");
- SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1, 3,
- 1.2f, "group");
+ SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1,
+ 3, 1.2f, "group");
// residuePos == 2 does not match start or end of feature, nothing done:
sar.appendFeature(sb, 2, null, sf, null, 0);
assertEquals("123456", sb.toString());
// residuePos == 2 does not match start or end of feature, nothing done:
sar.appendFeature(sb, 2, null, sf, null, 0);
assertEquals("123456", sb.toString());
// feature score is not included
sar.appendFeature(sb, 1, null, sf, null, 0);
assertEquals("123456disulfide bond 1:3", sb.toString());
// residuePos == 3 matches end of feature, text appended
// feature score is not included
sar.appendFeature(sb, 1, null, sf, null, 0);
assertEquals("123456disulfide bond 1:3", sb.toString());
// residuePos == 3 matches end of feature, text appended
sar.appendFeature(sb, 3, null, sf, null, 0);
sar.appendFeature(sb, 3, null, sf, null, 0);
- int n = sar.appendFeatures(sb, 1, sfl, new FeatureRenderer(null), 200); // text
- // should
- // terminate
- // before
- // 200
- // characters
+ int n = sar.appendFeatures(sb, 1, sfl,
+ new FeatureRenderer(null), 200); // text should terminate before 200 characters
String s = sb.toString();
assertTrue(s.length() < 200);
assertEquals(n, 7); // should be 7 features left over
String s = sb.toString();
assertTrue(s.length() < 200);
assertEquals(n, 7); // should be 7 features left over
*/
minmax.put("METAL", new float[][] { { 0f, 1f }, null });
sar.appendFeature(sb, 1, fr, sf, null, 0);
*/
minmax.put("METAL", new float[][] { { 0f, 1f }, null });
sar.appendFeature(sb, 1, fr, sf, null, 0);
- // <br/> is appended to a buffer > 6 in length
- assertEquals("METAL 1 3; Fe2-S<br/>METAL 1 3; Fe2-S Score=1.3",
+ // <br> is appended to a buffer > 6 in length
+ assertEquals("METAL 1 3; Fe2-S<br>METAL 1 3; Fe2-S Score=1.3",
expected = "<i>SeqDesc\n" + "\n"
+ "<br/>Metal ; Desc<br/>Type1 ; Nonpos</i>";
assertEquals(expected, sb.toString());
expected = "<i>SeqDesc\n" + "\n"
+ "<br/>Metal ; Desc<br/>Type1 ; Nonpos</i>";
assertEquals(expected, sb.toString());
/*
* 'linkonly' features are ignored; this is obsolete, as linkonly
* is only set by DasSequenceFetcher, and DAS is history
/*
* 'linkonly' features are ignored; this is obsolete, as linkonly
* is only set by DasSequenceFetcher, and DAS is history
{
SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
StringBuilder sb = new StringBuilder();
{
SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
StringBuilder sb = new StringBuilder();
SequenceI seq = new Sequence("s1", "ABC");
int maxSources = (int) PA.getValue(sar, "MAX_SOURCES");
SequenceI seq = new Sequence("s1", "ABC");
int maxSources = (int) PA.getValue(sar, "MAX_SOURCES");
int maxRefs = (int) PA.getValue(sar, "MAX_REFS_PER_SOURCE");
for (int i = 0; i <= maxRefs; i++)
{
seq.addDBRef(new DBRefEntry("Uniprot", "0", "P3041" + i));
}
int maxRefs = (int) PA.getValue(sar, "MAX_REFS_PER_SOURCE");
for (int i = 0; i <= maxRefs; i++)
{
seq.addDBRef(new DBRefEntry("Uniprot", "0", "P3041" + i));
}
sar.createSequenceAnnotationReport(sb, seq, true, true, null, true);
String report = sb.toString();
assertTrue(report.startsWith("<i>\n" + "<br/>\n" + "UNIPROT P30410,\n"
sar.createSequenceAnnotationReport(sb, seq, true, true, null, true);
String report = sb.toString();
assertTrue(report.startsWith("<i>\n" + "<br/>\n" + "UNIPROT P30410,\n"