\r
\r
//////////////\r
- SequenceGroup group;\r
+ SequenceGroup [] groups;\r
SequenceI seq;\r
- ColourSchemeI cs;\r
+ ColourSchemeI cs = null;\r
AlignmentI alignment = av.getAlignment();\r
String r,g,b;\r
- for (int i = 0; i < alignment.getHeight(); i++)\r
+\r
+ // draws the top row, the measure rule\r
+ out.println("<tr><td colspan=\"6\"></td>");\r
+ int i=0;\r
+ for(i=10; i<alignment.getWidth()-10; i+=10)\r
+ out.println("<td colspan=\"9\">"+i+"<br>|</td><td></td>");\r
+\r
+ out.println("<td colspan=\"3\"></td><td colspan=\"3\">"+i+"<br>|</td>");\r
+ out.println("</tr>");\r
+\r
+ for (i = 0; i < alignment.getHeight(); i++)\r
{\r
seq = alignment.getSequenceAt(i);\r
- group = alignment.findGroup( seq );\r
+ groups = alignment.findAllGroups( seq );\r
out.println("<tr><td nowrap>"+seq.getDisplayId()+" </td>");\r
+\r
+\r
for (int res = 0; res < seq.getLength(); res++)\r
{\r
- if(group!=null && group.getStartRes()<=res && group.getEndRes()>=res)\r
- cs = group.cs;\r
- else\r
- cs = av.getGlobalColourScheme();\r
+ cs = av.getGlobalColourScheme();\r
+\r
+ if(groups!=null)\r
+ {\r
+ for (int k = 0; k < groups.length; k++)\r
+ if (groups[k].getStartRes() <= res && groups[k].getEndRes() >= res)\r
+ {\r
+ cs = groups[k].cs;\r
+ break;\r
+ }\r
+ }\r
\r
\r
color = sr.getResidueBoxColour(cs, seq, res);\r