From b24eb9a4d1ee263d3bb301e72699b1fbf3d68980 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 20 Sep 2023 00:32:46 +0100 Subject: [PATCH] JAL-629 JAL-4265 JAL-4269 Updated help Documentation --- help/help/html/features/clarguments-basic.html | 73 ++++++++- help/help/html/features/clarguments-reference.html | 167 +++++++++----------- 2 files changed, 143 insertions(+), 97 deletions(-) diff --git a/help/help/html/features/clarguments-basic.html b/help/help/html/features/clarguments-basic.html index 7eb2294..0307494 100644 --- a/help/help/html/features/clarguments-basic.html +++ b/help/help/html/features/clarguments-basic.html @@ -50,7 +50,7 @@

Opening alignments (--open, --append, --new)

- To simply open one or more alignment files in different windows just put the filenames as the first arguments: + To simply open one or more alignment files in different alignment windows just put the filenames as the first arguments:

   jalview filename1 filename2 ...
   
@@ -133,6 +133,11 @@

Alignment options (--colour, --wrap, --showannotations, --title)

+

+ An opened alignment window (or set of opened alignment windows) can be modified in its appearance using the following arguments before the next --open argument. These modifying arguments apply to the one or more files that were opened with the preceding --open argument. E.g. --open file.fa --colour gecos-flower will colour the one alignment window with file.fa. However, --open *.fa --colour gecos-flower will colour every alignment window matching file*.fa, and --open file1.fa file2.fa --colour gecos-flower + will colour both opened alignment windows. +

+

--colour

@@ -434,7 +439,19 @@

--image

- To export the open alignment window as an image, use the --image argument, which will give an image of the alignment and annotations as it appears (or would appear if not in --headless mode) in the alignment window if it was large enough for the whole alignment, including colour choice and features. +

+ To export the open alignment window as an image, use the --image argument, which will give an image of the alignment and annotations as it appears (or would appear if not in --headless mode) in the alignment window if it was large enough for the whole alignment, including colour scheme and features. +

+

+

+  jalview --open examples/plantfdx.fa --colour gecos-blossom --features examples/plantfdx.features --annotations examples/plantfdx.annotations --image plantfdx.png --headless
+  
+

+ +

--structureimage

+

+ To export an open structure as an image, use the --structureimage argument, which will give an image of the structure as it appears (or would appear if not in --headless mode) in a Jmol window including colour scheme. --structureimage can currently only be used with structures opened with the jmol structureviewer (the default viewer). +

   jalview --open examples/plantfdx.fa --colour gecos-blossom --features examples/plantfdx.features --annotations examples/plantfdx.annotations --image plantfdx.png --headless
@@ -442,7 +459,7 @@
   

- This by default produces a PNG image of screen or webpage resolution, which you may want to improve upon. There are two ways of doing this with Jalview: increasing the scale of the PNG image, or using a vector based image format (EPS, SVG, HTML). + These by default produce a PNG image of screen or webpage resolution, which you will probably want to improve upon. There are two ways of doing this with Jalview: increasing the scale of the PNG image, or using a vector based image format (EPS, SVG, HTML).

Bitmap image types (png)

@@ -495,6 +512,27 @@

+

--imagecolour

+ +

+ Specify a colour scheme to use just for this image using the --imagecolour argument: +

+  jalview --open examples/uniref50.fa --colour gecos-flower --image uniref50-residues.png --height 2160 --image uniref50-helix.png --imagecolour helix-propensity --width 800 --image uniref50-turn.png --imagecolour turn-propensity --width 800
+  
+

+ +

--bgcolour

+ +

+ Only applies to --structureimage. Specify a background colour for a structure image. The colour can be specified as a named colour recognised by Java (e.g. "white", "cyan") or as a #RRGGBB hash-6-digit-hex-string as used in web pages (e.g. "#ffffff", "#00ffff"). Note that if you're using a hash in a bash-like shell then you should quote the string to avoid problems with it being interpreted as a comment character. +

+

+ E.g. +

+  jalview --open examples/uniref50.fa --colour gecos-sunset --structure examples/AF-P00221-F1-model_v4.pdb --seqid FER1_SPIOL --structureimage temp.png  --bgcolour magenta
+  
+

+

Next we look at vector image formats, which maintain detail at all resolutions.

@@ -557,6 +595,15 @@

+ Specifically for --structureimage output, you can also use substitutions using parts of the structure filename: +

+

+ +

These filename substitutions are on by default, but if for whatever reason you wish to disable the substitutions, they can be turned off (or back on again) through the list of arguments with:

@@ -646,9 +693,25 @@

The all output wildcard: --output "*.ext", --image "*.ext"

- Purely as an intuitive syntactic sweetener, you can use the --output wildcard * at the beginning of the output filename as shorthand for --all --output {dirname}/{basename} followed by whatever you put after the '*'. For example, to achieve the same as the thumbnails example above, you could use + Purely as an intuitive syntactic sweetener, you can use the --output wildcard * in two places as part of an output path and filename. +

+ +

+ Using an asterisk (*) as a filename before an extension, e.g. --image "tmp/*.png" will result in that asterisk being treated as a {basename} substitution. +

+ +

+ Using an asterisk (*) before a file separator (usually /), e.g. --image "tmp/*/file1.png" will result in that asterisk being treated as a {dirname} substitution. +

+ +

+ You can combine these, using an asterisk (*) before and after the last file separator, e.g. --image "tmp/*/*.png" will result in being substituted like tmp/{dirname}/{basename}.png. +

