*/
public boolean alignmentIsSufficient(int required)
{
- if (getViewport().getAlignment().getSequences().size() < required)
- {
- JOptionPane.showMessageDialog(this,
- MessageManager.getString("label.not_enough_sequences"));
- return false;
- }
- return true;
+ if (getViewport().getSequenceSelection().length < required)
+ {
+ JOptionPane.showMessageDialog(this,
+ MessageManager.getString("label.not_enough_sequences"));
+ return false;
+ }
+ return true;
}
/**
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.AlignmentView;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.ResidueCount;
import jalview.datamodel.SequenceGroup;
else if (MessageManager.getString("label.groups_and_alignment")
.equals(value))
{
- AlignmentView av = viewport.getAlignmentView(true);
- runBuildFor.add(av.getVisibleAlignment('-'));
- runBuildFor.addAll(av.getVisibleGroups('-'));
+ runBuildFor.add(viewport.getAlignmentView(false)
+ .getVisibleAlignment('-'));
+ runBuildFor.addAll(viewport.getAlignment().getGroups());
}
else if (MessageManager.getString("label.groups").equals(value))
{
- AlignmentView av = viewport.getAlignmentView(false);
- runBuildFor.addAll(av.getVisibleGroups('-'));
+ runBuildFor.addAll(viewport.getAlignment().getGroups());
}
else if (MessageManager.getString("label.selected_group")
.equals(value))
{
- AlignmentView av = viewport.getAlignmentView(true);
- runBuildFor.add(av.getVisibleAlignment('-'));
+ runBuildFor.add(viewport.getSelectionGroup());
}
}
else if (MessageManager.getString("label.use_reference")
.getSelectionAsNewSequences((AlignmentI) ac.getContext());
for (SequenceI seq : sel)
{
- copy.add(seq);
+ if (seq != null)
+ {
+ copy.add(seq);
+ }
}
}
// TODO rather than copy alignment data we should anonymize in situ -
HMMFile file = new HMMFile(
new FileParse(hmmFile.getAbsolutePath(), DataSourceType.FILE));
SequenceI hmmSeq = file.getHMM().getConsensusSequence();
+
+
+
ResidueCount counts = new ResidueCount(alignment.getSequences());
hmmSeq.getHMM().setBackgroundFrequencies(counts);