From b24eb9a4d1ee263d3bb301e72699b1fbf3d68980 Mon Sep 17 00:00:00 2001
From: Ben Soares
- 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:
+ An opened alignment window (or set of opened alignment windows) can be modified in its appearance using the following arguments before the next
@@ -434,7 +439,19 @@
+ To export the open alignment window as an image, use the
+ Opening alignments (
--open
, --append
, --new
)
jalview filename1 filename2 ...
@@ -133,6 +133,11 @@
Alignment options (
+ --colour
, --wrap
, --showannotations
, --title
)--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
- To export the open alignment window as an image, use the --image
--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.
+ --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 (
@@ -495,6 +512,27 @@png
)
--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:
+
{structuredirname}
-- is replaced by the directory path to the opened structure file.{structurebasename}
-- is replaced by the base of the filename of the opened structure file. This is without the path or file extension (if there is one).{structureextension}
-- is replaced by the extension of the filename of the opened structure file.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 @@--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 --headlessHere 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 @@
‑‑mkdirs
--output
, --image
or --structureimage
arguments.
+ 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
‑‑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
‑‑image
to name. Valid values for name are:
+ ‑‑image
or ‑‑structureimage
to name. Valid values for name are:
svg
,
‑‑textrenderer name
‑‑image
or ‑‑structureimage
. Valid values for name are:
text
,
‑‑scale number
--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).
+ ‑‑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).
‑‑width number
--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).
+ ‑‑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).
‑‑height number
--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).‑‑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
‑‑bgcolour name
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.jmol
only)argument | -action | -sub-value modifiers (optional) | -linked (optional) | -||
‑‑structureimage filename |
- Export an image of a 3D structure opened in JMOL. Image formats can be:
- - svg ,
- - png ,
- - eps .
- |
-
- structureimagetype=name,
- |
- ✓ | -||
‑‑structureimagetype name |
- Set the structure image format for the preceding --structureimage. Valid values are:
- - svg ,
- - png ,
- - eps .
- |
- - | ✓ | -||
‑‑structureimagetextrenderer name |
- Sets 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 number |
- 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). - | -- | ✓ | -||
‑‑structureimagewidth number |
- 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). - | -- | ✓ | -||
‑‑structureimageheight number |
- 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). - | +‑‑groovy filename |
+ Process 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 ‑‑open ed file (or first ‑‑append ed file),
{dirname} , - the directory (folder) name of the currently ‑‑open ed file (or first ‑‑append ed file),
+ {extension} , - the extension of the filename of the currently ‑‑open ed file (or first ‑‑append ed 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.
|
--
1.7.10.2