Jalview Command Line Arguments: basic usage

Jalview Command Line Arguments: summary
Jalview Command Line Arguments: introduction
Jalview Command Line Arguments: basic usage
Jalview Command Line Arguments: advanced usage
Jalview Command Line Arguments: argfiles


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

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

  jalview filename1 filename2 ...
  

You can use shell-expanded wildcards:

  jalview this/filename* that/filename* other/filename*
  
and URLs:
  jalview https://rest.uniprot.org/uniprotkb/P00221.fasta
  

(Using initial filenames is the same as using the --open argument, and further arguments can be used after the initial filenames.)

--open

Use the --open argument to open alignment files each in their own window.

The following are equivalent:

  jalview --open filename1 filename2 ...

  jalview --open filename*

  jalview --open filename1 --open filename2 --open ...

  jalview filename1 filename2 ...
  

Similarly you can open URLs:

  jalview --open https://rest.uniprot.org/uniprotkb/P00221.fasta
  

--append

To append several alignment files together use:

  jalview --open filename1.fa --append filename2.fa filename3.fa
  
or, if you haven't previously used --open then you can use --append to open one new window and keep appending each set of alignments:
  jalview --append these/filename*.fa --append more/filename*.fa

  jalview --append https://rest.uniprot.org/uniprotkb/P00221.fasta https://www.uniprot.org/uniprotkb/A0A0K9QVB3/entry
  

Note that whilst you can include a Jalview Project File (.jvp) as an --append value, the items in the file will always open in their original windows and not append to another.

--new

To append different sets of alignment files in different windows, use --new to move on to a new alignment window:

  jalview --append these/filename*.fa --new --append other/filename*.fa
  

--open is like using --new --append applied to every filename/URL given to --open

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

--colour

You can specify a residue/base colouring for the alignment using the --colour option (note spelling -- Jalview is made in Scotland!):

  jalview --open examples/uniref50.fa --colour gecos-flower
  
There are several colour schemes that you can use. See the page on Colour Schemes for details. The names to use on the command line for colour schemes 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

--wrap

An alignment should open with your usual preferences stored in the .jalview_properties file. To open an alignment with the sequences (definitely) wrapped, following your --open (or first --append) argument use the argument --wrap:

  jalview --open examples/uniref50.fa --wrap
  
To ensure an alignment is not wrapped use --nowrap:
  jalview --open examples/uniref50.fa --nowrap
  

--showannotations / --noshowannotations

You can specify whether the currently opened alignment window should show alignment annotations (e.g. Conservation, Quality, Consensus...) or not with either --showannotations or --noshowannotations. If you don't specify then your saved preference will be used.

  jalview --open examples/uniref50.fa --noshowannotations
  

--title

If you would like to give the alignment window a specific title you can do so with the --title option:

  jalview --open examples/uniref50.fa --title "My example alignment"
  

Adding 3D structures (--structure, --seqid, --structureviewer, --paematrix, --tempfac, --showssannotations)

--structure

You can add a 3D structure file to a sequence in the current alignment window with the --structure option:

  jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  
By default this attaches to the first sequence in the alignment but most likely you will want to attach it to a specific sequence.

--seqid

The easiest way to specify a sequence ID for your structure is to follow the --structure argument with a --seqid argument with a value of a sequence ID in the alignment. This does of course require some knowledge of the sequences in the alignment files that have been opened.
Alternatively you can specify a sub-value with the --structure argument value. You do this by preceding the value with square brackets and seqid=SequenceId, like this:

  jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  
which is equivalent to
  jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb --seqid FER1_SPIOL
  

The sub-value seqid=FER1_SPIOL takes precedence over the following argument --seqid FER1_SPIOL if you accidentally specify both (in which case the argument will probably be completely unused).

If you don't know the sequence IDs but do know the position of the sequence in the alignment, you can also specify an INDEX in the sub-values to indicate which sequence in the alignment to attach the sequence to (although this is less precise). This is a zero-indexed value, so to specify the eighth sequence in the alignment use:

  jalview --open examples/uniref50.fa --structure [7]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  

