else
// ///Editing a single sequence///////////
{
- if (insertGap && !editSeq)
+ if (insertGap)
{
// dragging to the right
if (fixedColumns && fixedRight != -1)
{
insertChar(j, new SequenceI[]
{ seq }, fixedRight);
- System.out.println("InsertGap1");
-
}
}
else
{
editCommand.appendEdit(EditCommand.INSERT_GAP, new SequenceI[]
{ seq }, lastres, startres - lastres, av.alignment, true);
- System.out.println("InsertGap2 - lastres: "+lastres+" startres: "+startres);
-
- }
+ }
}
else
{
insertChar(j, new SequenceI[]
{ seq }, fixedRight);
}
- System.out.println("EditSeq1");
-
- }
+ }
else
{
editCommand.appendEdit(EditCommand.INSERT_NUC, new SequenceI[]
{ seq }, lastres, startres - lastres, av.alignment, true);
- System.out.println("EditSeq2");
}
}
}
int start = 1;\r
int end = -1;\r
String sid = acc;\r
- // Retrieve hash of annotations for this accession\r
+ /*\r
+ * Retrieve hash of annotations for this accession\r
+ * Associate Annotation with accession\r
+ */\r
Hashtable accAnnotations = null;\r
\r
if (seqAnn != null && seqAnn.containsKey(acc))\r
{\r
accAnnotations = (Hashtable) seqAnn.remove(acc);\r
+ //TODO: add structures to sequence\r
}\r
\r
// Split accession in id and from/to\r
jalview.util.DBRefUtils.parseToDbRef(seqO, src, "0", acn);\r
// seqO.addDBRef(dbref);\r
}\r
+ } \r
+ if (accAnnotations != null && accAnnotations.containsKey("SS"))\r
+ {\r
+ Vector v = (Vector) accAnnotations.get("SS");\r
+ \r
+ for (int i = 0; i < v.size(); i++)\r
+ {\r
+ AlignmentAnnotation an = (AlignmentAnnotation) v.elementAt(i);\r
+ seqO.addAlignmentAnnotation(an);\r
+ //annotations.add(an);\r
+ }\r
}\r
+ \r
Hashtable features = null;\r
// We need to adjust the positions of all features to account for gaps\r
try\r
ann = new Hashtable();\r
seqAnn.put(acc, ann);\r
}\r
-\r
+ //TODO test structure, call parseAnnotationRow with vector from hashtable for specific sequence\r
Hashtable features;\r
// Get an object with all the content for an annotation\r
if (ann.containsKey("features"))\r
}\r
ns += seq;\r
content.put(description, ns);\r
+
+ if(type.equals("SS")){\r
+ Hashtable strucAnn;\r
+ if (seqAnn.containsKey(acc))\r
+ {\r
+ strucAnn = (Hashtable) seqAnn.get(acc);\r
+ }\r
+ else\r
+ {\r
+ strucAnn = new Hashtable();\r
+ }\r
+ \r
+ Vector newStruc=new Vector();\r
+ parseAnnotationRow(newStruc, type,ns);\r
+ \r
+ strucAnn.put(type, newStruc);\r
+ seqAnn.put(acc, strucAnn);\r
+ }\r
}\r
else\r
{\r
annot.annotations.length);\r
System.arraycopy(els, 0, anns, annot.annotations.length, els.length);\r
annot.annotations = anns;\r
+ //System.out.println("else: ");\r
}\r
return annot;\r
}\r