import java.io.File;
import java.io.IOException;
-import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.Map.Entry;
import jalview.analysis.AlignmentUtils;
import jalview.bin.argparser.Arg;
* m.get(Arg.OPEN).getValue(); String data = null; FileFormatI format = null;
* DataSourceType protocol = null;
*/
- if (avm.containsArg(Arg.OPEN) || avm.containsArg(Arg.OPENNEW))
+ if (avm.containsArg(Arg.APPEND) || avm.containsArg(Arg.OPEN))
{
commandArgsProvided = true;
long progress = -1;
boolean first = true;
boolean progressBarSet = false;
AlignFrame af;
- // Combine the OPEN and OPENNEW files into one list, along with whether it
- // was OPEN or OPENNEW
- List<Entry<Arg, ArgValue>> openAvList = new ArrayList<>();
- avm.getArgValueList(Arg.OPEN).stream()
- .forEachOrdered(av -> openAvList.add(
- new AbstractMap.SimpleEntry<Arg, ArgValue>(Arg.OPEN,
- av)));
- avm.getArgValueList(Arg.OPENNEW).stream()
- .forEachOrdered(av -> openAvList
- .add(new AbstractMap.SimpleEntry<Arg, ArgValue>(
- Arg.OPENNEW, av)));
- for (Entry<Arg, ArgValue> aav : openAvList)
+ // Combine the APPEND and OPEN files into one list, along with whether it
+ // was APPEND or OPEN
+ List<ArgValue> openAvList = new ArrayList<>();
+ openAvList.addAll(avm.getArgValueList(Arg.OPEN));
+ openAvList.addAll(avm.getArgValueList(Arg.APPEND));
+ // sort avlist based on av.getArgIndex()
+ Collections.sort(openAvList);
+ for (ArgValue av : openAvList)
{
- Arg a = aav.getKey();
- ArgValue av = aav.getValue();
+ Arg a = av.getArg();
String openFile = av.getValue();
if (openFile == null)
continue;
af = afMap.get(id);
if (af == null || "true".equals(av.getSubVal("new"))
- || a == Arg.OPENNEW || format == FileFormat.Jalview)
+ || a == Arg.OPEN || format == FileFormat.Jalview)
{
/*
* this approach isn't working yet // get default annotations before opening
af.getCurrentView().addFile(new File(openFile), format, false);
}
- Console.debug("Command " + Arg.OPEN + " executed successfully!");
+ Console.debug("Command " + Arg.APPEND + " executed successfully!");
}
if (first) // first=true means nothing opened
{
HELP("h"), CALCULATION, MENUBAR, STATUS, SHOWOVERVIEW, ANNOTATIONS,
COLOUR, FEATURES, GROOVY, GROUPS, HEADLESS, JABAWS, DISPLAY, GUI, NEWS,
- SORTBYTREE, USAGESTATS, OPEN, OPENNEW, PROPS, QUESTIONNAIRE, SETPROP,
+ SORTBYTREE, USAGESTATS, APPEND, OPEN, PROPS, QUESTIONNAIRE, SETPROP,
TREE, VDOC, VSESS, OUTPUT, OUTPUTTYPE, SSANNOTATIONS, NOTEMPFAC, TEMPFAC,
TITLE, PAEMATRIX, WRAP, NOSTRUCTURE, STRUCTURE, STRUCTUREVIEWER, IMAGE,
QUIT, CLOSE, DEBUG("d"), QUIET("q"), ARGFILE, INCREMENT, NPP("n++"),
// expects a string value
SORTBYTREE.setOptions(true, Opt.BOOLEAN);
USAGESTATS.setOptions(true, Opt.BOOLEAN);
- OPEN.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
+ APPEND.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
Opt.ALLOWSUBSTITUTIONS);
- OPENNEW.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
+ OPEN.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
Opt.ALLOWSUBSTITUTIONS);
PROPS.setOptions(Opt.STRING, Opt.BOOTSTRAP);
QUESTIONNAIRE.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP);
// the substitution string used to use the defaultLinkedIdCounter
private static final String DEFAULTLINKEDIDCOUNTER = "{}";
- // the counter added to the default linked id prefix
- private int opennewLinkedIdCounter = 0;
+ // the counter added to the default linked id prefix. NOW using
+ // linkedIdAutoCounter
+ // private int openLinkedIdCounter = 0;
- // the linked id prefix used for --opennew files
- protected static final String OPENNEWLINKEDIDPREFIX = "OPENNEW:";
+ // the linked id prefix used for --open files. NOW the same as DEFAULT
+ protected static final String OPENLINKEDIDPREFIX = DEFAULTLINKEDIDPREFIX;
// the counter used for {n} substitutions
private int linkedIdAutoCounter = 0;
// the linked id substitution string used to use the idCounter
private static final String LINKEDIDAUTOCOUNTER = "{n}";
- // the linked id substitution string used to use the base filename of --open
- // or --opennew
+ // the linked id substitution string used to use the base filename of --append
+ // or --open
private static final String LINKEDIDBASENAME = "{basename}";
- // the linked id substitution string used to use the dir path of --open
- // or --opennew
+ // the linked id substitution string used to use the dir path of --append
+ // or --open
private static final String LINKEDIDDIRNAME = "{dirname}";
// the current argfile
// Make a mutable new ArrayList so that shell globbing parser works.
// (When shell file globbing is used, there are a sequence of non-Arg
// arguments (which are the expanded globbed filenames) that need to be
- // consumed by the --open/--argfile/etc Arg which is most easily done by
+ // consumed by the --append/--argfile/etc Arg which is most easily done by
// removing these filenames from the list one at a time. This can't be done
// with an ArrayList made with only Arrays.asList(String[] args). )
this(new ArrayList<>(Arrays.asList(args)), initsubstitutions);
if (openEachInitialFilenames && !arg.startsWith(DOUBLEDASH)
&& !arg.startsWith("-") && new File(arg).exists())
{
- arg = Arg.OPENNEW.argString();
+ arg = Arg.OPEN.argString();
}
else
{
{
if (linkedId == null)
{
- if (a == Arg.OPENNEW)
+ if (a == Arg.OPEN)
{
- // use the next default prefixed OPENNEWLINKEDID
- linkedId = new StringBuilder(OPENNEWLINKEDIDPREFIX)
- .append(Integer.toString(opennewLinkedIdCounter))
+ // use the next default prefixed OPENLINKEDID
+ // NOW using the linkedIdAutoCounter
+ defaultLinkedIdCounter++;
+ linkedId = new StringBuilder(OPENLINKEDIDPREFIX)
+ .append(Integer.toString(defaultLinkedIdCounter))
.toString();
- opennewLinkedIdCounter++;
}
else
{
/**
* A helper class to keep an index of argument position with argument values
*/
-public class ArgValue
+public class ArgValue implements Comparable<ArgValue>
{
+ private Arg arg;
+
private int argIndex;
private String value;
private SubVals subVals;
- protected ArgValue(SubVals sv, String content, int argIndex)
+ protected ArgValue(Arg a, SubVals sv, String content, int argIndex)
{
+ this.arg = a;
this.value = content;
this.argIndex = argIndex;
this.subVals = sv == null ? new SubVals("") : sv;
}
- protected ArgValue(String value, int argIndex)
+ protected ArgValue(Arg a, String value, int argIndex)
{
+ this.arg = a;
this.argIndex = argIndex;
this.subVals = new SubVals(value);
this.value = getSubVals().getContent();
}
+ public Arg getArg()
+ {
+ return arg;
+ }
+
public String getValue()
{
return value;
{
this.subVals.put(key, val);
}
+
+ @Override
+ public int compareTo(ArgValue o)
+ {
+ return this.getArgIndex() - o.getArgIndex();
+ }
}
\ No newline at end of file
protected void addValue(String val, int argIndex)
{
- addArgValue(new ArgValue(val, argIndex));
+ addArgValue(new ArgValue(arg(), val, argIndex));
}
protected void addValue(SubVals sv, String content, int argIndex)
{
- addArgValue(new ArgValue(sv, content, argIndex));
+ addArgValue(new ArgValue(arg(), sv, content, argIndex));
}
protected void addArgValue(ArgValue av)
}
/*
- * This method returns the basename of the first --open or --opennew value.
+ * This method returns the basename of the first --append or --open value.
* Used primarily for substitutions in output filenames.
*/
public String getBasename()
}
/*
- * This method returns the dirname of the first --open or --opennew value.
+ * This method returns the dirname of the first --append or --open value.
* Used primarily for substitutions in output filenames.
*/
public String getDirname()
public String getDirOrBasename(boolean dirname)
{
String filename = null;
+ String appendVal = getValue(Arg.APPEND);
String openVal = getValue(Arg.OPEN);
- String opennewVal = getValue(Arg.OPENNEW);
- if (openVal != null)
+ if (appendVal != null)
+ filename = appendVal;
+ if (filename == null && openVal != null)
filename = openVal;
- if (filename == null && opennewVal != null)
- filename = opennewVal;
if (filename == null)
return null;
}
/*
- * This method returns the basename of the first --open or --opennew value.
+ * This method returns the basename of the first --append or --open value.
* Used primarily for substitutions in output filenames.
*/
public static String getBasename(File file)
}
/*
- * This method returns the dirname of the first --open or --opennew value.
+ * This method returns the dirname of the first --append or --open value.
* Used primarily for substitutions in output filenames.
*/
public static String getDirname(File file)
Assert.assertEquals(cmds.argsWereParsed(), cmdArgs,
"Overall command parse and operation is false");
- Assert.assertEquals(Desktop.getAlignFrames().length, numFrames);
+ Assert.assertEquals(Desktop.getAlignFrames().length, numFrames,
+ "Wrong number of AlignFrames");
if (sequences != null)
{
{ testfiles + "/dir1/test1.png", testfiles + "/dir2/test1.png" } },
{ "--argfile=" + testfiles + "/dir*/argfile.txt", new String[]
{ testfiles + "/dir1/test1.png", testfiles + "/dir2/test1.png" } },
- { "--initsubstitutions --open examples/uniref50.fa --image "
+ { "--initsubstitutions --append examples/uniref50.fa --image "
+ testfiles + "/{basename}.png",
new String[]
{ testfiles + "/uniref50.png" } },
- { "--open examples/uniref50.fa --image " + testfiles
+ { "--append examples/uniref50.fa --image " + testfiles
+ "/{basename}.png",
new String[]
{ testfiles + "/{basename}.png" } } };
String[] t2 = new String[] { "TEST2" };
String[] t3 = new String[] { "TEST3" };
return new Object[][] {
- { "--open=examples/uniref50.fa", true, 1, someUniref50Seqs },
- { "--open examples/uniref50.fa", true, 1, someUniref50Seqs },
- { "--open=examples/uniref50*.fa", true, 1, someUniref50Seqs },
+ /*
+ */
+ { "--append=examples/uniref50.fa", true, 1, someUniref50Seqs },
+ { "--append examples/uniref50.fa", true, 1, someUniref50Seqs },
+ { "--append=examples/uniref50*.fa", true, 1, someUniref50Seqs },
// NOTE we cannot use shell expansion in tests, so list all files!
- { "--open examples/uniref50.fa examples/uniref50_mz.fa", true, 1,
+ { "--append examples/uniref50.fa examples/uniref50_mz.fa", true, 1,
someUniref50Seqs },
- { "--open=[new]examples/uniref50*.fa", true, 2, someUniref50Seqs },
- { "--opennew=examples/uniref50*.fa", true, 2, someUniref50Seqs },
+ { "--append=[new]examples/uniref50*.fa", true, 2,
+ someUniref50Seqs },
+ { "--open=examples/uniref50*.fa", true, 2, someUniref50Seqs },
{ "examples/uniref50.fa", true, 1, someUniref50Seqs },
{ "examples/uniref50.fa " + testfiles + "/test1.fa", true, 2,
ArrayUtils.concatArrays(someUniref50Seqs, t1) },
{ "examples/uniref50.fa " + testfiles + "/test1.fa", true, 2, t1 },
{ "--argfile=" + testfiles + "/argfile0.txt", true, 1,
ArrayUtils.concatArrays(t1, t3) },
- { "--argfile=" + testfiles + "/argfile*.txt", true, 4,
+ { "--argfile=" + testfiles + "/argfile*.txt", true, 5,
ArrayUtils.concatArrays(t1, t2, t3) },
{ "--argfile=" + testfiles + "/argfile.autocounter", true, 3,
ArrayUtils.concatArrays(t1, t2) } };
+
}
public static boolean lookForSequenceName(String sequenceName)
int viewerNum,
String propsFile
*/
- return new Object[][] { { "--nonews --nosplash --debug "
- + "--open=examples/uniref50.fa " + "--colour=gecos:flower "
- + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
- + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
- + "--props=test/jalview/bin/commandsTest2.jvprops1 ",
- 15, 7, 1 },
- { "--nonews --nosplash --debug " + "--open=examples/uniref50.fa "
+ return new Object[][] {
+ //
+ /*
+ */
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ + "--colour=gecos:flower "
+ + "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ + "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ + "--props=test/jalview/bin/commandsTest2.jvprops1 ",
+ 15, 7, 1 },
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ "--colour=gecos:flower "
+ "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ "--props=test/jalview/bin/commandsTest2.jvprops2 ",
15, 4, 1 },
- { "--nonews --nosplash --debug " + "--open=examples/uniref50.fa "
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ "--colour=gecos:flower "
+ "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ "--nossannotations "
+ "--props=test/jalview/bin/commandsTest2.jvprops1 ",
15, 4, 1 },
- { "--nonews --nosplash --debug " + "--open=examples/uniref50.fa "
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ "--colour=gecos:flower "
+ "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ "--noannotations "
+ "--props=test/jalview/bin/commandsTest2.jvprops1 ",
15, 3, 1 },
- { "--nonews --nosplash --debug " + "--open=examples/uniref50.fa "
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ "--colour=gecos:flower "
+ "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
+ "--noannotations " + "--nossannotations "
+ "--props=test/jalview/bin/commandsTest2.jvprops1 ",
15, 0, 1 },
- { "--nonews --nosplash --debug " + "--open=examples/uniref50.fa "
+ { "--nonews --nosplash --debug " + "--append=examples/uniref50.fa "
+ "--colour=gecos:flower "
+ "--structure=[seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.cif "
+ "--paematrix=examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json "
public void parseAutoIndexAndSubstitutionsTest(String commandLineArgs,
String linkedId, Arg a, String filename)
{
- // { "--open=filename0 --increment --open=filename1", "JALVIEW:1", Arg.OPEN,
- // "filename1" },
+ // { "--append=filename0 --increment --append=filename1", "JALVIEW:1",
+ // Arg.OPEN, "filename1" },
String[] args = commandLineArgs.split("\\s+");
ArgParser argparser = new ArgParser(args);
ArgValuesMap avm = argparser.linkedArgs(linkedId);
BootstrapArgs b = BootstrapArgs.getBootstrapArgs(args);
Assert.assertTrue(b.contains(a));
- Assert.assertFalse(b.contains(Arg.OPEN));
+ Assert.assertFalse(b.contains(Arg.APPEND));
if (a == Arg.PROPS)
{
Properties bP = Cache.bootstrapProperties(b.get(Arg.PROPS));
public Object[][] argLines()
{
return new Object[][] { {
- "--open=test/jalview/bin/argparser/testfiles/test1.fa --props=test/jalview/bin/argparser/testfiles/testProps.jvprops",
+ "--append=test/jalview/bin/argparser/testfiles/test1.fa --props=test/jalview/bin/argparser/testfiles/testProps.jvprops",
Arg.PROPS, "true" },
- { "--debug --open=test/jalview/bin/argparser/testfiles/test1.fa",
+ { "--debug --append=test/jalview/bin/argparser/testfiles/test1.fa",
Arg.DEBUG, null },
- { "--open=test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ { "--append=test/jalview/bin/argparser/testfiles/test1.fa --headless",
Arg.HEADLESS, null },
{ "--argfile test/jalview/bin/argparser/testfiles/argfile0.txt",
public Object[][] argSubValsAndLinkedIds()
{
return new Object[][] { {
- "--debug --open=[hi]test/jalview/bin/argparser/testfiles/test1.fa",
- "JALVIEW:0", Arg.OPEN, "hi", "true", true },
- { "--open[linkedId1]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId1", Arg.OPEN, "new", "true", true },
- { "--open[linkedId2]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId2", Arg.OPEN, "hello", "world", true },
- { "--open[linkedId3]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId3", Arg.OPEN, "GETINDEX", "1", true },
- { "--open[linkedId4]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --open[linkedId5]=[notnew;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId5", Arg.OPEN, "new", "true", false },
- { "--open[linkedId5]=[new;hello=worlddomination;1]test/jalview/bin/argparser/testfiles/test1.fa --open[linkedId2]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId5", Arg.OPEN, "hello", "world", false },
- { "--open[linkedId6]=[new;hello=world;0]test/jalview/bin/argparser/testfiles/test1.fa --open[linkedId7]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
- "linkedId7", Arg.OPEN, "GETINDEX", "0", false }, };
+ "--debug --append=[hi]test/jalview/bin/argparser/testfiles/test1.fa",
+ "JALVIEW:0", Arg.APPEND, "hi", "true", true },
+ { "--append[linkedId1]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId1", Arg.APPEND, "new", "true", true },
+ { "--append[linkedId2]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId2", Arg.APPEND, "hello", "world", true },
+ { "--append[linkedId3]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId3", Arg.APPEND, "GETINDEX", "1", true },
+ { "--append[linkedId4]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --append[linkedId5]=[notnew;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId5", Arg.APPEND, "new", "true", false },
+ { "--append[linkedId5]=[new;hello=worlddomination;1]test/jalview/bin/argparser/testfiles/test1.fa --append[linkedId2]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId5", Arg.APPEND, "hello", "world", false },
+ { "--append[linkedId6]=[new;hello=world;0]test/jalview/bin/argparser/testfiles/test1.fa --append[linkedId7]=[new;hello=world;1]test/jalview/bin/argparser/testfiles/test1.fa --headless",
+ "linkedId7", Arg.APPEND, "GETINDEX", "0", false }, };
}
@DataProvider(name = "argAutoIndexAndSubstitutions")
public Object[][] argAutoIndexAndSubstitutions()
{
- return new Object[][] { { "--open=filename0 --open=filename1",
- "JALVIEW:0", Arg.OPEN, "filename0" },
- { "--open=filename0 --increment --open=filename1", "JALVIEW:1",
- Arg.OPEN, "filename1" },
- { "--open=filename0 --increment --increment --open=filename2",
- "JALVIEW:0", Arg.OPEN, "filename0" },
- { "--open=filename0 --increment --increment --open=filename2",
- "JALVIEW:2", Arg.OPEN, "filename2" },
- { "--open[linkA-{n}]=filenameA0 --open[linkA-{++n}]=filenameA1",
+ return new Object[][] {
+ //
+ /*
+ */
+ { "--append=filename0 --append=filename1", "JALVIEW:0", Arg.APPEND,
+ "filename0" },
+ { "--append=filename0 --increment --append=filename1", "JALVIEW:1",
+ Arg.APPEND, "filename1" },
+ { "--append=filename0 --increment --increment --append=filename2",
+ "JALVIEW:0", Arg.APPEND, "filename0" },
+ { "--append=filename0 --increment --increment --append=filename2",
+ "JALVIEW:2", Arg.APPEND, "filename2" },
+ { "--append[linkA-{n}]=filenameA0 --append[linkA-{++n}]=filenameA1",
+ "linkA-0", Arg.APPEND, "filenameA0" },
+ { "--append[linkB-{n}]=filenameB0 --append[linkB-{++n}]=filenameB1",
+ "linkB-1", Arg.APPEND, "filenameB1" },
+ { "--append[linkC-{n}]=filenameC0 --image[linkC-{n}]=outputC{n}.txt",
+ "linkC-0", Arg.IMAGE, "outputC{n}.txt" },
+ { "--append[linkD-{n}]=filenameD0 --substitutions --image[linkD-{n}]=outputD{n}.txt",
+ "linkD-0", Arg.IMAGE, "outputD0.txt" },
+ { "--append[linkE-{n}]=filenameE0 --substitutions --image[linkE-{n}]=output-E{n}.txt --nil[{++n}] --image[linkE-{n}]=outputE{n}.txt",
+ "linkE-0", Arg.IMAGE, "output-E0.txt" },
+ { "--append[linkF-{n}]=filenameF0 --substitutions --image[linkF-{n}]=output-F{n}.txt --nil[{++n}] --image[linkF-{n}]=outputF{n}.txt",
+ "linkF-1", Arg.IMAGE, "outputF1.txt" },
+ { "--append[linkG-{n}]=filenameG0 --substitutions --image[linkG-{n}]=output-G{n}.txt --nil[{++n}] --nosubstitutions --image[linkG-{n}]=outputG{n}.txt",
+ "linkG-1", Arg.IMAGE, "outputG{n}.txt" },
+ { "--append[linkH-{n}]=filenameH0 --substitutions --image[linkH-{n}]=output-H{n}.txt --nil[{++n}] --nosubstitutions --image[linkH-{n}]=outputH{n}.txt",
+ "linkH-0", Arg.IMAGE, "output-H0.txt" },
+ { "--open=filename0 --append=filename1", "JALVIEW:1", Arg.OPEN,
+ "filename0" },
+ { "--open=filename0 --increment --append=filename1", "JALVIEW:2",
+ Arg.APPEND, "filename1" },
+ { "--open=filename0 --increment --increment --append=filename2",
+ "JALVIEW:1", Arg.OPEN, "filename0" },
+ { "--open=filename0 --increment --increment --append=filename2",
+ "JALVIEW:3", Arg.APPEND, "filename2" },
+ { "--open[linkA-{n}]=filenameA0 --append[linkA-{++n}]=filenameA1",
"linkA-0", Arg.OPEN, "filenameA0" },
- { "--open[linkB-{n}]=filenameB0 --open[linkB-{++n}]=filenameB1",
- "linkB-1", Arg.OPEN, "filenameB1" },
+ { "--open[linkB-{n}]=filenameB0 --append[linkB-{++n}]=filenameB1",
+ "linkB-1", Arg.APPEND, "filenameB1" },
{ "--open[linkC-{n}]=filenameC0 --image[linkC-{n}]=outputC{n}.txt",
"linkC-0", Arg.IMAGE, "outputC{n}.txt" },
{ "--open[linkD-{n}]=filenameD0 --substitutions --image[linkD-{n}]=outputD{n}.txt",
{ "--open[linkG-{n}]=filenameG0 --substitutions --image[linkG-{n}]=output-G{n}.txt --nil[{++n}] --nosubstitutions --image[linkG-{n}]=outputG{n}.txt",
"linkG-1", Arg.IMAGE, "outputG{n}.txt" },
{ "--open[linkH-{n}]=filenameH0 --substitutions --image[linkH-{n}]=output-H{n}.txt --nil[{++n}] --nosubstitutions --image[linkH-{n}]=outputH{n}.txt",
- "linkH-0", Arg.IMAGE, "output-H0.txt" }, };
+ "linkH-0", Arg.IMAGE, "output-H0.txt" },
+
+ //
+ };
}
@DataProvider(name = "argFiles")
--open[{++n}]=test/jalview/bin/argparser/testfiles/test2.fa
--colour[{n}]=zappo
--open[{++n}]=test/jalview/bin/argparser/testfiles/test1.fa
---open[{n}]=test/jalview/bin/argparser/testfiles/test2.fa
+--append[{n}]=test/jalview/bin/argparser/testfiles/test2.fa
--colour[{n}]=taylor
--open=test/jalview/bin/argparser/testfiles/test1.fa
---open=test/jalview/bin/argparser/testfiles/test3.fa
+--append=test/jalview/bin/argparser/testfiles/test3.fa
--open[all]=test/jalview/bin/argparser/testfiles/test1.fa
---open[all]=test/jalview/bin/argparser/testfiles/test2.fa
+--append[all]=test/jalview/bin/argparser/testfiles/test2.fa
--open[1]=test/jalview/bin/argparser/testfiles/test1.fa
--open[2]=test/jalview/bin/argparser/testfiles/test2.fa
--substitutions
--increment
---open={argfiledirname}/*.fa
+--append={argfiledirname}/*.fa
--colour=gecos:flower
--image={argfiledirname}/{basename}.png
--close
--substitutions
--increment
---open={argfiledirname}/*.fa
+--append={argfiledirname}/*.fa
--colour=gecos:flower
--image={argfiledirname}/{basename}.png
--close
--substitutions
--increment
---open={argfiledirname}/*.fa
+--append={argfiledirname}/*.fa
--colour=gecos:flower
--image={argfiledirname}/{basename}.png
--close
--nonews
--nosplash
--substitutions
---open=examples/test_fab41.result/sample.a2m
+--append=examples/test_fab41.result/sample.a2m
--annotations
--ssannotations
--colour=gecos:flower
--nonews
--nosplash
--substitutions
---open=examples/test_fab41.result/sample.a2m
+--append=examples/test_fab41.result/sample.a2m
--noannotations
--nossannotations
--colour=gecos:flower