Remember that you might need to escape any spaces in the sequence ID or enclose the ID in quotation marks.

--structureviewer

You can specify which structure viewer (or none) to use to open the structure using either the --structureviewer argument or the structureviewer sub-value. Multiple sub-values can be specified together, separated by a comma ','. Possible values for the structureviewer are:
none,
jmol,
chimera,
chimerax,
pymol.

none and jmol will always be available, but to use the others you must have the appropriate software already set up on your computer and in Jalview. See the page Discovering and Viewing PDB and 3D-Beacons structures for more details.

  jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,structureviewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  
or, if you prefer
  jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb --seqid FER1_SPIOL --structureviewer none
  

--paematrix

If you are opening a structure file that has a PAE matrix (provided as a JSON file), such as from an AlphaFold model or an nf-core pipeline, you can add the PAE matrix as an annotation by following the --structure argument with a --paematrix argument with the filename. You can also specify a paematrix=filename sub-value.

  jalview --open examples/uniref50.fa --structure [seqid=FER1+SPIOL,structureviewer=pymol]examples/AlphaFold/AF-P00221-F1-model_v4.pdb --paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json
  

--tempfac

Structure files may have a temperature factor associated with the structure component positions. If the temperature factor is a pLDDT confidence score, such as with an AlphaFold model, you can specify this by using a following argument of --tempfac with a value of plddt. This will enable standard pLDDT colouring of the temperature factor annotation. Valid values are: default, plddt. More types of temperature factor may be added in future releases of Jalview.
The value can also be specified as a sub-value:

  jalview --open examples/uniref50.fa --structure [seqid=FER1+SPIOL,structureviewer=jmol,tempfac=plddt]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  
which is equivalent to
  jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb --tempfac plddt --seqid FER1+SPIOL
   --structureviewer jmol
  

--showssannotations / --noshowssannotations

You can specify whether the currently opened alignment window should show secondary structure annotations or not with either --showssannotations or --noshowssannotations. If you don't specify then your saved preference will be used.

  jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb --noshowssannotations
  
or you can use a sub-value modifier:
  jalview --open examples/uniref50.fa --structure [noshowssannotations]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
  

Outputting/converting alignment files and images (--output, --format, --image, --type, --textrenderer, --scale, --backups, --overwrite)

You can save an alignment as an alignment file, or exported as an image, in different formats. Jalview's alignment output formats are: fasta, pfam, stockholm, pir, blc, amsa, json, pileup, msf, clustal, phylip, jalview.

Alignments can be exported as an image in formats EPS, SVG, HTML, BioJSON (vector formats) or PNG (bitmap format).

In vector formats you can specify whether text should be rendered as text (which may have font changes, but will produce a smaller and more usable file) or as lineart (which will retain exact appearance of text, but will be less easy to edit or use to copy text).

In bitmap formats (currently only PNG, but what else would you want?!) you can specify a scaling factor to improve the resolution of the output image.

--output

To save the open alignment in a new alignment file use --output filename. The format for the file can be found from the extension of filename, or if you are using a non-standard extension you can use a following --format argument, or specify it as a sub-value modifier.

Recognised formats and their recognised 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).

For example, to open a FASTA file, append another FASTA file and then save the concatenation as a Stockholm file, do

  jalview --open alignment1.fa --append alignment2.fa --output bothalignments.stk
  
or
  jalview --append alignment*.fa --output bigballofstring.txt --format stockholm
  
or
  jalview --append alignment*.fa --output [format=stockholm]bigballofstring.txt
  

--format

To specify the format of the output file (if using an unrecognised file extension) use the --format argument to specify a value (see above). A sub-value modifier on the --output value can also be used.

--image

  

--

  

--

  

--

  

Filename substitutions and batch processing (--substitutions, --new, --close, --all)

--

  

--

  

--

  

--

  

--

  

Continue to Jalview Command Line Arguments: advanced usage.