- HELP("h"), CALCULATION, MENUBAR, STATUS, SHOWOVERVIEW, ANNOTATIONS,
- COLOUR, FEATURES, GROOVY, GROUPS, HEADLESS, JABAWS, DISPLAY, GUI, NEWS,
- 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++"),
- SUBSTITUTIONS, INITSUBSTITUTIONS, NIL, SPLASH, SETARGFILE, UNSETARGFILE;
-
- protected static enum Opt
- {
- BOOLEAN, STRING, UNARY, MULTI, LINKED, NODUPLICATEVALUES, BOOTSTRAP,
- GLOB, NOACTION, ALLOWSUBSTITUTIONS, PRIVATE
- }
-
- static
- {
- HELP.setOptions("Display this help message", Opt.UNARY, Opt.BOOTSTRAP);
- CALCULATION.setOptions(true, Opt.BOOLEAN); // default "true" implies only
- // expecting "--nocalculation"
- MENUBAR.setOptions(true, Opt.BOOLEAN);
- STATUS.setOptions(true, Opt.BOOLEAN);
- SHOWOVERVIEW.setOptions(Opt.UNARY, Opt.LINKED);
- ANNOTATIONS.setOptions(Opt.BOOLEAN, Opt.LINKED);
- COLOUR.setOptions(Opt.STRING, Opt.LINKED);
- FEATURES.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI,
- Opt.ALLOWSUBSTITUTIONS);
- GROOVY.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI,
- Opt.ALLOWSUBSTITUTIONS);
- GROUPS.setOptions(Opt.STRING, Opt.LINKED);
- HEADLESS.setOptions(Opt.UNARY, Opt.BOOTSTRAP);
- JABAWS.setOptions(Opt.STRING);
- DISPLAY.setOptions(true, Opt.BOOLEAN);
- GUI.setOptions(true, Opt.BOOLEAN);
- NEWS.setOptions(true, Opt.BOOLEAN, Opt.BOOTSTRAP);
- SPLASH.setOptions(true, Opt.BOOLEAN, Opt.BOOTSTRAP);
- // expects a string value
- SORTBYTREE.setOptions(true, Opt.BOOLEAN);
- USAGESTATS.setOptions(true, Opt.BOOLEAN);
- APPEND.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
- Opt.ALLOWSUBSTITUTIONS);
- OPEN.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
- Opt.ALLOWSUBSTITUTIONS);
- PROPS.setOptions(Opt.STRING, Opt.BOOTSTRAP);
- QUESTIONNAIRE.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP);
- SETPROP.setOptions(Opt.STRING, Opt.MULTI, Opt.BOOTSTRAP);
- TREE.setOptions(Opt.STRING);
-
- VDOC.setOptions(Opt.UNARY);
- VSESS.setOptions(Opt.UNARY);
-
- OUTPUT.setOptions(Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS);
- OUTPUTTYPE.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI);
-
- SSANNOTATIONS.setOptions(Opt.BOOLEAN, Opt.LINKED);
- NOTEMPFAC.setOptions(Opt.UNARY, Opt.LINKED);
- TEMPFAC.setOptions(Opt.STRING, Opt.LINKED);
- TITLE.setOptions(Opt.STRING, Opt.LINKED);
- PAEMATRIX.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI,
- Opt.ALLOWSUBSTITUTIONS);
- NOSTRUCTURE.setOptions(Opt.UNARY, Opt.LINKED);
- STRUCTURE.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI,
- Opt.ALLOWSUBSTITUTIONS);
- STRUCTUREVIEWER.setOptions(Opt.STRING, Opt.LINKED, Opt.MULTI);
- WRAP.setOptions(Opt.BOOLEAN, Opt.LINKED);
- IMAGE.setOptions(Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS);
- QUIT.setOptions(Opt.UNARY);
- CLOSE.setOptions(Opt.UNARY, Opt.LINKED);
- DEBUG.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP);
- QUIET.setOptions(Opt.UNARY, Opt.MULTI, Opt.BOOTSTRAP);
- ARGFILE.setOptions(Opt.STRING, Opt.MULTI, Opt.BOOTSTRAP, Opt.GLOB,
- Opt.ALLOWSUBSTITUTIONS);
- INCREMENT.setOptions(Opt.UNARY, Opt.MULTI, Opt.NOACTION);
- NPP.setOptions(Opt.UNARY, Opt.MULTI, Opt.NOACTION);
- SUBSTITUTIONS.setOptions(Opt.BOOLEAN, Opt.MULTI, Opt.NOACTION);
- INITSUBSTITUTIONS.setOptions(Opt.BOOLEAN, Opt.BOOTSTRAP, Opt.NOACTION);
- NIL.setOptions(Opt.UNARY, Opt.LINKED, Opt.MULTI, Opt.NOACTION);
- SETARGFILE.setOptions(Opt.STRING, Opt.MULTI, Opt.PRIVATE, Opt.NOACTION);
- UNSETARGFILE.setOptions(Opt.MULTI, Opt.PRIVATE, Opt.NOACTION);
- // Opt.BOOTSTRAP args are parsed (not linked with no SubVals so using a
- // simplified parser, see jalview.bin.argparser.BootstrapArgs)
- // before a full parse of arguments and so can be accessible at an earlier
- // stage to (e.g.) set debug log level, provide a props file (that might set
- // log level), run headlessly, read an argfile instead of other args.
+
+ // Initialising arguments (BOOTSTRAP)
+ HELP(Type.HELP, "h", "Display basic help", Opt.UNARY, Opt.BOOTSTRAP,
+ Opt.HASTYPE, Opt.MULTI),
+ /*
+ * Other --help-type Args will be added by the static block.
+ */
+ VERSION(Type.CONFIG, "v",
+ "Display the version of "
+ + ChannelProperties.getProperty("app_name"),
+ Opt.UNARY, Opt.BOOTSTRAP),
+ HEADLESS(Type.CONFIG,
+ "Run Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed.",
+ Opt.UNARY, Opt.BOOTSTRAP),
+ JABAWS(Type.CONFIG, "Set a different URL to connect to a JABAWS server.",
+ Opt.STRING, Opt.BOOTSTRAP),
+ NEWS(Type.CONFIG, "Show (or don't show) the news feed.", true,
+ Opt.BOOLEAN, Opt.BOOTSTRAP),
+ SPLASH(Type.CONFIG,
+ "Show (or don't show) the About Jalview splash screen.", true,
+ Opt.BOOLEAN, Opt.BOOTSTRAP),
+ QUESTIONNAIRE(Type.CONFIG,
+ "Show (or don't show) the questionnaire if one is available.",
+ true, Opt.BOOLEAN, Opt.BOOTSTRAP),
+ USAGESTATS(Type.CONFIG,
+ "Send (or don't send) initial launch usage stats.", true,
+ Opt.BOOLEAN, Opt.BOOTSTRAP),
+ WEBSERVICEDISCOVERY(Type.CONFIG,
+ "Attempt (or don't attempt) to connect to JABAWS web services.",
+ true, Opt.BOOLEAN, Opt.BOOTSTRAP),
+ PROPS(Type.CONFIG,
+ "Use a file as the preferences file instead of the usual ~/"
+ + ChannelProperties.getProperty("preferences.filename")
+ + " file.",
+ Opt.STRING, Opt.BOOTSTRAP),
+ DEBUG(Type.CONFIG, "d", "Start Jalview in debug log level.", Opt.BOOLEAN,
+ Opt.BOOTSTRAP),
+ TRACE(Type.CONFIG, "Start Jalview in trace log level.", Opt.BOOLEAN,
+ Opt.BOOTSTRAP, Opt.SECRET),
+ QUIET(Type.CONFIG, "q",
+ "Stop all output to STDOUT (after the Java Virtual Machine has started). Use ‑‑quiet a second time to stop all output to STDERR.",
+ Opt.UNARY, Opt.MULTI, Opt.BOOTSTRAP),
+ INITSUBSTITUTIONS(Type.CONFIG,
+ "Set ‑‑substitutions to be initially enabled (or initially disabled).",
+ true, Opt.BOOLEAN, Opt.BOOTSTRAP, Opt.NOACTION, Opt.SECRET),
+
+ // Opening an alignment
+ OPEN(Type.OPENING,
+ "Opens one or more alignment files or URLs in new alignment windows.",
+ Opt.STRING, Opt.LINKED, Opt.INCREMENTDEFAULTCOUNTER, Opt.MULTI,
+ Opt.GLOB, Opt.ALLOWSUBSTITUTIONS, Opt.INPUT, Opt.STORED,
+ Opt.PRIMARY),
+ APPEND(Type.OPENING,
+ "Appends one or more alignment files or URLs to the open alignment window (or opens a new alignment if none already open).",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.GLOB,
+ Opt.ALLOWSUBSTITUTIONS, Opt.INPUT, Opt.PRIMARY),
+ TITLE(Type.OPENING,
+ "Specifies the title for the open alignment window as string.",
+ Opt.STRING, Opt.LINKED),
+ COLOUR(Type.OPENING, "color", // being a bit soft on the Americans!
+ "Applies the colour scheme to the open alignment window. Valid values are:\n"
+ + "clustal,\n" + "blosum62,\n" + "pc-identity,\n"
+ + "zappo,\n" + "taylor,\n" + "gecos-flower,\n"
+ + "gecos-blossom,\n" + "gecos-sunset,\n"
+ + "gecos-ocean,\n" + "hydrophobic,\n"
+ + "helix-propensity,\n" + "strand-propensity,\n"
+ + "turn-propensity,\n" + "buried-index,\n"
+ + "nucleotide,\n" + "nucleotide-ambiguity,\n"
+ + "purine-pyrimidine,\n" + "rna-helices,\n"
+ + "t-coffee-scores,\n" + "sequence-id.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ FEATURES(Type.OPENING, "Add a feature file or URL to the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
+ TREE(Type.OPENING, "Add a tree file or URL to the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
+ SORTBYTREE(Type.OPENING,
+ "Enforces sorting (or not sorting) the open alignment in the order of an attached phylogenetic tree.",
+ true, Opt.LINKED, Opt.BOOLEAN, Opt.ALLOWALL),
+ ANNOTATIONS(Type.OPENING,
+ "Add an annotations file or URL to the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
+ SHOWANNOTATIONS(Type.OPENING,
+ "Enforces showing (or not showing) alignment annotations.",
+ Opt.BOOLEAN, Opt.LINKED, Opt.ALLOWALL),
+ WRAP(Type.OPENING,
+ "Enforces wrapped (or not wrapped) alignment formatting.",
+ Opt.BOOLEAN, Opt.LINKED, Opt.ALLOWALL),
+ NOSTRUCTURE(Type.OPENING,
+ "Do not open or process any 3D structure in the ‑‑open or ‑‑append files.",
+ Opt.UNARY, Opt.LINKED, Opt.ALLOWALL),
+
+ // Adding a 3D structure
+ STRUCTURE(Type.STRUCTURE,
+ "Load a structure file or URL associated with a sequence in the open alignment.\n"
+ + "The sequence to be associated with can be specified with a following --seqid argument, or the subval modifier seqid=ID can be used. A subval INDEX can also be used to specify the INDEX-th sequence in the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS,
+ Opt.PRIMARY),
+ SEQID(Type.STRUCTURE,
+ "Specify the sequence name for the preceding --structure to be associated with.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
+ PAEMATRIX(Type.STRUCTURE,
+ "Add a PAE json matrix file to the preceding --structure.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS),
+ TEMPFAC(Type.STRUCTURE,
+ "Set the type of temperature factor. Possible values are:\n"
+ + "default,\n" + "plddt.",
+ Opt.STRING, Opt.LINKED),
+ STRUCTUREVIEWER(Type.STRUCTURE,
+ "Set the structure viewer to use to open the 3D structure file specified in previous --structure to name. Possible values of name are:\n"
+ + "none,\n" + "jmol,\n" + "chimera,\n" + "chimerax,\n"
+ + "pymol.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI),
+ STRUCTUREIMAGE(Type.STRUCTURE,
+ "Export an image of a 3D structure opened in JMOL", Opt.STRING,
+ Opt.LINKED, Opt.MULTI),
+ NOTEMPFAC(Type.STRUCTURE,
+ "Do not show the temperature factor annotation for the preceding --structure.",
+ Opt.UNARY, Opt.LINKED, Opt.ALLOWALL, Opt.SECRET), // keep this secret
+ // until it
+ // works!
+ SHOWSSANNOTATIONS(Type.STRUCTURE, null, Opt.BOOLEAN, Opt.LINKED,
+ Opt.ALLOWALL),
+
+ // Outputting files
+ IMAGE(Type.IMAGE,
+ "Output an image of the open alignment window. Format is specified by the subval modifier, a following --type argument or guessed from the file extension. Valid formats/extensions are:\n"
+ + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS, Opt.ALLOWALL,
+ Opt.REQUIREINPUT, Opt.OUTPUT, Opt.PRIMARY),
+ TYPE(Type.IMAGE,
+ "Set the image format for the preceding --image to name. Valid values for name are: svg,\n"
+ + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ TEXTRENDERER(Type.IMAGE,
+ "Sets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Possible values for name are:\n"
+ + "text,\n" + "lineart.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ SCALE(Type.IMAGE,
+ "Sets a scaling for bitmap image format (PNG). Should be given as a floating point number. If used in conjunction with --width and --height then the smallest scaling will be used (scale, width and height provide bounds for the image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ WIDTH(Type.IMAGE,
+ "Sets a width for bitmap image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --scale and --height then the smallest scaling will be used (scale, width and height provide bounds for the image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ HEIGHT(Type.IMAGE,
+ "Sets a height for bitmap image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --scale and --width then the smallest scaling will be used (scale, width and height provide bounds for the image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ OUTPUT(Type.OUTPUT,
+ "Export the open alignment to file filename. The format name is specified by the subval modifier format=name, a following --format name argument or guessed from the file extension. Valid format names (and file extensions) are:\n"
+ + "fasta (fa, fasta, mfa, fastq),\n" + "pfam (pfam),\n"
+ + "stockholm (sto, stk),\n" + "pir (pir),\n"
+ + "blc (blc),\n" + "amsa (amsa),\n" + "json (json),\n"
+ + "pileup (pileup),\n" + "msf (msf),\n"
+ + "clustal (aln),\n" + "phylip (phy),\n"
+ + "jalview (jvp, jar).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWSUBSTITUTIONS, Opt.ALLOWALL,
+ Opt.REQUIREINPUT, Opt.OUTPUT, Opt.PRIMARY),
+ FORMAT(Type.OUTPUT,
+ "Sets the format for the preceding --output file. Valid formats are:\n"
+ + "fasta,\n" + "pfam,\n" + "stockholm,\n" + "pir,\n"
+ + "blc,\n" + "amsa,\n" + "json,\n" + "pileup,\n"
+ + "msf,\n" + "clustal,\n" + "phylip,\n" + "jalview.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWALL),
+ GROOVY(Type.PROCESS,
+ "Process a groovy script in the file for the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTI, Opt.ALLOWSUBSTITUTIONS,
+ Opt.ALLOWALL),
+ BACKUPS(Type.OUTPUT,
+ "Enable (or disable) writing backup files when saving an ‑‑output file. This applies to the current open alignment. To apply to all ‑‑output and ‑‑image files, use after ‑‑all.",
+ true, Opt.BOOLEAN, Opt.LINKED, Opt.ALLOWALL),
+ OVERWRITE(Type.OUTPUT,
+ "Enable (or disable) overwriting of output files without backups enabled. This applies to the current open alignment. To apply to all ‑‑output and ‑‑image files, use after ‑‑all.",
+ Opt.BOOLEAN, Opt.LINKED, Opt.ALLOWALL),
+ CLOSE(Type.OPENING,
+ "Close the current open alignment window. This occurs after other output arguments. This applies to the current open alignment. To apply to all ‑‑output and ‑‑image files, use after ‑‑all.",
+ Opt.UNARY, Opt.LINKED, Opt.ALLOWALL),
+
+ // controlling flow of arguments
+ NEW(Type.FLOW,
+ "Move on to a new alignment window. This will ensure --append will start a new alignment window and other linked arguments will apply to the new alignment window.",
+ Opt.UNARY, Opt.MULTI, Opt.NOACTION, Opt.INCREMENTDEFAULTCOUNTER),
+ SUBSTITUTIONS(Type.FLOW,
+ "The following argument values allow (or don't allow) subsituting filename parts. This is initially true. Valid substitutions are {basename} - the filename-without-extension of the currently --opened file (or first --appended file),\n"
+ + "{dirname}, - the directory (folder) name of the currently --opened file (or first --appended file),\n"
+ + "{argfilebasename} - the filename-without-extension of the current --argfile,\n"
+ + "{argfiledirname} - the directory (folder) name of the current --argfile,\n"
+ + "{n} - the value of the index counter (starting at 0).\n"
+ + "{++n} - increase and substitute the value of the index counter,\n"
+ + "{} - the value of the current alignment window default index.",
+ true, Opt.BOOLEAN, Opt.MULTI, Opt.NOACTION),
+ ARGFILE(Type.FLOW,
+ "Open one or more files filename and read, line-by-line, as arguments to Jalview.\n"
+ + "Values in an argfile should be given with an equals sign (\"=\") separator with no spaces.\n"
+ + "Note that if you use one or more --argfile arguments then all other non-initialising arguments will be ignored.",
+ Opt.STRING, Opt.MULTI, Opt.BOOTSTRAP, Opt.GLOB,
+ Opt.ALLOWSUBSTITUTIONS),
+ NPP(Type.FLOW, "n++",
+ "Increase the index counter used in argument value substitutions.",
+ Opt.UNARY, Opt.MULTI, Opt.NOACTION),
+ ALL(Type.FLOW,
+ "Apply the following output arguments to all sets of linked arguments.",
+ Opt.BOOLEAN, Opt.MULTI, Opt.NOACTION),
+ OPENED(Type.FLOW,
+ "Apply the following output arguments to all of the last --open'ed set of linked arguments.",
+ Opt.BOOLEAN, Opt.MULTI, Opt.NOACTION),
+ QUIT(Type.FLOW,
+ "After all files have been opened, appended and output, quit Jalview. In ‑‑headless mode this already happens.",
+ Opt.UNARY),
+
+ // secret options
+ TESTOUTPUT(Type.CONFIG,
+ "Allow specific stdout information. For testing purposes only.",
+ Opt.UNARY, Opt.BOOTSTRAP, Opt.SECRET), // do not show this to the user
+ SETPROP(Type.CONFIG, "Set an individual Java System property.",
+ Opt.STRING, Opt.MULTI, Opt.BOOTSTRAP, Opt.SECRET), // not in use yet
+ NIL(Type.FLOW,
+ "This argument does nothing on its own, but can be used with linkedIds.",
+ Opt.UNARY, Opt.LINKED, Opt.MULTI, Opt.NOACTION, Opt.SECRET),
+
+ // private options (inserted during arg processing)
+ SETARGFILE(Type.FLOW,
+ "Sets the current value of the argfilename. Inserted before argfilecontents.",
+ Opt.UNARY, Opt.LINKED, Opt.STRING, Opt.MULTI, Opt.PRIVATE,
+ Opt.NOACTION),
+ UNSETARGFILE(Type.FLOW,
+ "Unsets the current value of the argfilename. Inserted after argfile contents.",
+ Opt.UNARY, Opt.LINKED, Opt.MULTI, Opt.PRIVATE, Opt.NOACTION),
+
+ // these last two have no purpose in the normal Jalview application but are
+ // used by jalview.bin.Launcher to set memory settings. They are not used by
+ // argparser but are here for Usage statement reasons.
+ JVMMEMPC(Type.CONFIG,
+ "Limit maximum heap size (memory) to PERCENT% of total physical memory detected. This defaults to 90 if total physical memory can be detected.\n"
+ + "The equals sign (\"=\") separator must be used with no spaces.",
+ Opt.NOACTION, Opt.BOOTSTRAP, Opt.STRING, Opt.LAST),
+ JVMMEMMAX(Type.CONFIG,
+ "Limit maximum heap size (memory) to MAXMEMORY. MAXMEMORY can be specified in bytes, kilobytes(k), megabytes(m), gigabytes(g) or if you're lucky enough, terabytes(t). This defaults to 32g if total physical memory can be detected, or to 8g if total physical memory cannot be detected.\n"
+ + "The equals sign (\"=\") separator must be used with no spaces.",
+ Opt.NOACTION, Opt.BOOTSTRAP, Opt.STRING, Opt.LAST),
+
+ ;
+
+ public static enum Opt
+ {
+ BOOLEAN, // This Arg can be specified as --arg or --noarg to give true or
+ // false. A default can be given with setOptions(bool, Opt....).
+ // Use ArgParser.isSet(Arg) to see if this arg was not specified.
+ STRING, // This Arg can accept a value either through --arg=value or --arg
+ // value.
+ UNARY, // This Arg is a boolean value, true if present, false if not. Like
+ // BOOLEAN but without the --noarg option.
+ MULTI, // This Arg can be specified multiple times. Multiple values are
+ // stored in the ArgValuesMap (along with their positional index) for
+ // each linkedId.
+ LINKED, // This Arg can be linked to others through a --arg[linkedId] or
+ // --arg[linkedId]=value. If no linkedId is specified then the
+ // current default linkedId will be used.
+ NODUPLICATEVALUES, // This Arg can only have one value (per linkedId). The
+ // first value will be used and subsequent values ignored
+ // with a warning.
+ BOOTSTRAP, // This Arg value(s) can be determined at an earlier stage than
+ // non-BOOTSTRAP Args. Substitutions do not happen in BOOTSTRAP
+ // Args and they cannot be linked or contain SubVals. See
+ // jalview.bin.argparser.BootstrapArgs.
+ GLOB, // This Arg can expand wildcard filename "globs" (e.g.
+ // path/*/filename*). If the Arg value is given as --arg filename*
+ // then the shell will have expanded the glob already, but if
+ // specified as --arg=filename* then the Java glob expansion method
+ // will be used (see FileUtils.getFilenamesFromGlob()). Note that this
+ // might be different from the shell expansion rules.
+ NOACTION, // This Arg does not perform a data task, usually used to control
+ // flow in ArgParser.parse(args).
+ ALLOWSUBSTITUTIONS, // This Arg allows substitutions in its linkedId,
+ // SubVals and values.
+ PRIVATE, // This Arg is used internally, and cannot be specified by the
+ // user.
+ SECRET, // This Arg is used by development processes and although it can be
+ // set by the user, it is not displayed to the user.
+ ALLOWALL, // This Arg can use the '*' linkedId to apply to all known
+ // linkedIds
+ INCREMENTDEFAULTCOUNTER, // If an Arg has this option and the default
+ // linkedId is used, the defaultLinkedIdCounter is
+ // incremented *first*.
+ INPUT, // This Arg counts as an input for REQUIREINPUT
+ REQUIREINPUT, // This Arg can only be applied via --all if there is an
+ // input (i.e. --open or --append)
+ OUTPUT, // This Arg provides an output filename. With Opt.ALLOWALL *.ext is
+ // shorthand for --all --output={basename}.ext
+ STORED, // This Arg resets and creates a new set of "opened" linkedIds
+ HELP, // This Arg is a --help type arg
+ PRIMARY, // This Arg is the main Arg for its type
+ HASTYPE, // This Arg can have an Arg.Type assigned to it (and no value)
+ FIRST, // Move this arg to the first in usage statement (within type)
+ LAST, // Move this arg to the end in usage statement (within type)
+ }
+
+ public static enum Type
+ {
+ // Type restricts argument to certain usage output
+ HELP, // --help
+ CONFIG("arguments used to configure "
+ + ChannelProperties.getProperty("app_name") + " from startup"),
+ OPENING("arguments used to open and format alignments"),
+ STRUCTURE("arguments used to add and format 3D structure data"),
+ PROCESS("arguments used to process an alignment once opened"),
+ OUTPUT("arguments used to save data from a processed alignment"),
+ IMAGE("arguments used to export an image of an alignment"),
+ FLOW("arguments that control processing of the other arguments"), //
+ ALL("all arguments"), // mostly just a place-holder for --help-all
+ NONE, // mostly a place-holder for --help
+ INVALID;
+
+ private String description;
+
+ private Type()
+ {
+ description = null;
+ }
+
+ private Type(String description)
+ {
+ this.description = description;
+ }
+
+ public String description()
+ {
+ return description;
+ }