*/
private long invalidrnastruc = -2;
+ private double bitScore;
+
+ private double eValue;
+
/**
* Updates the _rnasecstr field Determines the positions that base pair and
* the positions of helices based on secondary structure from a Stockholm file
}
return null;
}
-
+
/**
* Creates a new AlignmentAnnotation object.
*
}
}
}
-
+
/**
* Copy constructor creates a new independent annotation row with the same
* associated sequenceRef
public AlignmentAnnotation(AlignmentAnnotation annotation)
{
setAnnotationId();
+ updateAlignmentAnnotationFrom(annotation);
+ }
+
+ /**
+ * copy attributes and annotation from an existing annotation (used by copy
+ * constructor). This method does not update the unique annotationId
+ *
+ * @param annotation
+ */
+ public void updateAlignmentAnnotationFrom(AlignmentAnnotation annotation)
+ {
this.label = new String(annotation.label);
if (annotation.description != null)
{
this.scaleColLabel = annotation.scaleColLabel;
this.showAllColLabels = annotation.showAllColLabels;
this.calcId = annotation.calcId;
+ this.bitScore = annotation.bitScore;
+ this.eValue = annotation.eValue;
+
if (annotation.properties != null)
{
properties = new HashMap<>();
* @param seqRef
* @param startRes
* @param alreadyMapped
+ * - annotation are at aligned columns
*/
public void createSequenceMapping(SequenceI seqRef, int startRes,
boolean alreadyMapped)
{
return hasScore || !Double.isNaN(score);
}
-
+
/**
* Score only annotation
*
makeVisibleAnnotation(hidden);
}
+
public void setPadGaps(boolean padgaps, char gapchar)
{
this.padGaps = padgaps;
Iterable<AlignmentAnnotation> list, SequenceI seq, String calcId,
String label)
{
-
ArrayList<AlignmentAnnotation> aa = new ArrayList<>();
for (AlignmentAnnotation ann : list)
{
public static Iterable<AlignmentAnnotation> findAnnotation(
List<AlignmentAnnotation> list, String calcId)
{
-
List<AlignmentAnnotation> aa = new ArrayList<>();
if (calcId == null)
{
return aa;
}
+ public double getBitScore()
+ {
+ return bitScore;
+ }
+
+ public void setBitScore(double bitScore)
+ {
+ this.bitScore = bitScore;
+ }
+
+ public double getEValue()
+ {
+ return eValue;
+ }
+
+ public void setEValue(double eValue)
+ {
+ this.eValue = eValue;
+ }
+
+ public static AlignmentAnnotation findFirstAnnotation(
+ Iterable<AlignmentAnnotation> alignmentAnnotation, String name,
+ String calcId, boolean autoCalc, SequenceI seqRef,
+ SequenceGroup groupRef)
+ {
+
+ for (AlignmentAnnotation annot : alignmentAnnotation)
+ {
+ if (annot.autoCalculated == autoCalc && (name.equals(annot.label))
+ && (calcId == null || annot.getCalcId().equals(calcId))
+ && annot.sequenceRef == seqRef && annot.groupRef == groupRef)
+ {
+ return annot;
+ }
+ }
+ return null;
+ }
+
}