- jalview.datamodel.AlignmentAnnotation jaa = null;\r
- if(an[i].getGraph())\r
- jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),\r
- an[i].getDescription(), anot,\r
- 0,0,1);\r
- else\r
- jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),\r
- an[i].getDescription(), anot);\r
- al.addAnnotation(jaa);\r
- }\r
- }\r
-\r
- /////////////////////////////////\r
- // LOAD VIEWPORT\r
- Viewport[] views = jms.getViewport();\r
- Viewport view = views[0]; // DEAL WITH MULTIPLE VIEWPORTS LATER\r
-\r
- AlignFrame af = new AlignFrame(al);\r
- // af.changeColour() );\r
-\r
- /////////////////////////\r
- //LOAD GROUPS\r
- if (jms.getJGroupCount()>0)\r
- {\r
- JGroup[] groups = jms.getJGroup();\r
- for (int i = 0; i < groups.length; i++)\r
- {\r
- ColourSchemeI cs=null;\r
- if(groups[i].getColour()!=null)\r
- {\r
- if (groups[i].getColour().startsWith("ucs"))\r
- cs = GetUserColourScheme(jms, groups[i].getColour());\r
- else\r
- cs = ColourSchemeProperty.getColour(al, groups[i].getColour());\r
-\r
- if (cs instanceof ResidueColourScheme)\r
- ( (ResidueColourScheme) cs).setThreshold(groups[i].getPidThreshold());\r
- else if (cs instanceof ScoreColourScheme)\r
- ( (ScoreColourScheme) cs).setThreshold(groups[i].getPidThreshold());\r
- }\r
-\r
- jalview.datamodel.SequenceGroup sg = new jalview.datamodel.SequenceGroup\r
- (groups[i].getName(),\r
- cs,\r
- groups[i].getDisplayBoxes(),\r
- groups[i].getDisplayText(),\r
- groups[i].getColourText(),\r
- groups[i].getStart(),\r
- groups[i].getEnd()) ;\r
- sg.setOutlineColour( new java.awt.Color(groups[i].getOutlineColour()));\r
- int [] ids = groups[i].getSeq();\r
- for(int s=0; s<ids.length; s++)\r
- sg.addSequence( (jalview.datamodel.SequenceI)seqids.elementAt( ids[s] ));\r
-\r
- if(groups[i].getConsThreshold()!=0)\r
- {\r
- jalview.analysis.Conservation c = new jalview.analysis.Conservation("All",\r
- ResidueProperties.propHash, 3,\r
- sg.sequences, 0,\r
- sg.getWidth() - 1);\r
- c.calculate();\r
- c.verdict(false, 25);\r
- cs = new ConservationColourScheme(c, cs);\r
- sg.cs = cs;\r
- }\r
-\r
-\r
- al.addGroup(sg);\r
- }\r
- }\r