From 4dc159c9f47284ecfd253840dded4772af7be954 Mon Sep 17 00:00:00 2001
From: Ben Soares
+ Jalview Command Line Arguments: summary
+
+ Jalview Command Line Arguments: summary
+ Jalview Command Line Arguments: advanced usage
+
+
+ Jalview Command Line Arguments: introduction
+
+ Jalview Command Line Arguments: basic usage
+
+ Jalview Command Line Arguments: advanced usage
+
+ Jalview Command Line Arguments: argfiles
+
+
+
+
+
+
+
+
+
+ Continue to Jalview Command Line Arguments: argfiles.
+
+ Return to Jalview Command Line Arguments: summary.
+
+
+
+
diff --git a/help/help/html/features/clarguments-argfiles.html b/help/help/html/features/clarguments-argfiles.html
new file mode 100644
index 0000000..a527c21
--- /dev/null
+++ b/help/help/html/features/clarguments-argfiles.html
@@ -0,0 +1,52 @@
+
+
+Jalview Command Line Arguments: argfiles
+
+
+ Jalview Command Line Arguments: introduction
+
+ Jalview Command Line Arguments: basic usage
+
+ Jalview Command Line Arguments: advanced usage
+
+ Jalview Command Line Arguments: argfiles
+
+
+
+
+
+
+
+
+
+ Return to Jalview Command Line Arguments: summary.
+
+
+
+
diff --git a/help/help/html/features/clarguments-basic.html b/help/help/html/features/clarguments-basic.html
index 19406b4..b557f4f 100644
--- a/help/help/html/features/clarguments-basic.html
+++ b/help/help/html/features/clarguments-basic.html
@@ -44,6 +44,7 @@
Opening alignments (
@@ -516,45 +517,145 @@
--open
, --append
, --new
)
--substitutions
, --new
, --close
, --all
)--substitutions
, --close
, --all
)--
+ One of the more powerful aspects of Jalview's command line operations is that stores all of the different opened alignment arguments (before opening them) and can apply some arguments to all of the alignments as they are opened. This includes display and output arguments. +
+ ++ When outputting a file you will obviously want to use a different filename for each of the alignments that are opened. There are several ways you can specify how that filename differs, but the easiest way is to refer to the input filename and change the extension. In the case of an alignment where multiple files are appended, the filename of the first file to be appended or opened is used. +
+ ++ To refer to different parts of the opening filename, you can use the strings +
{dirname}
-- is replaced by the directory path to the opened file.{basename}
-- is replaced by the base of the filename of the opened file. This is without the path or file extension (if there is one).{extension}
-- is replaced by the extension of the filename of the opened 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: +
+ +--substitutions / --nosubstitutions
+ Enable (or disable) filename substitutions in the following argument values and sub-value modifier values.
+ jalview --open exampes/uniref50.fa --nosubstitutions --output I_Want_A_Weird_Output_Filname_With_{basename}_Curly_Brackets_In_And_A_Sensible_One_Next.stk --substitutions --output tmp/{basename}.stk --headless-
--
+ For opening single files this is less useful, since you could obviously just type the output filename, but for multiple opened alignments you can also use these substituted values and they will be replaced by the relevant part of the filename given for each opened alignment window. Normally an --output
or --image
argument will only be applied to the latest opened alignment window, but you can tell Jalview to apply some arguments to all alignments that have been opened (so far) by using the --all
argument.
+
--all / -noall
+ When using the --all
argument, following arguments will apply to all of the previously opened alignment windows. You can turn this behaviour off for following arguments using the --noall
argument. The arguments that can apply to all previously opened alignments are:
+
+ --colour
+
+ --sortbytree
+
+ --showannotations
+
+ --wrap
+
+ --nostructure
+
+ --notempfac
+
+ --showssannotations
+
+ --image
+
+ --type
+
+ --textrenderer
+
+ --scale
+
+ --width
+
+ --height
+
+ --output
+
+ --format
+
+ --groovy
+
+ --backups
+
+ --overwrite
+
+ --close
+
+ In particular, for our example above, we can use -all
and --output
like this (--close
will be explained in a moment):
+
+ jalview --open all_my_fasta_files/*.fa --all --output all_my_converted_stockholm_files/{basename}.stk --close --headless ++
+ Another example would be to create a print quality coloured postscript image for every Fasta file in several directories and place the image next to the alignment: +
+ jalview --open */*.fa --all --colour gecos-flower --image {dirname}/{basename}.eps --textrenderer text --close --headless ++ or thumbnails for every Fasta file with
+ jalview --open */*.fa --all --colour gecos-flower --image {dirname}/{basename}.png --width 256 --height 256 --close --headless-
--
--close
+ The --close
tag is used to close an alignment window after all output files or image exports are performed. This reduces memory use, especially if an --open
value is set to open many files. These will be opened, formatted and output sequentially so since they are closed before the next one is opened memory use will not build up over a large number of alignments.
-
--
--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
+
+ 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
.
+
+ For a simple conversion of many fasta files into Stockholm format, simply use
+ jalview --open all_my_fasta_files/*.fa --output "*.stk" --close --headless-
--
+ Important! Please note that using a bareword *.ext
(i.e. without an escape or quotation marks) in a shell command line will potentially be expanded by the shell to a list of all the files in the current directory ending with .ext
before this value is passed to Jalview. This will result in the first of these files being overwritten (multiple times)! If you shell-escape the *
(usually with a backslash '\') or enclose the value in quotation marks ('"*.ext"') then the shell will not expand the wildcard.
+
+ An alternative is to use an equals sign ('=') with no spaces between the argument and the value, --output=*.ext
, which Jalview will interpret the same, but the shell will not automatically expand before it is sent to Jalview, e.g.
+ jalview --open all_my_fasta_files/*.fa --output=*.stk --close --headless+