+ /**
+ * Get the RNA Secondary Structure SequenceFeature Array if present
+ */
+ public SequenceFeature[] getRnaSecondaryStructure()
+ {
+ return this._rnasecstr;
+ }
+
+ /**
+ * Check the RNA Secondary Structure is equivalent to one in given
+ * AlignmentAnnotation param
+ */
+ public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that)
+ {
+ return rnaSecondaryStructureEquivalent(that, true);
+ }
+
+ public boolean rnaSecondaryStructureEquivalent(AlignmentAnnotation that,
+ boolean compareType)
+ {
+ SequenceFeature[] thisSfArray = this.getRnaSecondaryStructure();
+ SequenceFeature[] thatSfArray = that.getRnaSecondaryStructure();
+ if (thisSfArray == null || thatSfArray == null)
+ {
+ return thisSfArray == null && thatSfArray == null;
+ }
+ if (thisSfArray.length != thatSfArray.length)
+ {
+ return false;
+ }
+ Arrays.sort(thisSfArray, new SFSortByEnd()); // probably already sorted
+ // like this
+ Arrays.sort(thatSfArray, new SFSortByEnd()); // probably already sorted
+ // like this
+ for (int i = 0; i < thisSfArray.length; i++)
+ {
+ SequenceFeature thisSf = thisSfArray[i];
+ SequenceFeature thatSf = thatSfArray[i];
+ if (compareType)
+ {
+ if (thisSf.getType() == null || thatSf.getType() == null)
+ {
+ if (thisSf.getType() == null && thatSf.getType() == null)
+ {
+ continue;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ if (!thisSf.getType().equals(thatSf.getType()))
+ {
+ return false;
+ }
+ }
+ if (!(thisSf.getBegin() == thatSf.getBegin()
+ && thisSf.getEnd() == thatSf.getEnd()))
+ {
+ return false;
+ }
+ }
+ return true;
+
+ }
+
+ /**
+ * map of positions in the associated annotation
+ */
+ private Map<Integer, Annotation> sequenceMapping;
+
+ /**
+ * lower range for quantitative data
+ */
+ public float graphMin;
+
+ /**
+ * Upper range for quantitative data
+ */
+ public float graphMax;
+
+ /**
+ * Score associated with label and description.
+ */
+ public double score = Double.NaN;
+
+ /**
+ * flag indicating if annotation has a score.
+ */
+ public boolean hasScore = false;
+
+ public GraphLine threshold;
+
+ // Graphical hints and tips
+
+ /** Can this row be edited by the user ? */
+ public boolean editable = false;
+
+ /** Indicates if annotation has a graphical symbol track */
+ public boolean hasIcons; //
+
+ /** Indicates if annotation has a text character label */
+ public boolean hasText;
+
+ /** is the row visible */
+ public boolean visible = true;
+
+ public int graphGroup = -1;
+
+ /** Displayed height of row in pixels */
+ public int height = 0;
+
+ public int graph = 0;
+
+ public int graphHeight = 40;
+
+ public boolean padGaps = false;
+
+ public static final int NO_GRAPH = 0;
+
+ public static final int BAR_GRAPH = 1;
+
+ public static final int LINE_GRAPH = 2;
+
+ public static final int CONTACT_MAP = 4;
+
+ /**
+ * property that when set to non-empty string disables display of column groups defined on the contact matrix
+ */
+ public static final String CONTACT_MAP_NOGROUPS = "CMNOGRPS";
+
+ public boolean belowAlignment = true;
+
+ public SequenceGroup groupRef = null;
+
+ /**
+ * display every column label, even if there is a row of identical labels
+ */
+ public boolean showAllColLabels = false;
+
+ /**
+ * scale the column label to fit within the alignment column.
+ */
+ public boolean scaleColLabel = false;
+
+ /**
+ * centre the column labels relative to the alignment column
+ */
+ public boolean centreColLabels = false;
+
+ private boolean isrna;
+
+ public static int getGraphValueFromString(String string)
+ {
+ if (string.equalsIgnoreCase("BAR_GRAPH"))