2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.datamodel;
23 import jalview.util.ShiftList;
25 import java.io.PrintStream;
26 import java.util.Enumeration;
27 import java.util.List;
28 import java.util.Vector;
31 * Transient object compactly representing a 'view' of an alignment - with
32 * discontinuities marked. Extended in Jalview 2.7 to optionally record sequence
33 * groups and specific selected regions on the alignment.
35 public class AlignmentView
37 private SeqCigar[] sequences = null;
39 private int[] contigs = null;
41 private int width = 0;
43 private int firstCol = 0;
46 * one or more ScGroup objects, which are referenced by each seqCigar's group
49 private Vector scGroups;
51 private boolean isNa=false;
53 * false if the view concerns peptides
62 * Group defined over SeqCigars. Unlike AlignmentI associated groups, each
63 * SequenceGroup hold just the essential properties for the group, but no
64 * references to the sequences involved. SeqCigars hold references to the
65 * seuqenceGroup entities themselves.
71 public SequenceGroup sg;
80 * vector of selected seqCigars. This vector is also referenced by each
81 * seqCigar contained in it.
83 private Vector selected;
86 * Construct an alignmentView from a live jalview alignment view. Note -
87 * hidden rows will be excluded from alignmentView Note: JAL-1179
90 * - alignment as referenced by an AlignViewport
91 * @param columnSelection
94 * @param hasHiddenColumns
95 * - mark the hidden columns in columnSelection as hidden in the view
96 * @param selectedRegionOnly
97 * - when set, only include the selected region in the view,
98 * otherwise just mark the selected region on the constructed view.
100 * - when set, any groups on the given alignment will be marked on
103 public AlignmentView(AlignmentI alignment,
104 ColumnSelection columnSelection, SequenceGroup selection,
105 boolean hasHiddenColumns, boolean selectedRegionOnly,
106 boolean recordGroups)
108 // refactored from AlignViewport.getAlignmentView(selectedOnly);
109 this(new jalview.datamodel.CigarArray(alignment,
110 (hasHiddenColumns ? columnSelection : null),
111 (selectedRegionOnly ? selection : null)),
112 (selectedRegionOnly && selection != null) ? selection
114 isNa = alignment.isNucleotide();
115 // walk down SeqCigar array and Alignment Array - optionally restricted by
117 // test group membership for each sequence in each group, store membership
118 // and record non-empty groups in group list.
119 // record / sub-select selected region on the alignment view
121 if (selection != null && selection.getSize() > 0)
123 List<SequenceI> sel = selection.getSequences(null);
124 this.selected = new Vector();
126 .getSequencesInOrder(alignment, selectedRegionOnly);
130 selseqs = alignment.getSequencesArray();
133 // get the alignment's group list and make a copy
134 Vector grps = new Vector();
135 List<SequenceGroup> gg = alignment.getGroups();
137 ScGroup[] sgrps = null;
138 boolean addedgps[] = null;
142 if (selection != null && selectedRegionOnly)
144 // trim annotation to the region being stored.
145 // strip out any groups that do not actually intersect with the
146 // visible and selected region
147 int ssel = selection.getStartRes(), esel = selection.getEndRes();
148 Vector isg = new Vector();
149 Enumeration en = grps.elements();
150 while (en.hasMoreElements())
152 sg = (SequenceGroup) en.nextElement();
154 if (!(sg.getStartRes() > esel || sg.getEndRes() < ssel))
156 // adjust bounds of new group, if necessary.
157 if (sg.getStartRes() < ssel)
159 sg.setStartRes(ssel);
161 if (sg.getEndRes() > esel)
165 sg.setStartRes(sg.getStartRes() - ssel + 1);
166 sg.setEndRes(sg.getEndRes() - ssel + 1);
174 sgrps = new ScGroup[grps.size()];
175 addedgps = new boolean[grps.size()];
176 for (int g = 0; g < sgrps.length; g++)
178 sg = (SequenceGroup) grps.elementAt(g);
179 sgrps[g] = new ScGroup();
180 sgrps[g].sg = new SequenceGroup(sg);
182 grps.setElementAt(sg.getSequences(null), g);
184 // grps now contains vectors (should be sets) for each group, so we can
185 // track when we've done with the group
188 for (int i = 0; i < selseqs.length; i++)
190 if (selseqs[i] != null)
192 if (selection != null && selection.getSize() > 0
193 && !selectedRegionOnly)
195 sequences[csi].setGroupMembership(selected);
196 selected.addElement(sequences[csi]);
200 for (int sg = 0; sg < sgrps.length; sg++)
202 if (((Vector) grps.elementAt(sg)).contains(selseqs[i]))
204 sequences[csi].setGroupMembership(sgrps[sg]);
205 sgrps[sg].sg.deleteSequence(selseqs[i], false);
206 sgrps[sg].seqs.addElement(sequences[csi]);
209 if (scGroups == null)
211 scGroups = new Vector();
214 scGroups.addElement(sgrps[sg]);
222 // finally, delete the remaining sequences (if any) not selected
223 for (int sg = 0; sg < sgrps.length; sg++)
225 SequenceI[] sqs = sgrps[sg].sg.getSequencesAsArray(null);
226 for (int si = 0; si < sqs.length; si++)
228 sgrps[sg].sg.deleteSequence(sqs[si], false);
235 * construct an alignmentView from a SeqCigarArray. Errors are thrown if the
236 * seqcigararray.isSeqCigarArray() flag is not set.
238 public AlignmentView(CigarArray seqcigararray)
240 if (!seqcigararray.isSeqCigarArray())
243 "Implementation Error - can only make an alignment view from a CigarArray of sequences.");
245 // contigs = seqcigararray.applyDeletions();
246 contigs = seqcigararray.getDeletedRegions();
247 sequences = seqcigararray.getSeqCigarArray();
248 width = seqcigararray.getWidth(); // visible width
252 * Create an alignmentView where the first column corresponds with the
253 * 'firstcol' column of some reference alignment
258 public AlignmentView(CigarArray sdata, int firstcol)
264 public void setSequences(SeqCigar[] sequences)
266 this.sequences = sequences;
269 public void setContigs(int[] contigs)
271 this.contigs = contigs;
274 public SeqCigar[] getSequences()
280 * @see CigarArray.getDeletedRegions
281 * @return int[] { vis_start, sym_start, length }
283 public int[] getContigs()
289 * get the full alignment and a columnselection object marking the hidden
292 * @param gapCharacter
294 * @return Object[] { SequenceI[], ColumnSelection}
296 public Object[] getAlignmentAndColumnSelection(char gapCharacter)
298 ColumnSelection colsel = new ColumnSelection();
302 SeqCigar.createAlignmentSequences(sequences, gapCharacter, colsel,
307 * return the visible alignment corresponding to this view. Sequences in this
308 * alignment are edited versions of the parent sequences - where hidden
309 * regions have been removed. NOTE: the sequence data in this alignment is not
315 public AlignmentI getVisibleAlignment(char c)
317 SequenceI[] aln = getVisibleSeqs(c);
319 AlignmentI vcal = new Alignment(aln);
320 addPrunedGroupsInOrder(vcal, -1, -1, true);
325 * add groups from view to the given alignment
331 * -1 or gstart to width-1
333 * - true if vcal is alignment of the visible regions of the view
334 * (e.g. as returned from getVisibleAlignment)
336 private void addPrunedGroupsInOrder(AlignmentI vcal, int gstart,
337 int gend, boolean viscontigs)
340 if (gstart > -1 && gstart <= gend)
345 SequenceI[] aln = vcal.getSequencesArray();
348 * prune any groups to the visible coordinates of the alignment.
351 int nvg = (scGroups != null) ? scGroups.size() : 0;
354 SequenceGroup[] nsg = new SequenceGroup[nvg];
355 for (int g = 0; g < nvg; g++)
357 SequenceGroup sg = ((ScGroup) scGroups.elementAt(g)).sg;
360 if (sg.getStartRes() > gend || sg.getEndRes() < gstart)
368 // clone group properties
369 nsg[g] = new SequenceGroup(sg);
371 // may need to shift/trim start and end ?
372 if (r && !viscontigs)
374 // Not fully tested code - routine not yet called with
376 if (nsg[g].getStartRes() < gstart)
378 nsg[g].setStartRes(0);
382 nsg[g].setStartRes(nsg[g].getStartRes() - gstart);
383 nsg[g].setEndRes(nsg[g].getEndRes() - gstart);
385 if (nsg[g].getEndRes() > (gend - gstart))
387 nsg[g].setEndRes(gend - gstart);
393 // prune groups to cover just the visible positions between
398 ShiftList prune = new ShiftList();
401 // adjust for start of alignment within visible window.
402 prune.addShift(gstart, -gstart); //
404 for (int h = 0; h < contigs.length; h += 3)
407 prune.addShift(p + contigs[h + 1], contigs[h + 2]
410 p = contigs[h + 1] + contigs[h + 2];
412 for (int g = 0; g < nsg.length; g++)
416 int s = nsg[g].getStartRes(), t = nsg[g].getEndRes();
431 nsg[g].setStartRes(s);
438 for (int nsq = 0; nsq < aln.length; nsq++)
440 for (int g = 0; g < nvg; g++)
443 && sequences[nsq].isMemberOf(scGroups.elementAt(g)))
445 nsg[g].addSequence(aln[nsq], false);
449 for (int g = 0; g < nvg; g++)
451 if (nsg[g] != null && nsg[g].getSize() > 0)
453 vcal.addGroup(nsg[g]);
463 * generate sequence array corresponding to the visible parts of the
469 private SequenceI[] getVisibleSeqs(char c)
471 SequenceI[] aln = new SequenceI[sequences.length];
472 for (int i = 0, j = sequences.length; i < j; i++)
474 aln[i] = sequences[i].getSeq('-');
476 // Remove hidden regions from sequence objects.
477 String seqs[] = getSequenceStrings('-');
478 for (int i = 0, j = aln.length; i < j; i++)
480 aln[i].setSequence(seqs[i]);
486 * creates new alignment objects for all contiguous visible segments
491 * @param regionOfInterest
492 * specify which sequences to include (or null to include all
494 * @return AlignmentI[] - all alignments where each sequence is a subsequence
495 * constructed from visible contig regions of view
497 public AlignmentI[] getVisibleContigAlignments(char c)
500 int[] vcontigs = getVisibleContigs();
501 SequenceI[][] contigviews = getVisibleContigs(c);
502 AlignmentI[] vcals = new AlignmentI[contigviews.length];
503 for (nvc = 0; nvc < contigviews.length; nvc++)
505 vcals[nvc] = new Alignment(contigviews[nvc]);
506 if (scGroups != null && scGroups.size() > 0)
508 addPrunedGroupsInOrder(vcals[nvc], vcontigs[nvc * 2],
509 vcontigs[nvc * 2 + 1], true);
516 * get an array of visible sequence strings for a view on an alignment using
517 * the given gap character
523 public String[] getSequenceStrings(char c)
525 String[] seqs = new String[sequences.length];
526 for (int n = 0; n < sequences.length; n++)
528 String fullseq = sequences[n].getSequenceString(c);
533 for (int h = 0; h < contigs.length; h += 3)
535 seqs[n] += fullseq.substring(p, contigs[h + 1]);
536 p = contigs[h + 1] + contigs[h + 2];
538 seqs[n] += fullseq.substring(p);
550 * @return visible number of columns in alignment view
552 public int getWidth()
557 protected void setWidth(int width)
563 * get the contiguous subalignments in an alignment view.
565 * @param gapCharacter
567 * @return SequenceI[][]
569 public SequenceI[][] getVisibleContigs(char gapCharacter)
573 if (sequences == null || width <= 0)
577 if (contigs != null && contigs.length > 0)
582 for (int contig = 0; contig < contigs.length; contig += 3)
584 if ((contigs[contig + 1] - start) > 0)
588 fwidth += contigs[contig + 2]; // end up with full region width
589 // (including hidden regions)
590 start = contigs[contig + 1] + contigs[contig + 2];
596 smsa = new SequenceI[njobs][];
599 for (int contig = 0; contig < contigs.length; contig += 3)
601 if (contigs[contig + 1] - start > 0)
603 SequenceI mseq[] = new SequenceI[sequences.length];
604 for (int s = 0; s < mseq.length; s++)
606 mseq[s] = sequences[s].getSeq(gapCharacter).getSubSequence(
607 start, contigs[contig + 1]);
612 start = contigs[contig + 1] + contigs[contig + 2];
616 SequenceI mseq[] = new SequenceI[sequences.length];
617 for (int s = 0; s < mseq.length; s++)
619 mseq[s] = sequences[s].getSeq(gapCharacter).getSubSequence(start,
628 smsa = new SequenceI[1][];
629 smsa[0] = new SequenceI[sequences.length];
630 for (int s = 0; s < sequences.length; s++)
632 smsa[0][s] = sequences[s].getSeq(gapCharacter);
639 * return full msa and hidden regions with visible blocks replaced with new
645 * AlignmentOrder[] corresponding to each SequenceI[] block.
648 public Object[] getUpdatedView(SequenceI[][] nvismsa,
649 AlignmentOrder[] orders, char gapCharacter)
651 if (sequences == null || width <= 0)
653 throw new Error("empty view cannot be updated.");
658 "nvismsa==null. use getAlignmentAndColumnSelection() instead.");
660 if (contigs != null && contigs.length > 0)
662 SequenceI[] alignment = new SequenceI[sequences.length];
663 ColumnSelection columnselection = new ColumnSelection();
664 if (contigs != null && contigs.length > 0)
670 for (int contig = 0; contig < contigs.length; contig += 3)
672 owidth += contigs[contig + 2]; // recover final column width
673 if (contigs[contig + 1] - start > 0)
675 int swidth = 0; // subalignment width
676 if (nvismsa[j] != null)
678 SequenceI mseq[] = nvismsa[j];
679 AlignmentOrder order = (orders == null) ? null : orders[j];
681 if (mseq.length != sequences.length)
684 "Mismatch between number of sequences in block "
685 + j + " (" + mseq.length
686 + ") and the original view ("
687 + sequences.length + ")");
689 swidth = mseq[0].getLength(); // JBPNote: could ensure padded
691 for (int s = 0; s < mseq.length; s++)
693 if (alignment[s] == null)
695 alignment[s] = mseq[s];
699 alignment[s].setSequence(alignment[s]
700 .getSequenceAsString()
701 + mseq[s].getSequenceAsString());
702 if (mseq[s].getStart() <= mseq[s].getEnd())
704 alignment[s].setEnd(mseq[s].getEnd());
708 order.updateSequence(mseq[s], alignment[s]);
715 // recover original alignment block or place gaps
718 // recover input data
719 for (int s = 0; s < sequences.length; s++)
721 SequenceI oseq = sequences[s].getSeq(gapCharacter)
722 .getSubSequence(start, contigs[contig + 1]);
723 if (swidth < oseq.getLength())
725 swidth = oseq.getLength();
727 if (alignment[s] == null)
733 alignment[s].setSequence(alignment[s]
734 .getSequenceAsString()
735 + oseq.getSequenceAsString());
736 if (oseq.getEnd() >= oseq.getStart())
738 alignment[s].setEnd(oseq.getEnd());
748 // advance to begining of visible region
749 start = contigs[contig + 1] + contigs[contig + 2];
750 // add hidden segment to right of next region
751 for (int s = 0; s < sequences.length; s++)
753 SequenceI hseq = sequences[s].getSeq(gapCharacter)
754 .getSubSequence(contigs[contig + 1], start);
755 if (alignment[s] == null)
761 alignment[s].setSequence(alignment[s].getSequenceAsString()
762 + hseq.getSequenceAsString());
763 if (hseq.getEnd() >= hseq.getStart())
765 alignment[s].setEnd(hseq.getEnd());
769 // mark hidden segment as hidden in the new alignment
770 columnselection.hideColumns(nwidth, nwidth + contigs[contig + 2]
772 nwidth += contigs[contig + 2];
774 // Do final segment - if it exists
775 if (j < nvismsa.length)
778 if (nvismsa[j] != null)
780 SequenceI mseq[] = nvismsa[j];
781 AlignmentOrder order = (orders != null) ? orders[j] : null;
782 swidth = mseq[0].getLength();
783 for (int s = 0; s < mseq.length; s++)
785 if (alignment[s] == null)
787 alignment[s] = mseq[s];
791 alignment[s].setSequence(alignment[s].getSequenceAsString()
792 + mseq[s].getSequenceAsString());
793 if (mseq[s].getEnd() >= mseq[s].getStart())
795 alignment[s].setEnd(mseq[s].getEnd());
799 order.updateSequence(mseq[s], alignment[s]);
808 // recover input data or place gaps
811 // recover input data
812 for (int s = 0; s < sequences.length; s++)
814 SequenceI oseq = sequences[s].getSeq(gapCharacter)
815 .getSubSequence(start, owidth + 1);
816 if (swidth < oseq.getLength())
818 swidth = oseq.getLength();
820 if (alignment[s] == null)
826 alignment[s].setSequence(alignment[s]
827 .getSequenceAsString()
828 + oseq.getSequenceAsString());
829 if (oseq.getEnd() >= oseq.getStart())
831 alignment[s].setEnd(oseq.getEnd());
840 throw new Error("Padding not yet implemented.");
847 { alignment, columnselection };
851 if (nvismsa.length != 1)
854 "Mismatch between visible blocks to update and number of contigs in view (contigs=0,blocks="
857 if (nvismsa[0] != null)
860 { nvismsa[0], new ColumnSelection() };
864 return getAlignmentAndColumnSelection(gapCharacter);
870 * returns simple array of start end positions of visible range on alignment.
871 * vis_start and vis_end are inclusive - use
872 * SequenceI.getSubSequence(vis_start, vis_end+1) to recover visible sequence
873 * from underlying alignment.
875 * @return int[] { start_i, end_i } for 1<i<n visible regions.
877 public int[] getVisibleContigs()
879 if (contigs != null && contigs.length > 0)
884 for (int contig = 0; contig < contigs.length; contig += 3)
886 if ((contigs[contig + 1] - start) > 0)
890 fwidth += contigs[contig + 2]; // end up with full region width
891 // (including hidden regions)
892 start = contigs[contig + 1] + contigs[contig + 2];
898 int viscontigs[] = new int[nvis * 2];
901 for (int contig = 0; contig < contigs.length; contig += 3)
903 if ((contigs[contig + 1] - start) > 0)
905 viscontigs[nvis] = start;
906 viscontigs[nvis + 1] = contigs[contig + 1] - 1; // end is inclusive
909 start = contigs[contig + 1] + contigs[contig + 2];
913 viscontigs[nvis] = start;
914 viscontigs[nvis + 1] = fwidth; // end is inclusive
928 * @return position of first visible column of AlignmentView within its
929 * parent's alignment reference frame
931 public int getAlignmentOrigin()
937 * compute a deletion map for the current view according to the given
941 * (as returned from SequenceI.gapMap())
942 * @return int[] {intersection of visible regions with gapMap)
944 public int[] getVisibleContigMapFor(int[] gapMap)
947 int[] viscontigs = getVisibleContigs();
950 if (viscontigs != null)
952 // viscontigs maps from a subset of the gapMap to the gapMap, so it will
953 // always be equal to or shorter than gapMap
954 delMap = new int[gapMap.length];
955 for (int contig = 0; contig < viscontigs.length; contig += 2)
958 while (spos < gapMap.length && gapMap[spos] < viscontigs[contig])
962 while (spos < gapMap.length
963 && gapMap[spos] <= viscontigs[contig + 1])
965 delMap[i++] = spos++;
968 int tmap[] = new int[i];
969 System.arraycopy(delMap, 0, tmap, 0, i);
976 * apply the getSeq(gc) method to each sequence cigar, and return the array of
977 * edited sequences, optionally with hidden regions removed.
980 * gap character to use for insertions
982 * remove hidden regions from sequences. Note: currently implemented
983 * in a memory inefficient way - space needed is 2*result set for
986 * @return SequenceI[]
988 public SequenceI[] getEditedSequences(char gc, boolean delete)
990 SeqCigar[] msf = getSequences();
991 SequenceI[] aln = new SequenceI[msf.length];
992 for (int i = 0, j = msf.length; i < j; i++)
994 aln[i] = msf[i].getSeq(gc);
998 String[] sqs = getSequenceStrings(gc);
999 for (int i = 0; i < sqs.length; i++)
1001 aln[i].setSequence(sqs[i]);
1008 public static void summariseAlignmentView(AlignmentView view,
1011 os.print("View has " + view.sequences.length + " of which ");
1012 if (view.selected == null)
1018 os.print(" " + view.selected.size());
1020 os.println(" are selected.");
1021 os.print("View is " + view.getWidth() + " columns wide");
1023 int[] contigs = view.getContigs();
1024 if (contigs != null)
1026 viswid = view.width;
1027 for (int i = 0; i < contigs.length; i += 3)
1029 viswid += contigs[i + 2];
1031 os.println("with " + viswid + " visible columns spread over "
1032 + contigs.length / 3 + " regions.");
1036 viswid = view.width;
1039 if (view.scGroups != null)
1041 os.println("There are " + view.scGroups.size()
1042 + " groups defined on the view.");
1043 for (int g = 0; g < view.scGroups.size(); g++)
1045 ScGroup sgr = (ScGroup) view.scGroups.elementAt(g);
1046 os.println("Group " + g + ": Name = " + sgr.sg.getName()
1047 + " Contains " + sgr.seqs.size() + " Seqs.");
1048 os.println("This group runs from " + sgr.sg.getStartRes() + " to "
1049 + sgr.sg.getEndRes());
1050 for (int s = 0; s < sgr.seqs.size(); s++)
1052 if (!((SeqCigar) sgr.seqs.elementAt(s)).isMemberOf(sgr))
1054 os.println("** WARNING: sequence "
1055 + ((SeqCigar) sgr.seqs.elementAt(s)).toString()
1056 + " is not marked as member of group.");
1060 AlignmentI visal = view.getVisibleAlignment('-');
1063 os.println("Vis. alignment is " + visal.getWidth()
1064 + " wide and has " + visal.getHeight() + " seqs.");
1065 if (visal.getGroups() != null && visal.getGroups().size() > 0)
1069 for (SequenceGroup sg : visal.getGroups())
1071 os.println("Group " + (i++) + " begins at column "
1072 + sg.getStartRes() + " and ends at " + sg.getEndRes());
1079 public static void testSelectionViews(AlignmentI alignment,
1080 ColumnSelection csel, SequenceGroup selection)
1082 System.out.println("Testing standard view creation:\n");
1083 AlignmentView view = null;
1087 .println("View with no hidden columns, no limit to selection, no groups to be collected:");
1088 view = new AlignmentView(alignment, csel, selection, false, false,
1090 summariseAlignmentView(view, System.out);
1092 } catch (Exception e)
1094 e.printStackTrace();
1096 .println("Failed to generate alignment with selection but no groups marked.");
1101 .println("View with no hidden columns, no limit to selection, and all groups to be collected:");
1102 view = new AlignmentView(alignment, csel, selection, false, false,
1104 summariseAlignmentView(view, System.out);
1105 } catch (Exception e)
1107 e.printStackTrace();
1109 .println("Failed to generate alignment with selection marked but no groups marked.");
1114 .println("View with no hidden columns, limited to selection and no groups to be collected:");
1115 view = new AlignmentView(alignment, csel, selection, false, true,
1117 summariseAlignmentView(view, System.out);
1118 } catch (Exception e)
1120 e.printStackTrace();
1122 .println("Failed to generate alignment with selection restricted but no groups marked.");
1127 .println("View with no hidden columns, limited to selection, and all groups to be collected:");
1128 view = new AlignmentView(alignment, csel, selection, false, true,
1130 summariseAlignmentView(view, System.out);
1131 } catch (Exception e)
1133 e.printStackTrace();
1135 .println("Failed to generate alignment with selection restricted and groups marked.");
1140 .println("View *with* hidden columns, no limit to selection, no groups to be collected:");
1141 view = new AlignmentView(alignment, csel, selection, true, false,
1143 summariseAlignmentView(view, System.out);
1144 } catch (Exception e)
1146 e.printStackTrace();
1148 .println("Failed to generate alignment with selection but no groups marked.");
1153 .println("View *with* hidden columns, no limit to selection, and all groups to be collected:");
1154 view = new AlignmentView(alignment, csel, selection, true, false,
1156 summariseAlignmentView(view, System.out);
1157 } catch (Exception e)
1159 e.printStackTrace();
1161 .println("Failed to generate alignment with selection marked but no groups marked.");
1166 .println("View *with* hidden columns, limited to selection and no groups to be collected:");
1167 view = new AlignmentView(alignment, csel, selection, true, true,
1169 summariseAlignmentView(view, System.out);
1170 } catch (Exception e)
1172 e.printStackTrace();
1174 .println("Failed to generate alignment with selection restricted but no groups marked.");
1179 .println("View *with* hidden columns, limited to selection, and all groups to be collected:");
1180 view = new AlignmentView(alignment, csel, selection, true, true, true);
1181 summariseAlignmentView(view, System.out);
1182 } catch (Exception e)
1184 e.printStackTrace();
1186 .println("Failed to generate alignment with selection restricted and groups marked.");