params = args;
}
+ /**
+ * Answers true if preference HMMER_PATH is set, and its value is the path to
+ * a directory that contains an executable <code>hmmbuild</code> or
+ * <code>hmmbuild.exe</code>, else false
+ *
+ * @return
+ */
public static boolean isHmmerAvailable()
{
File exec = getExecutable(HMMBUILD, Cache.getProperty(Preferences.HMMER_PATH));
}
/**
- * Exports an alignment (and possibly annotation) to the specified file, in
- * Stockholm format
+ * Exports an alignment, and reference (RF) annotation if present, to the
+ * specified file, in Stockholm format
*
* @param seqs
* @param toFile
if (toFile != null && annotated != null)
{
- for (AlignmentAnnotation annot : annotated.getAlignmentAnnotation())
+ AlignmentAnnotation[] annots = annotated.getAlignmentAnnotation();
+ if (annots != null)
{
- if (annot.label.contains("Reference") || "RF".equals(annot.label))
+ for (AlignmentAnnotation annot : annots)
{
- AlignmentAnnotation newRF;
- if (annot.annotations.length > newAl.getWidth())
- {
- Annotation[] rfAnnots = new Annotation[newAl.getWidth()];
- System.arraycopy(annot.annotations, 0, rfAnnots, 0,
- rfAnnots.length);
- newRF = new AlignmentAnnotation("RF", "Reference Positions",
- rfAnnots);
- }
- else
+ if (annot.label.contains("Reference") || "RF".equals(annot.label))
{
- newRF = new AlignmentAnnotation(annot);
+ AlignmentAnnotation newRF;
+ if (annot.annotations.length > newAl.getWidth())
+ {
+ Annotation[] rfAnnots = new Annotation[newAl.getWidth()];
+ System.arraycopy(annot.annotations, 0, rfAnnots, 0,
+ rfAnnots.length);
+ newRF = new AlignmentAnnotation("RF", "Reference Positions",
+ rfAnnots);
+ }
+ else
+ {
+ newRF = new AlignmentAnnotation(annot);
+ }
+ newAl.addAnnotation(newRF);
}
- newAl.addAnnotation(newRF);
}
}
}