import jalview.api.AlignmentViewPanel;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
return;
}
List<compbio.data.sequence.FastaSequence> seqs = getInputSequences(alignViewport
- .getAlignment());
+ .getAlignment(), bySequence ? alignViewport.getSelectionGroup() : null);
if (seqs == null)
{
int realw;
- public List<FastaSequence> getInputSequences(AlignmentI alignment)
+ public List<FastaSequence> getInputSequences(AlignmentI alignment, AnnotatedCollectionI inputSeqs)
{
if (alignment == null || alignment.getWidth() <= 0
|| alignment.getSequences() == null
{
return null;
}
+ if (inputSeqs==null || inputSeqs.getWidth()<=0 || inputSeqs.getSequences()==null || inputSeqs.getSequences().size()<1)
+ {
+ inputSeqs = alignment;
+ }
+
List<compbio.data.sequence.FastaSequence> seqs = new ArrayList<compbio.data.sequence.FastaSequence>();
int minlen = 10;
seqNames = new HashMap<String, SequenceI>();
}
gapMap = new boolean[0];
- for (SequenceI sq : ((List<SequenceI>) alignment.getSequences()))
+ for (SequenceI sq : (List<SequenceI>) inputSeqs.getSequences())
{
if (sq.getEnd() - sq.getStart() > minlen - 1)
{