+ +

+ For example, to achieve the same as the thumbnails example above, you could use

-  jalview --open */*.fa --image "*.png" --colour gecos-flower --width 256 --height 256 --close --headless
+  jalview --open */*.fa --image "*/*.png" --colour gecos-flower --width 256 --height 256 --close --headless
   
Here we move the --colour argument after the --output argument (it will still be applied before the image export or file output) so that it is included after the implied --all argument. The thumbnails will be placed in the same directory as the alignment file with the same filename except for a different extension of .png.

diff --git a/help/help/html/features/clarguments-reference.html b/help/help/html/features/clarguments-reference.html index 60951d8..484d62a 100644 --- a/help/help/html/features/clarguments-reference.html +++ b/help/help/html/features/clarguments-reference.html @@ -35,7 +35,6 @@
  • Processing alignments
  • Outputting alignment files
  • Exporting image files
  • -
  • Exporting 3D structure image files
  • Controlling flow of arguments
  • @@ -574,6 +573,16 @@ ✓ + + ‑‑mkdirs + Enable automatic creation of new directories and parent directories for filenames given, or created through substitutions, in --output, --image or --structureimage arguments. + + ✓ + + + + +Automatically create directories when outputting a file to a new directory @@ -602,18 +611,56 @@ biojs. - type=name, - textrenderer=name, - scale=number, - width=number, - height=number + + type=name, +
    + textrenderer=name, +
    + scale=number, +
    + width=number, +
    + height=number, +
    + imagecolour=name +
    + + ✓ + + + + ‑‑structureimage filename + Export an image of a 3D structure opened in JMOL (currently jmol only). Each ‑‑structureimage filename will output a file for each ‑‑structureimage that has been applied to the open alignment window. In this situation, to avoid overwriting the same file with each structure, additional substitutions {structuredirname}, {structurebasename} and {structureextname} are available being substituted with the directory path, file basename and file extension of each structure file. Image formats can be: +
    + svg, +
    + png, +
    + eps. + + + + type=name, +
    + textrenderer=name, +
    + scale=number, +
    + width=number, +
    + height=number, +
    + imagecolour=name +
    + bgcolour=name +
    ‑‑type name - Set the image format for the preceding ‑‑image to name. Valid values for name are: + Set the image format for the preceding ‑‑image or ‑‑structureimage to name. Valid values for name are:
    svg,
    @@ -631,7 +678,7 @@ ‑‑textrenderer name - Sets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Valid values for name are: + Sets whether text in a vector image format (SVG, HTML, EPS) should be rendered as text or vector line-art. Applies to the preceding ‑‑image or ‑‑structureimage. Valid values for name are:
    text,
    @@ -643,7 +690,7 @@ ‑‑scale number - Sets 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). + Sets a scaling for bitmap image format (PNG). Should be given as a floating point number. Applies to the preceding ‑‑image or ‑‑structureimage. This can also be set as a sub-value modifier to the --image or ‑‑structureimage value. If used in conjunction with --width and --height then the smallest size will be used (scale, width and height provide bounds for the image). ✓ @@ -651,7 +698,7 @@ ‑‑width number - Sets 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). + Sets a width for bitmap image format (PNG) with the height maintaining the aspect ratio. Applies to the preceding ‑‑image or ‑‑structureimage. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image or ‑‑structureimage value. If used in conjunction with --scale and --height then the smallest size will be used (scale, width and height provide bounds for the image). ✓ @@ -659,97 +706,21 @@ ‑‑height number - Sets 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). + Sets a height for bitmap image format (PNG) with the width maintaining the aspect ratio. Applies to the preceding ‑‑image or ‑‑structureimage. Should be given as a positive integer. This can also be set as a sub-value modifier to the --image or ‑‑structureimage value. If used in conjunction with --scale and --width then the smallest size will be used (scale, width and height provide bounds for the image). ✓ - ‑‑groovy filename - Process a groovy script in the file for the open alignment. + ‑‑bgcolour name + Only applies to structure images (opened with jmol structure viewer). Sets the background colour of the preceding ‑‑structureimage. name should be either a named colour (e.g. white, cyan) known to Jmol, or can be given as a six digit RGB hex string preceded by a hash (#) character (e.g. #ffffff, 00ffff). Note that you made need to quote a hashed RGB hex string. This can also be set as a sub-value modifier to the --structureimage value. ✓ - - - -

    Exporting 3D structure image files (jmol only)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -777,17 +748,29 @@ -- 1.7.10.2
    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). - ‑‑groovy filenameProcess a groovy script in the file for the open alignment.
    ‑‑substitutions / ‑‑nosubstitutions 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),
    {dirname}, - the directory (folder) name of the currently ‑‑opened file (or first ‑‑appended file), + {extension}, - the extension of the filename 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,
    + {structurebasename} - the filename-without-extension of the ‑‑structure file. Only available to ‑‑structureimage . +
    + {structuredirname}, - the directory (folder) name of the ‑‑structure file. Only available to ‑‑structureimage . +
    + {structureextension}, - the extension of the filename of the ‑‑structure file. Only available to ‑‑structureimage . +
    {n} - the value of the index counter (starting at 0).
    - {++n} - increase and substitute the value of the index counter, + {++n} - increase and substitute the value of the index counter. +
    + {m} - the value of the on-the-fly counter (starting at 0). Only available to ‑‑structureimage . +
    + {++m} - increase and substitute the (incremented) value of the on-the-fly counter. Only available to ‑‑structureimage .
    {} - the value of the current alignment window default index.