return ed;
}
- private static int[] getStartEnd(int[] aligmentStartEnd,
+ public static int[] getStartEnd(int[] aligmentStartEnd,
List<int[]> hiddenCols)
{
int startPos = aligmentStartEnd[0];
for (int[] hiddenCol : hiddenCols)
{
// System.out.println("comparing : " + hiddenCol[0] + "-" + hiddenCol[1]);
-
lowestRange = (hiddenCol[0] <= startPos) ? hiddenCol : lowestRange;
higestRange = (hiddenCol[1] >= endPos) ? hiddenCol : higestRange;
}
*/
package jalview.gui;
+import jalview.analysis.AlignmentUtils;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.io.FormatAdapter;
+import jalview.util.MessageManager;
+
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.List;
import java.util.regex.Pattern;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
-import jalview.analysis.AlignmentUtils;
-import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.Annotation;
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.io.FormatAdapter;
-import jalview.util.MessageManager;
-
/**
* DOCUMENT ME!
*
sq.getLength(), seqs);
}
+ int[] alignmentStartEnd = new int[]
+ { 0, ds.getWidth() - 1 };
+ List<int[]> hiddenCols = av.getColumnSelection().getHiddenColumns();
+ if (hiddenCols != null)
+ {
+ alignmentStartEnd = AlignFrame.getStartEnd(alignmentStartEnd,
+ hiddenCols);
+ }
String output = new FormatAdapter().formatSequences("Fasta", seqs,
- omitHidden, null);
+ omitHidden, alignmentStartEnd);
Toolkit.getDefaultToolkit().getSystemClipboard()
.setContents(new StringSelection(output), Desktop.instance);
startRes = seqs[i].getStart();
endRes = seqs[i].getEnd();
- startIndex = startEnd[0];
- endIndex = startEnd[1];
if (startEnd != null)
{
+ startIndex = startEnd[0];
+ endIndex = startEnd[1];
// get first non-gaped residue start position
while (jalview.util.Comparison.isGap(seqs[i]
.getCharAt(startIndex)) && startIndex < endIndex)