From 847c502d6186eb62a30f37f608852e77c67c217f Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 23 May 2023 23:24:30 +0100 Subject: [PATCH] JAL-629 Updated help docs and fixed structure image subvalues --- help/help/help.jhm | 2 +- help/help/helpTOC.xml | 4 +- help/help/html/features/clarguments-advanced.html | 9 +- help/help/html/features/clarguments-argfiles.html | 20 +- help/help/html/features/clarguments-basic.html | 9 +- help/help/html/features/clarguments-intro.html | 88 -- help/help/html/features/clarguments-old.html | 4 +- help/help/html/features/clarguments-reference.html | 803 ++++++++++++++++++ help/help/html/features/clarguments.html | 858 +++----------------- src/jalview/bin/Commands.java | 17 +- 10 files changed, 957 insertions(+), 857 deletions(-) delete mode 100644 help/help/html/features/clarguments-intro.html create mode 100644 help/help/html/features/clarguments-reference.html diff --git a/help/help/help.jhm b/help/help/help.jhm index 0c39a52..a2094f7 100755 --- a/help/help/help.jhm +++ b/help/help/help.jhm @@ -65,10 +65,10 @@ - + diff --git a/help/help/helpTOC.xml b/help/help/helpTOC.xml index f6bb7c7..d7ff3d4 100755 --- a/help/help/helpTOC.xml +++ b/help/help/helpTOC.xml @@ -169,11 +169,11 @@ - - + + diff --git a/help/help/html/features/clarguments-advanced.html b/help/help/html/features/clarguments-advanced.html index db818d8..a235727 100644 --- a/help/help/html/features/clarguments-advanced.html +++ b/help/help/html/features/clarguments-advanced.html @@ -25,15 +25,15 @@

Command Line: advanced usage

- Command Line: summary -
- Command Line: introduction + Command Line: introduction
Command Line: basic usage
Command Line: advanced usage
Command Line: argument files +
+ Command Line: reference


@@ -176,8 +176,7 @@
Continue to Command Line: argument files.
- Return to Command Line: summary. - + Command Line: reference diff --git a/help/help/html/features/clarguments-argfiles.html b/help/help/html/features/clarguments-argfiles.html index f4741ee..5c71d16 100644 --- a/help/help/html/features/clarguments-argfiles.html +++ b/help/help/html/features/clarguments-argfiles.html @@ -25,15 +25,15 @@

Command Line: argument files

- Command Line: summary -
- Command Line: introduction + Command Line: introduction
Command Line: basic usage
Command Line: advanced usage
- Command Line: argument files + Command Line: argument files +
+ Command Line: reference


@@ -58,7 +58,7 @@
Because the argument file is read by the application and not read by the shell, you do not need to escape any values -- all spaces will be read as part of the value until the end of the line.
- You can add comments to a line by starting the line with an octothorpe (hash, pound-sign '#'). + You can add comments to a line by starting the line with an hash (octothorpe, pound-sign '#').
e.g. @@ -117,7 +117,7 @@

- If a "loop" of argument files is detected then Jalview will refuse to play (which is a Good Thing). + If an argument file that has already been read is found in a firther argument file, then Jalview will exit with a warning. This is to avoid loops of argument files.

@@ -131,7 +131,7 @@

Even more substitutions

- When adding values that can use substitutions within argument files, there are two additional substitutions that are made: + When adding values that can use substitutions within argument files, there are two additional substitutions that can be made:
{argfilebasename} - replaced with the base of the filename of the argument file (i.e. without directory path or file extension).
@@ -139,7 +139,7 @@

- Another amusing substitution you can make in argument files is the {n} substitution, combined with an -npp increment at the start (or end) of the argument file, which gives the potential of having multiple argument files with the exact same content, or even re-using the same argument file multiple times. e.g. + Another substitution you can make in argument files is the {n} substitution. Combined with an -npp increment at the start (or end) of the argument file gives the potential to reuse an argument files in the same command but referring to different files, e.g.

@@ -153,7 +153,7 @@
   jalview --argfile alignment.argfile --argfile alignment.argfile --headless
   
- would be processed like + would be processed the same as
   jalview --open=alignment-0.fa --wrap --output=alignment-0.stk --close --open=alignment-1.fa --wrap --output=alignment-1.stk --close --headless
   
