try
{
cmds.exportData(seqs, outTemp.getAbsoluteFile(), hmm,
- hmmTemp.getAbsoluteFile());
+ hmmTemp.getAbsoluteFile(), null);
} catch (IOException e1)
{
e1.printStackTrace();
}
cmds.uniquifySequences(newArr);
- cmds.exportData(newArr, stoTemp, null, null);
+
+ if (forGroup)
+ {
+ cmds.exportData(newArr, stoTemp, null, null, group);
+ }
+ else
+ {
+ cmds.exportData(newArr, stoTemp, null, null, alignment);
+ }
+
jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
} catch (FileNotFoundException e)
{
if (af != null)
{
+ if (af.getTitle().length() < 15)
+ {
name = af.getTitle();
}
+ }
if (name == null || "".equals(name))
{
name = "Alignment";
*/
private void importData() throws IOException, InterruptedException
{
- HMMFile file = new HMMFile(new FileParse(hmmTemp.getAbsolutePath(),
+ HMMFile file = new HMMFile(
+ new FileParse(hmmTemp.getAbsolutePath(),
DataSourceType.FILE));
SequenceI[] seqs = file.getSeqsAsArray();
SequenceI seq = seqs[0];
package jalview.hmmer;
import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
* @throws IOException
*/
public void exportData(SequenceI[] seqs,
- File stoLocation, HiddenMarkovModel hmm, File hmmLocation)
+ File stoLocation, HiddenMarkovModel hmm, File hmmLocation,
+ AnnotatedCollectionI al)
throws IOException
{
if (seqs != null)
{
- StockholmFile file = new StockholmFile(new Alignment(seqs));
+ AlignmentI newAl = new Alignment(seqs);
+ if (stoLocation != null)
+ {
+ for (AlignmentAnnotation annot : al.getAlignmentAnnotation())
+ {
+ if (annot.label.contains("Reference") || "RF".equals(annot.label))
+ {
+ newAl.addAnnotation(annot);
+ }
+ }
+ }
+ StockholmFile file = new StockholmFile(newAl);
String output = file.print(seqs, false);
PrintWriter writer = new PrintWriter(stoLocation);
writer.println(output);
}
try
{
- cmds.exportData(null, null, hmm, hmmTemp.getAbsoluteFile());
+ cmds.exportData(null, null, hmm, hmmTemp.getAbsoluteFile(), null);
} catch (IOException e1)
{
e1.printStackTrace();
{
label = aa.label;
}
+ else if ("RF".equals(key))
+ {
+ label = key;
+ }
else
{
label = key + "_cons";
AlignmentAnnotation[] annots = this.alignment.getAlignmentAnnotation();
for (AlignmentAnnotation annot : annots)
{
- if ("RF".equals(annot.getCalcId()))
+ if ("RF".equals(annot.label) || annot.label.contains("Reference"))
{
return true;
}