ScGroup()
{
- seqs = new ArrayList<SeqCigar>();
+ seqs = new ArrayList<>();
}
/**
SequenceI[] selseqs;
if (selection != null && selection.getSize() > 0)
{
- List<SequenceI> sel = selection.getSequences(null);
this.selected = new ScGroup();
selseqs = selection.getSequencesInOrder(alignment,
selectedRegionOnly);
selseqs = alignment.getSequencesArray();
}
- List<List<SequenceI>> seqsets = new ArrayList<List<SequenceI>>();
+ List<List<SequenceI>> seqsets = new ArrayList<>();
// get the alignment's group list and make a copy
- List<SequenceGroup> grps = new ArrayList<SequenceGroup>();
+ List<SequenceGroup> grps = new ArrayList<>();
List<SequenceGroup> gg = alignment.getGroups();
grps.addAll(gg);
ScGroup[] sgrps = null;
// strip out any groups that do not actually intersect with the
// visible and selected region
int ssel = selection.getStartRes(), esel = selection.getEndRes();
- List<SequenceGroup> isg = new ArrayList<SequenceGroup>();
+ List<SequenceGroup> isg = new ArrayList<>();
for (SequenceGroup sg : grps)
{
if (!(sg.getStartRes() > esel || sg.getEndRes() < ssel))
{
if (scGroups == null)
{
- scGroups = new ArrayList<ScGroup>();
+ scGroups = new ArrayList<>();
}
addedgps[sg] = true;
scGroups.add(sgrps[sg]);
public static void testSelectionViews(AlignmentI alignment,
HiddenColumns hidden, SequenceGroup selection)
{
- System.out.println("Testing standard view creation:\n");
+ jalview.bin.Console.outPrintln("Testing standard view creation:\n");
AlignmentView view = null;
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View with no hidden columns, no limit to selection, no groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, false, false,
false);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View with no hidden columns, no limit to selection, and all groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, false, false,
true);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection marked but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View with no hidden columns, limited to selection and no groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, false, true,
false);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection restricted but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View with no hidden columns, limited to selection, and all groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, false, true,
true);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection restricted and groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View *with* hidden columns, no limit to selection, no groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, true, false,
false);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View *with* hidden columns, no limit to selection, and all groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, true, false,
true);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection marked but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View *with* hidden columns, limited to selection and no groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, true, true,
false);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection restricted but no groups marked.");
}
try
{
- System.out.println(
+ jalview.bin.Console.outPrintln(
"View *with* hidden columns, limited to selection, and all groups to be collected:");
view = new AlignmentView(alignment, hidden, selection, true, true,
true);
} catch (Exception e)
{
e.printStackTrace();
- System.err.println(
+ jalview.bin.Console.errPrintln(
"Failed to generate alignment with selection restricted and groups marked.");
}