@@ -161,7 +161,7 @@
- Return to Command Line: summary. + Command Line: reference diff --git a/help/help/html/features/clarguments-basic.html b/help/help/html/features/clarguments-basic.html index edee480..626fb8c 100644 --- a/help/help/html/features/clarguments-basic.html +++ b/help/help/html/features/clarguments-basic.html @@ -25,15 +25,15 @@

Command Line: basic usage

- Command Line: summary -
- Command Line: introduction + Command Line: introduction
Command Line: basic usage
Command Line: advanced usage
Command Line: argument files +
+ Command Line: reference


@@ -655,8 +655,7 @@
Continue to Command Line: advanced usage.
- Return to Command Line: summary. - + Command Line: reference diff --git a/help/help/html/features/clarguments-intro.html b/help/help/html/features/clarguments-intro.html deleted file mode 100644 index 6fddf0c..0000000 --- a/help/help/html/features/clarguments-intro.html +++ /dev/null @@ -1,88 +0,0 @@ - - -Command Line: introduction - - -

Command Line: introduction

- -

- Command Line: summary -
- Command Line: introduction -
- Command Line: basic usage -
- Command Line: advanced usage -
- Command Line: argument files -

- -
- -

- From version 2.11.3.0 Jalview processes a new set of command line arguments - which allow more powerful and flexible combinations of arguments, though can - also be used for very simple use cases too. -

- -

- These new arguments are all accessed with a --doubledash form of - command line argument (with the one exception where simply opening one or more - files can be performed without any arguments other than the filenames). -

- -

- The old command line arguments can still be used (see - the old page on command line arguments) so - existing scripts utilising them should not break. -
- These are now deprecated and will be removed in a future version of Jalview. -

- -

- However, you cannot mix old and new style arguments, so if you use any - -singledash arguments (with the exception of -help or -h), they will all be interpreted as - old style arguments with the new --doubledash - arguments being ignored. If you have a script - that uses the old arguments without any dashes, and uses the bare-word - open then these will also be interpreted as old style arguments. -

-

- Warning! If you use command line arguments without any dashes and - don't use the bare-word argument open then all - your arguments will be interpreted as alignment files to be opened by the - new command line argument process! -

- -

- To launch Jalview from the command line, see - running Jalview from the command line. -

- -
- Continue to Command Line: basic usage. -
- Return to Command Line: summary. - - - - diff --git a/help/help/html/features/clarguments-old.html b/help/help/html/features/clarguments-old.html index 3d90a9e..8346401 100644 --- a/help/help/html/features/clarguments-old.html +++ b/help/help/html/features/clarguments-old.html @@ -19,10 +19,10 @@ * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. --> -Jalview Command Line Arguments (pre 2.11.3.0) +Jalview Command Line Arguments (pre 2.11.3.0) - DEPRECATED

- The Jalview Executable's Command Line Arguments (pre 2.11.3.0) + The Jalview Executable's Command Line Arguments (pre 2.11.3.0) - DEPRECATED

File alignment.argfile
diff --git a/help/help/html/features/clarguments-reference.html b/help/help/html/features/clarguments-reference.html new file mode 100644 index 0000000..6d65033 --- /dev/null +++ b/help/help/html/features/clarguments-reference.html @@ -0,0 +1,803 @@ + + +Command Line: reference + + +

Command Line: reference

+ +

+ Command Line: introduction +
+ Command Line: basic usage +
+ Command Line: advanced usage +
+ Command Line: argument files +
+ Command Line: reference +

+ +
+ + + + +

