+ // 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.ALLOWMULTIID,
+ Opt.REQUIREINPUT, Opt.OUTPUTFILE, Opt.PRIMARY),
+ TYPE(Type.IMAGE,
+ "Set the image format for the preceding --image. Valid values are:\n"
+ + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ 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 are:\n"
+ + "text,\n" + "lineart.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+ STRUCTUREIMAGE(Type.STRUCTUREIMAGE,
+ "Export an image of a 3D structure opened in JMOL", Opt.STRING,
+ Opt.LINKED, Opt.MULTIVALUE, Opt.OUTPUTFILE, Opt.ALLOWMULTIID),
+ STRUCTUREIMAGETYPE(Type.STRUCTUREIMAGE,
+ "Set the structure image format for the preceding --structureimage. Valid values are:\n"
+ + "svg,\n" + "png,\n" + "eps,\n" + "html,\n" + "biojs.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ STRUCTUREIMAGETEXTRENDERER(Type.STRUCTUREIMAGE,
+ "Sets whether text in a vector structure image format (SVG, EPS) should be rendered as text or vector line-art. Possible values are:\n"
+ + "text,\n" + "lineart.",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ STRUCTUREIMAGESCALE(Type.STRUCTUREIMAGE,
+ "Sets a scaling for bitmap structure image format (PNG). Should be given as a floating point number. If used in conjunction with --structureimagewidth and --structureimageheight then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ STRUCTUREIMAGEWIDTH(Type.STRUCTUREIMAGE,
+ "Sets a width for bitmap structure image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --structureimagescale and --structureimageheight then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+ STRUCTUREIMAGEHEIGHT(Type.STRUCTUREIMAGE,
+ "Sets a height for bitmap structure image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. If used in conjunction with --structureimagescale and --structureimagewidth then the smallest scaling will be used (structureimagescale, structureimagewidth and structureimageheight provide bounds for the structure image).",
+ Opt.STRING, Opt.LINKED, Opt.ALLOWMULTIID),
+
+ 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.ALLOWMULTIID,
+ Opt.REQUIREINPUT, Opt.OUTPUTFILE, Opt.STDOUT, 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.ALLOWMULTIID),
+ GROOVY(Type.PROCESS,
+ "Process a groovy script in the file for the open alignment.",
+ Opt.STRING, Opt.LINKED, Opt.MULTIVALUE, Opt.ALLOWSUBSTITUTIONS,
+ Opt.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+ 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.ALLOWMULTIID),
+
+ // 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.MULTIVALUE, 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:\n"
+ + "{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.MULTIVALUE, 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.MULTIVALUE, Opt.BOOTSTRAP, Opt.GLOB,
+ Opt.ALLOWSUBSTITUTIONS),
+ NPP(Type.FLOW, "n++",
+ "Increase the index counter used in argument value substitutions.",
+ Opt.UNARY, Opt.MULTIVALUE, Opt.NOACTION),
+ ALL(Type.FLOW,
+ "Apply the following output arguments to all sets of linked arguments.",
+ Opt.BOOLEAN, Opt.MULTIVALUE, Opt.NOACTION),
+ OPENED(Type.FLOW,
+ "Apply the following output arguments to all of the last --open'ed set of linked arguments.",
+ Opt.BOOLEAN, Opt.MULTIVALUE, Opt.NOACTION),
+ QUIT(Type.FLOW,
+ "After all files have been opened, appended and output, quit Jalview. In ‑‑headless mode this already happens.",
+ Opt.UNARY),
+ NOQUIT(Type.FLOW,
+ "Secret arg to not quit after --headless mode for tests",
+ Opt.UNARY, Opt.SECRET),
+ ALLSTRUCTURES(Type.FLOW,
+ "Apply the following 3D structure formatting arguments to all structures within the open alignment.",
+ Opt.BOOLEAN, Opt.MULTIVALUE, Opt.NOACTION),
+
+ // 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.MULTIVALUE, 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.MULTIVALUE, 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.MULTIVALUE, Opt.PRIVATE,
+ Opt.NOACTION),
+ UNSETARGFILE(Type.FLOW,
+ "Unsets the current value of the argfilename. Inserted after argfile contents.",
+ Opt.UNARY, Opt.LINKED, Opt.MULTIVALUE, 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