}
- public void adjustSequenceAnnotations()
+ public void adjustSequenceAnnotations(int position,
+ int number,
+ boolean insert)
{
if(annotations!=null)
{
+ int aSize, tSize;
+ Annotation [] temp;
for (int a = 0; a < annotations.length; a++)
{
- if (annotations[a].sequenceRef != null)
+ if(annotations[a].autoCalculated)
{
- annotations[a].adjustForAlignment();
+ System.out.println("ignore "+annotations[a].label);
+ continue;
+ }
+ aSize = annotations[a].annotations.length;
+ if(insert)
+ tSize = aSize + number;
+ else
+ tSize = aSize - number;
+
+ temp = new Annotation[tSize];
+
+ if(insert)
+ {
+ System.arraycopy(annotations[a].annotations,
+ 0, temp, 0, position);
+
+ System.arraycopy(annotations[a].annotations,
+ position, temp, position+number, aSize - position);
+ }
+ else
+ {
+ System.arraycopy(annotations[a].annotations,
+ 0, temp, 0, position);
+
+ System.arraycopy(annotations[a].annotations,
+ position + number, temp, position,
+ aSize - position - number);
+ }
+
+ annotations[a].annotations = temp;
+
+
+ // if (annotations[a].sequenceRef != null)
+ {
+ // annotations[a].adjustForAlignment();
}
}
}
*/
public class AlignmentAnnotation
{
+ /** If true, this annotations is calculated every edit,
+ * eg consensus, quality or conservation graphs */
+ public boolean autoCalculated = false;
+
public SequenceI sequenceRef;
/** DOCUMENT ME!! */