Initialising arguments

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentaction
‑‑help / -h + Display a help statement.
‑‑help‑configHelp for arguments used to configure Jalview from startup
‑‑help‑openingHelp for arguments used to open and format alignments
‑‑help‑structureHelp for arguments used to add and format 3D structure data
‑‑help‑processHelp for arguments used to process an alignment once opened
‑‑help‑outputHelp for arguments used to save data from a processed alignment
‑‑help‑imageHelp for arguments used to export an image of an alignment
‑‑help‑structureimageHelp for arguments used to export an image of an structure
‑‑help‑flowHelp for arguments that control processing of the other arguments
‑‑help‑allHelp for all arguments
‑‑headlessRun Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed.
‑‑jabaws URLSet a different URL to connect to a JABAWS server.
‑‑news / ‑‑nonewsShow (or don't show) the news feed.
‑‑splash / ‑‑nosplashShow (or don't show) the About Jalview splash screen.
‑‑questionnaire / ‑‑noquestionnaireShow (or don't show) the questionnaire if one is available.
‑‑usagestats / ‑‑nousagestatsSend (or don't send) initial launch usage stats. Note: usage stats are useful for future funding for Jalview!
‑‑webservicediscovery / ‑‑nowebservicediscoveryAttempt (or don't attempt) to connect to JABAWS web services.
‑‑props filenameUse file filename as the preferences file instead of the usual ~/.jalview_properties file.
‑‑debugStart Jalview in debug log level.
‑‑quietStop all output to STDOUT (after the Java Virtual Machine has started). Use ‑‑quiet a second time to stop all output to STDERR.
‑‑initsubstitutions / ‑‑noinitsubstitutionsSet ‑‑substitutions to be initially enabled (or initially disabled).
‑‑jvmmempc=PERCENT + Limit maximum heap size (memory) to PERCENT% of total physical memory detected. + This defaults to 90 if total physical memory can be detected. +
+ The equals sign ("=") separator must be used with no spaces. +
+ See Memory usage settings for Jalview for more details. +
‑‑jvmmemmax=MAXMEMORY + 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. +
+ The equals sign ("=") separator must be used with no spaces. +
+ See Memory usage settings for Jalview for more details. +
+ + +

Opening an alignment

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑open filename/URL ... + Opens one or more alignment files filename or URLs URL in new alignment windows. + + + colour=name, +
+ title=string, +
+ features=filename, +
+ annotations=filename, +
+ tree=filename, +
+ showannotations, +
+ showssannotations, +
+ sortbytree, +
+ wrap +
+
‑‑append filename/URL ...Appends one or more alignment files filename or URLs URL to the open alignment window (or opens a new alignment if none already open). + + colour=name, +
+ title=string, +
+ features=filename, +
+ annotations=filename, +
+ tree=filename, +
+ showannotations, +
+ showssannotations, +
+ sortbytree, +
+ wrap +
+
‑‑title "string""Specifies the title for the open alignment window as string.
‑‑colour nameApplies the colour scheme name to the open alignment window. Valid values for name are: +
+ clustal, +
+ blosum62, +
+ pc-identity, +
+ zappo, +
+ taylor, +
+ gecos-flower, +
+ gecos-blossom, +
+ gecos-sunset, +
+ gecos-ocean, +
+ hydrophobic, +
+ helix-propensity, +
+ strand-propensity, +
+ turn-propensity, +
+ buried-index, +
+ nucleotide, +
+ nucleotide-ambiguity, +
+ purine-pyrimidine, +
+ rna-helices, +
+ t-coffee-scores, +
+ sequence-id. +
‑‑features filename/URLAdd a feature file filename or URL URL to the open alignment.
‑‑tree filename/URLAdd a tree file filename or URL URL to the open alignment.
‑‑sortbytree / ‑‑nosortbytreeEnforces sorting (or not sorting) the alignment in the order of an attached phylogenetic tree.
‑‑annotations filename/URLAdd an annotations file filename or URL URL to the open alignment.
‑‑showannotations / ‑‑noshowannotationsEnforces showing (or not showing) alignment annotations.
‑‑wrap / ‑‑nowrapEnforces wrapped (or not wrapped) alignment formatting.
‑‑nostructureDo not open or process any 3D structure in the ‑‑open or ‑‑append files.
+ + +

Adding 3D structure

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑structure filename/URLLoad a structure file filename or URL URL associated with a sequence in the open alignment. The sequence to be associated with can be specified with a following ‑‑seqid argument, or the sub-value modifier seqid=ID can be used. A sub-value INDEX can also be used to specify the INDEX-th sequence in the open alignment. + + seqid=id or INDEX, +
+ paefile=filename, +
+ tempfac=name, +
+ showssannotations, + +
+ structureviewer=name +
‑‑seqid IDSpecify the sequence name for the preceding ‑‑structure to be associated with.
‑‑paematrix filenameAdd a PAE json matrix file filename to the preceding ‑‑structure.
‑‑tempfac nameSet the type of temperature factor. Valid values for name are: +
+ default, +
+ plddt +
‑‑structureviewer nameSet the structure viewer to use to open the 3d structure file specified in previous ‑‑structure to name. Valid values of name are: +
+ none, +
+ jmol, +
+ chimera - requires installation, might need configuring in Preferences, +
+ chimerax - requires installation, might need configuring in Preferences, +
+ pymol - requires installation, might need configuring in Preferences +
‑‑showssannotations / ‑‑noshowssannotationsDo not show secondary structure annotations for the preceding ‑‑structure
‑‑closeClose the open alignment window. This occurs after other output, processing and image export arguments. This applies to the current open alignment -- to apply to all ‑‑output and ‑‑image files, use after ‑‑all.
+ + +

Processing alignments

+ + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑groovy filenameProcess a groovy script in the file for the open alignment.
+ + +

Outputting alignment files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑output filenameExport the open alignment to file filename. The format name is specified by the sub-value modifier format=name, a following ‑‑format name argument or guessed from the file extension. Valid format names (and file extensions) are: +
+ fasta (fa, fasta, mfa, fastq), +
+ pfam (pfam), +
+ stockholm (sto, stk), +
+ pir (pir), +
+ blc (blc), +
+ amsa (amsa), +
+ json (json), +
+ pileup (pileup), +
+ msf (msf), +
+ clustal (aln), +
+ phylip (phy), +
+ jalview (jvp, jar). +
format=name
‑‑format nameSets the format for the preceding ‑‑output file. Valid formats are: +
+ fasta, +
+ pfam, +
+ stockholm, +
+ pir, +
+ blc, +
+ amsa, +
+ json, +
+ pileup, +
+ msf, +
+ clustal, +
+ phylip, +
+ jalview. +
‑‑backups / ‑‑nobackupsEnable (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.
‑‑overwrite / ‑‑nooverwriteEnable (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.
+ + +

Exporting image files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑image filenameOutput an image of the open alignment window. Format is specified by the sub-value modifier, a following ‑‑type argument or guessed from the file extension. Valid formats/extensions are: +
+ svg, +
+ png, +
+ eps, +
+ html, +
+ biojs. +
+ type=name, + textrenderer=name, + scale=number, + width=number, + height=number +
‑‑type nameSet the image format for the preceding ‑‑image to name. Valid values for name are: +
+ svg, +
+ png, +
+ eps, +
+ html, +
+ biojs. +
‑‑textrenderer nameSets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Valid values for name are: +
+ text, +
+ lineart. +
‑‑scale numberSets a scaling for bitmap image format (PNG). Should be given as a floating point number. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --width and --height then the smallest scaling will be used (scale, width and height provide bounds for the image). +
‑‑width numberSets a width for bitmap image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --scale and --height then the smallest scaling will be used (scale, width and height provide bounds for the image). +
‑‑height numberSets a height for bitmap image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --scale and --width then the smallest scaling will be used (scale, width and height provide bounds for the image).
‑‑groovy filenameProcess a groovy script in the file for the open alignment.
+ + +

Exporting 3D structure image files (jmol only)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentactionsub-value modifiers (optional)linked (optional)
‑‑structureimage filenameExport an image of a 3D structure opened in JMOL. Image formats can be: +
+ svg, +
+ png, +
+ eps. +
+ structureimagetype=name, + structureimagetextrenderer=name, + structureimagescale=number, + structureimagewidth=number, + structureimageheight=number +
‑‑structureimagetype nameSet the structure image format for the preceding --structureimage. Valid values are: +
+ svg, +
+ png, +
+ eps. +
‑‑structureimagetextrenderer nameSets whether text in a vector structure image format (SVG, EPS) should be rendered as text or vector line-art. Possible values are: +
+ text, +
+ lineart. +
‑‑structureimagescale numberSets 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). +
‑‑structureimagewidth numberSets 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). +
‑‑structureimageheight numberSets 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). +
+ + +

Controlling flow of arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentaction
‑‑new + 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. +
+ Note that --open already starts a new alignment window for each file it opens. +
‑‑substitutions / ‑‑nosubstitutionsThe 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), +
+ {dirname}, - the directory (folder) name of the currently ‑‑opened file (or first ‑‑appended file), +
+ {argfilebasename} - the filename-without-extension of the current ‑‑argfile, +
+ {argfiledirname} - the directory (folder) name of the current ‑‑argfile, +
+ {n} - the value of the index counter (starting at 0). +
+ {++n} - increase and substitute the value of the index counter, +
+ {} - the value of the current alignment window default index. +
‑‑argfile filename + Open one or more files filename and read, line-by-line, as arguments to Jalview. +
+ Values in an argfile should be given with an equals sign ("=") separator with no spaces. +
+ Note that if you use one or more ‑‑argfile arguments then all other non-initialising arguments will be ignored. +
‑‑nppIncrease the index counter used in argument value substitutions.
‑‑all / ‑‑noallApply (or stop applying) the following output arguments to all sets of linked arguments.
‑‑allstructures / ‑‑noallstructures + Apply (or stop applying) the following 3D structure formatting arguments to all structures within the current open alignment. Whilst --allstructures will continue to operate for a --new alignment, the structure formatting arguments must be set again for each new alignment. +
‑‑quitAfter all files have been opened, appended and output, quit Jalview. In ‑‑headless mode this already happens.
+ + + diff --git a/help/help/html/features/clarguments.html b/help/help/html/features/clarguments.html index d1ee915..20bcd10 100644 --- a/help/help/html/features/clarguments.html +++ b/help/help/html/features/clarguments.html @@ -9,773 +9,153 @@ * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. --> -Command Line: summary +Command Line: introduction and reference -

Command Line: summary

+

Command Line: introduction and reference

- Command Line: summary -
- Command Line: introduction + Command Line: introduction
Command Line: basic usage
Command Line: advanced usage
Command Line: argument files +
+ Command Line: reference

-
- - -

Initialising arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
argumentaction
‑‑help / -hDisplay a help statement
‑‑headlessRun Jalview in headless mode. No GUI interface will be created and Jalview will quit after all arguments have been processed.
‑‑jabaws URLSet a different URL to connect to a JABAWS server.
‑‑news / ‑‑nonewsShow (or don't show) the news feed.
‑‑splash / ‑‑nosplashShow (or don't show) the About Jalview splash screen.
‑‑questionnaire / ‑‑noquestionnaireShow (or don't show) the questionnaire if one is available.
‑‑usagestats / ‑‑nousagestatsSend (or don't send) initial launch usage stats. Note: usage stats are useful for future funding for Jalview!
‑‑webservicediscovery / ‑‑nowebservicediscoveryAttempt (or don't attempt) to connect to JABAWS web services.
‑‑props filenameUse file filename as the preferences file instead of the usual ~/.jalview_properties file.
‑‑debugStart Jalview in debug log level.
‑‑quietStop all output to STDOUT (after the Java Virtual Machine has started). Use ‑‑quiet a second time to stop all output to STDERR.
‑‑initsubstitutions / ‑‑noinitsubstitutionsSet ‑‑substitutions to be initially enabled (or initially disabled).
‑‑jvmmempc=PERCENT - Limit maximum heap size (memory) to PERCENT% of total physical memory detected. - This defaults to 90 if total physical memory can be detected. -
- The equals sign ("=") separator must be used with no spaces. -
- See Memory usage settings for Jalview for more details. -
‑‑jvmmemmax=MAXMEMORY - 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. -
- The equals sign ("=") separator must be used with no spaces. -
- See Memory usage settings for Jalview for more details. -
- - -

Opening an alignment

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
argumentactionsub-value modifiers (optional)linked (optional)
‑‑open filename/URL ... - Opens one or more alignment files filename or URLs URL in new alignment windows. - - - colour=name, -
- title=string, -
- features=filename, -
- annotations=filename, -
- tree=filename, -
- showannotations, -
- showssannotations, -
- sortbytree, -
- wrap -
-
‑‑append filename/URL ...Appends one or more alignment files filename or URLs URL to the open alignment window (or opens a new alignment if none already open). - - colour=name, -
- title=string, -
- features=filename, -
- annotations=filename, -
- tree=filename, -
- showannotations, -
- showssannotations, -
- sortbytree, -
- wrap -
-
‑‑title "string""Specifies the title for the open alignment window as string.
‑‑colour nameApplies the colour scheme name to the open alignment window. Valid values for name are: -
- clustal, -
- blosum62, -
- pc-identity, -
- zappo, -
- taylor, -
- gecos-flower, -
- gecos-blossom, -
- gecos-sunset, -
- gecos-ocean, -
- hydrophobic, -
- helix-propensity, -
- strand-propensity, -
- turn-propensity, -
- buried-index, -
- nucleotide, -
- nucleotide-ambiguity, -
- purine-pyrimidine, -
- rna-helices, -
- t-coffee-scores, -
- sequence-id. -
‑‑features filename/URLAdd a feature file filename or URL URL to the open alignment.
‑‑tree filename/URLAdd a tree file filename or URL URL to the open alignment.
‑‑sortbytree / ‑‑nosortbytreeEnforces sorting (or not sorting) the alignment in the order of an attached phylogenetic tree.
‑‑annotations filename/URLAdd an annotations file filename or URL URL to the open alignment.
‑‑showannotations / ‑‑noshowannotationsEnforces showing (or not showing) alignment annotations.
‑‑wrap / ‑‑nowrapEnforces wrapped (or not wrapped) alignment formatting.
‑‑nostructureDo not open or process any 3D structure in the ‑‑open or ‑‑append files.
- - -

Adding a 3D structure

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
argumentactionsub-value modifiers (optional)linked (optional)
‑‑structure filename/URLLoad a structure file filename or URL URL associated with a sequence in the open alignment. The sequence to be associated with can be specified with a following ‑‑seqid argument, or the sub-value modifier seqid=ID can be used. A sub-value INDEX can also be used to specify the INDEX-th sequence in the open alignment. - - seqid=id or INDEX, -
- paefile=filename, -
- tempfac=name, -
- showssannotations, - -
- structureviewer=name -
‑‑seqid IDSpecify the sequence name for the preceding ‑‑structure to be associated with.
‑‑paematrix filenameAdd a PAE json matrix file filename to the preceding ‑‑structure.
‑‑tempfac nameSet the type of temperature factor. Valid values for name are: -
- default, -
- plddt -
‑‑structureviewer nameSet the structure viewer to use to open the 3d structure file specified in previous ‑‑structure to name. Valid values of name are: -
- none, -
- jmol, -
- chimera - requires installation, might need configuring in Preferences, -
- chimerax - requires installation, might need configuring in Preferences, -
- pymol - requires installation, might need configuring in Preferences -
‑‑showssannotations / ‑‑noshowssannotationsDo not show secondary structure annotations for the preceding ‑‑structure
‑‑closeClose the open alignment window. This occurs after other output, processing and image export arguments. This applies to the current open alignment -- to apply to all ‑‑output and ‑‑image files, use after ‑‑all.
- - -

Processing alignments

- - - - - - - - - - - - - - - -
argumentactionsub-value modifiers (optional)linked (optional)
‑‑groovy filenameProcess a groovy script in the file for the open alignment.
- - -

Outputting alignment files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
argumentactionsub-value modifiers (optional)linked (optional)
‑‑output filenameExport the open alignment to file filename. The format name is specified by the sub-value modifier format=name, a following ‑‑format name argument or guessed from the file extension. Valid format names (and file extensions) are: -
- fasta (fa, fasta, mfa, fastq), -
- pfam (pfam), -
- stockholm (sto, stk), -
- pir (pir), -
- blc (blc), -
- amsa (amsa), -
- json (json), -
- pileup (pileup), -
- msf (msf), -
- clustal (aln), -
- phylip (phy), -
- jalview (jvp, jar). -
format=name
‑‑format nameSets the format for the preceding ‑‑output file. Valid formats are: -
- fasta, -
- pfam, -
- stockholm, -
- pir, -
- blc, -
- amsa, -
- json, -
- pileup, -
- msf, -
- clustal, -
- phylip, -
- jalview. -
‑‑backups / ‑‑nobackupsEnable (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.
‑‑overwrite / ‑‑nooverwriteEnable (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.
- - -

Exporting image files

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
argumentactionsub-value modifiers (optional)linked (optional)
‑‑image filenameOutput an image of the open alignment window. Format is specified by the sub-value modifier, a following ‑‑type argument or guessed from the file extension. Valid formats/extensions are: -
- svg, -
- png, -
- eps, -
- html, -
- biojs. -
- type=name, - textrenderer=name, - scale=number, - width=number, - height=number -
‑‑type nameSet the image format for the preceding ‑‑image to name. Valid values for name are: -
- svg, -
- png, -
- eps, -
- html, -
- biojs. -
‑‑textrenderer nameSets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Valid values for name are: -
- text, -
- lineart. -
‑‑scale numberSets a scaling for bitmap image format (PNG). Should be given as a floating point number. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --width and --height then the smallest scaling will be used (scale, width and height provide bounds for the image). -
‑‑width numberSets a width for bitmap image format (PNG) with the height maintaining the aspect ratio. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --scale and --height then the smallest scaling will be used (scale, width and height provide bounds for the image). -
‑‑height numberSets a height for bitmap image format (PNG) with the width maintaining the aspect ratio. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image value. If used in conjunction with --scale and --width then the smallest scaling will be used (scale, width and height provide bounds for the image).
‑‑groovy filenameProcess a groovy script in the file for the open alignment.
- - -

Exporting 3D structure image files (jmol only)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- - - - - - + - - - - - - +

Introduction

- - - - - - +

+ From version 2.11.3.0 Jalview has a new set of command line arguments + which allow more powerful and flexible combinations of arguments, though can + also be used for simple use cases too. +

-
argumentactionsub-value modifiers (optional)linked (optional)
‑‑structureimage filenameExport an image of a 3D structure opened in JMOL. Image formats can be: -
- svg, -
- png, -
- eps. -
- structureimagetype=name, - structureimagetextrenderer=name, - structureimagescale=number, - structureimagewidth=number, - structureimageheight=number -
‑‑structureimagetype nameSet the structure image format for the preceding --structureimage. Valid values are: -
- svg, -
- png, -
- eps. -
‑‑structureimagetextrenderer nameSets whether text in a vector structure image format (SVG, EPS) should be rendered as text or vector line-art. Possible values are: -
- text, -
- lineart. -
‑‑structureimagescale numberSets 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). -
‑‑structureimagewidth numberSets 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). -
‑‑structureimageheight numberSets 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). -
+

+ These new arguments are all accessed with a --doubledash form of + command line argument (with the one exception where simply opening one or more + files can be performed without any arguments other than the filenames). +

+

+ The old command line arguments can still be used (see + the old page on command line arguments) so + existing scripts utilising them should not break. +
+ These are now deprecated and will be removed in a future version of Jalview. +

-

Controlling flow of arguments

+

+ However, you cannot mix old and new style arguments, so if you use any + -singledash arguments (with the exception of -help or -h), they will all be interpreted as + old style arguments with the new --doubledash + arguments being ignored. If you have a script + that uses the old arguments without any dashes, and uses the bare-word + open then these will also be interpreted as old style arguments. +

- - - - - +

+ Warning! If you use command line arguments without any dashes and + don't use the bare-word argument open then all + your arguments will be interpreted as alignment files to be opened by the + new command line argument process! +

- - - - +

+ To launch Jalview from the command line, see + running Jalview from the command line. +

- - - - - - - - +

Syntax

- - - - +

+ The new command line argument parser can group certain labelled arguments together, or give them a default label based on their position in the list of arguments (in which case you won't ever need to know what the label is). All arguments are read before any alignment actions are performed. For basic usage without additional syntax, please see the Command Line: basic usage explanatory page. +

- - - - +

+ Parts of Jalview's command line arguments +

+
jalview --argname[linkedId]=[subvalues]value --switch --noswitch --argname[linkedId] [subvalues]filename1 filename2 ...
- - - - +

+ Different arguments can take one or more values, others take no value and act like a switch (some can be set on and off and others are only on, depending on the use). +
+

    +
  • + For arguments that require a value, the value can be given after an equals-sign ('=') or a space (' '). +
    + --arg value +
    + --arg=value +
  • +
  • + For arguments that can take multiple values (these will be filenames), the multiple filenames should appear after a space. If you use a filename wildcard you can put this after a space (which will be expanded by the shell unto multiple filenames before they reach Jalview), or you can put it after an equals-sign, which will be used by Jalview to find a list of files. You cannot use an equals-sign and value followed by further values. +
    + --arg file1.fa otherfile.stk +
    + --arg filename*.fa (expanded by shell) +
    + --arg=filename*.fa (expanded by Jalview) +
  • +
  • + For arguments that act as a switch, most can be negated by preceding the argument name with no. +
    + --switch +
    + --noswitch +
  • +
  • + Some values can be modified, or may need additional information (for instance an --image output can be modified with a --scale=number factor, or a --structure can refer to a sequence with a --seqid=ID). This additional information can be added in a number of different ways. +
      +
    • + An argument immediately following the main argument. +
      + --image output.png --scale 2.5 +
    • +
    • + A sub-value modifier, which is where one or more (comma-separated) values are added to the start of the main value, placed in square brackets. +
      + --open=[nowrap,colour=gecos-blossom]uniref50.fa +
      + Sub-value modifiers with a value must use an equals-sign separator, and those that act as a switch can simply be included without an equals-sign or value, and can be preceded with no to negate the value, as with the argument name. +
    • +
    • + Another argument with the same linked ID. A linked ID is an optional identifier for a particular open alignment, placed in square brackets immediately following the argument name (before the equals-sign or space). If linked IDs are specified they do not need to be near to each other. +
      + --image[MYID]=output.png --other --args --scale[MYID]=2.5 +
    • +
    • + An argument that is designated as applying to all linked IDs +
      + --image=output.png --other --args --all --scale=2.5 +
      + --image=output.png --other --args --scale[*]=2.5 +
    • +
    +
  • +
+

- - - - +

+ This may sound complicated, but nearly everything can be done just with plain command line arguments, though in this case the ordering of the arguments is more important. +

-
argumentaction
‑‑new - 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. -
- Note that --open already starts a new alignment window for each file it opens. -
‑‑substitutions / ‑‑nosubstitutionsThe 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), -
- {dirname}, - the directory (folder) name of the currently ‑‑opened file (or first ‑‑appended file), -
- {argfilebasename} - the filename-without-extension of the current ‑‑argfile, -
- {argfiledirname} - the directory (folder) name of the current ‑‑argfile, -
- {n} - the value of the index counter (starting at 0). -
- {++n} - increase and substitute the value of the index counter, -
- {} - the value of the current alignment window default index. -
‑‑argfile filename - Open one or more files filename and read, line-by-line, as arguments to Jalview. -
- Values in an argfile should be given with an equals sign ("=") separator with no spaces. -
- Note that if you use one or more ‑‑argfile arguments then all other non-initialising arguments will be ignored. -
‑‑nppIncrease the index counter used in argument value substitutions.
‑‑all / ‑‑noallApply (or stop applying) the following output arguments to all sets of linked arguments.
‑‑allstructures / ‑‑noallstructures - Apply (or stop applying) the following 3D structure formatting arguments to all structures within the current open alignment. Whilst --allstructures will continue to operate for a --new alignment, the structure formatting arguments must be set again for each new alignment. -
‑‑quitAfter all files have been opened, appended and output, quit Jalview. In ‑‑headless mode this already happens.
+
+ Continue to Command Line: basic usage. +
+ Command Line: reference diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 3437bfd..753ded2 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -574,17 +574,24 @@ public class Commands avm, av, Arg.STRUCTUREIMAGE, subVals); if (sv != null && structureImageFilename != null) { + ArgValue siAv = avm.getClosestNextArgValueOfArg(av, + Arg.STRUCTUREIMAGE); + SubVals sisv = null; + if (structureImageFilename.equals(siAv.getValue())) + { + sisv = siAv.getSubVals(); + } File structureImageFile = new File(structureImageFilename); String width = ArgParser.getValueFromSubValOrArg(avm, av, - Arg.STRUCTUREIMAGEWIDTH, subVals); + Arg.STRUCTUREIMAGEWIDTH, sisv); String height = ArgParser.getValueFromSubValOrArg(avm, av, - Arg.STRUCTUREIMAGEHEIGHT, subVals); + Arg.STRUCTUREIMAGEHEIGHT, sisv); String scale = ArgParser.getValueFromSubValOrArg(avm, av, - Arg.STRUCTUREIMAGESCALE, subVals); + Arg.STRUCTUREIMAGESCALE, sisv); String renderer = ArgParser.getValueFromSubValOrArg(avm, av, - Arg.STRUCTUREIMAGETEXTRENDERER, subVals); + Arg.STRUCTUREIMAGETEXTRENDERER, sisv); String typeS = ArgParser.getValueFromSubValOrArg(avm, av, - Arg.STRUCTUREIMAGETYPE, subVals); + Arg.STRUCTUREIMAGETYPE, sisv); if (typeS == null || typeS.length() == 0) { typeS = FileUtils.getExtension(structureImageFile); -- 1.7.10.2