protected Alignment dataset;\r
protected Vector sequences;\r
protected Vector groups = new Vector();\r
- protected Vector superGroup = new Vector();\r
protected char gapCharacter = '-';\r
protected int type = NUCLEOTIDE;\r
public static final int PROTEIN = 0;\r
for (i = 0; i < seqs.length; i++)\r
{\r
sequences.addElement(seqs[i]);\r
-\r
- if(seqs[i].getDatasetSequence()!=null\r
- && seqs[i].getDatasetSequence().getAnnotation()!=null)\r
- {\r
-\r
- for(int a=0; a<seqs[i].getDatasetSequence().getAnnotation().length; a++)\r
- {\r
- this.addAnnotation(seqs[i].getDatasetSequence().getAnnotation()[a], seqs[i]);\r
- }\r
- }\r
}\r
-\r
- getWidth();\r
}\r
\r
/**\r
public void deleteAllGroups()\r
{\r
groups.removeAllElements();\r
- superGroup.removeAllElements();\r
\r
int i = 0;\r
\r
annotations = temp;\r
}\r
\r
- /**\r
- *\r
- * @param aa AlignmentAnnotation\r
- * @param seqRef The sequence to associate this annotation with\r
- * @return The adjusted AlignmentAnnotation, with dataset sequence and annotation added\r
- */\r
- public AlignmentAnnotation addAnnotation(AlignmentAnnotation aa, SequenceI seqRef)\r
- {\r
- if(seqRef!=null)\r
- {\r
- //We can only add Annotations to the dataset sequences\r
- if(seqRef.getDatasetSequence()==null)\r
- {\r
- setDataset(null);\r
- }\r
-\r
- AlignmentAnnotation [] old = seqRef.getDatasetSequence().getAnnotation();\r
-\r
- //First check if this is a new annotation or not. If it is new,\r
- //we must add the annotation to the dataset\r
- boolean newAnnotation = true;\r
- if(seqRef.getDatasetSequence().getAnnotation()!=null)\r
- {\r
- for(int a=0; a<old.length; a++)\r
- {\r
- if(old[a] == aa)\r
- {\r
-\r
- newAnnotation = false;\r
- break;\r
- }\r
- }\r
- }\r
-\r
- if(newAnnotation)\r
- {\r
- seqRef.getDatasetSequence().addAlignmentAnnotation(aa);\r
- }\r
-\r
- AlignmentAnnotation copy = null;\r
- if (aa.graph > 0)\r
- copy = new AlignmentAnnotation(\r
- aa.label, aa.description, aa.annotations, aa.graphMin,\r
- aa.graphMax, aa.graph\r
- );\r
- else\r
- copy = new AlignmentAnnotation(\r
- aa.label, aa.description, aa.annotations\r
- );\r
-\r
- copy.datasetAnnotation = aa;\r
-\r
- addAnnotation(copy);\r
-\r
- copy.sequenceRef = seqRef;\r
-\r
- return copy;\r
- }\r
- else\r
- {\r
- addAnnotation(aa);\r
- return aa;\r
- }\r
- }\r
\r
public void adjustSequenceAnnotations()\r
{\r