JWS-112 Bumping version of ClustalO (src, binaries and windows) to version 1.2.4.
[jabaws.git] / binaries / src / clustalo / README
index 109f65e..d3bd987 100644 (file)
@@ -1,16 +1,27 @@
 \r
 \r
 CLUSTAL-OMEGA is a general purpose multiple sequence alignment program\r
-for proteins.\r
+for protein and DNA/RNA.\r
 \r
 \r
+If you like Clustal-Omega please cite: Sievers F, Wilm A, Dineen D,\r
+ Gibson TJ, Karplus K, Li W, Lopez R, McWilliam H, Remmert M, Söding\r
+ J, Thompson JD, Higgins DG.  Fast, scalable generation of\r
+ high-quality protein multiple sequence alignments using Clustal\r
+ Omega.  Mol Syst Biol. 2011 Oct 11;7:539. doi:\r
+ 10.1038/msb.2011.75. PMID: 21988835.\r
+If you don't like Clustal-Omega, please let us know why (and cite us\r
+anyway).\r
+\r
+Check http://www.clustal.org for more information and updates.\r
+\r
 \r
 INTRODUCTION\r
 \r
 Clustal-Omega is a general purpose multiple sequence alignment (MSA)\r
-program for proteins. It produces high quality MSAs and is capable of\r
-handling data-sets of hundreds of thousands of sequences in reasonable\r
-time.\r
+program for protein and DNA/RNA. It produces high quality MSAs and is\r
+capable of handling data-sets of hundreds of thousands of sequences in\r
+reasonable time.\r
 \r
 In default mode, users give a file of sequences to be aligned and\r
 these are clustered to produce a guide tree and this is used to guide\r
@@ -28,9 +39,8 @@ sequences in O(N*log(N)) time. Multiple alignment then proceeds by
 aligning larger and larger alignments using HHalign, following the\r
 clustering given by the guide tree.\r
 \r
-In its current form Clustal-Omega can only align protein sequences but\r
-not DNA/RNA sequences. It is envisioned that DNA/RNA will become\r
-available in a future version.\r
+In its current form Clustal-Omega has been extensivly tested for\r
+protein sequences, DNA/RNA support has been added since version 1.1.0.\r
 \r
 \r
 \r
@@ -51,6 +61,15 @@ SEQUENCE INPUT:
 --profile2, --p2=<file>\r
        Pre-aligned multiple sequence file (aligned columns will be kept fixed)\r
 \r
+--is-profile\r
+       disable check if profile, force profile (default no)\r
+\r
+-t, --seqtype={Protein, RNA, DNA} \r
+       Force a sequence type (default: auto)\r
+\r
+--infmt={a2m=fa[sta],clu[stal],msf,phy[lip],selex,st[ockholm],vie[nna]} \r
+       Forced sequence input file format (default: auto)\r
+\r
 \r
 For sequence and profile input Clustal-Omega uses the Squid library\r
 from Sean Eddy [3].\r
@@ -80,6 +99,7 @@ combinations of the above are:
 \r
     Use this option to align two alignments (profiles) together.\r
 \r
+\r
 (c) one file with un/aligned sequences (i) and one profile (ii); the\r
     profile is converted into a HMM and the un-aligned sequences will\r
     be multiply aligned (using the HMM background information) to form\r
@@ -108,6 +128,11 @@ combinations of the above are:
     Use this option to make a new multiple alignment of sequences from\r
     the input file and use the HMM as a guide (EPA).\r
 \r
+Sequences that all have the same lengths but do not contain a single\r
+gap are by default not recognised as a profile. If these sequences are\r
+indeed a profile and not just a collection of unaligned sequences that\r
+happen to have the same length, then specify the --is-profile flag.\r
+\r
 \r
 Invalid combinations of the above are:\r
 \r
@@ -133,16 +158,17 @@ The following MSA file formats are allowed:
     selex,\r
     stockholm\r
 \r
+Clustal-Omega accepts gzip-ed input.\r
+\r
 \r
 Prior to MSA, Clustal-Omega de-aligns all sequence input (i). However,\r
 alignment information is automatically converted into a HMM and used\r
 during MSA, unless the --dealign flag is specifically set.  Profiles\r
 (ii) are not de-aligned.\r
 \r
-The Clustal-Omega alignment engine can at the moment not process\r
-DNA/RNA. If a sequence input file (i) or a profile (ii) is interpreted\r
-as DNA/RNA the program will terminate during the file input stage.\r
-\r
+Since version 1.1.0 the Clustal-Omega alignment engine can process\r
+DNA/RNA. Clustal-Omega tries to guess the sequence type (protein,\r
+DNA/RNA), but this can be over-ruled with the --seqtype (-t) flag.\r
 \r
 \r
 CLUSTERING:\r
@@ -166,6 +192,17 @@ CLUSTERING:
   --full-iter\r
        Use full distance matrix for guide-tree calculation during iteration (mBed is default)\r
 \r
+  --cluster-size=<n>        \r
+       soft maximum of sequences in sub-clusters\r
+\r
+  --clustering-out=<file>   \r
+       Clustering output file\r
+\r
+  --use-kimura\r
+       use Kimura distance correction for aligned sequences (default no)\r
+\r
+  --percent-id\r
+       convert distances into percent identities (default no)\r
 \r
 In order to produce a multiple alignment Clustal-Omega requires a\r
 guide tree which defines the order in which sequences/profiles are\r
@@ -174,65 +211,120 @@ matrix. Conventionally, this distance matrix is comprised of all the
 pair-wise distances of the sequences. The distance measure\r
 Clustal-Omega uses for pair-wise distances of un-aligned sequences is\r
 the k-tuple measure [4], which was also implemented in Clustal 1.83\r
-and ClustalW2 [5,6]. If the sequences inputted via -i are aligned\r
-Clustal-Omega uses the Kimura-corrected pairwise aligned identities\r
-[7]. The computational effort (time/memory) to calculate and store a\r
-full distance matrix grows quadratically with the number of sequences.\r
-Clustal-Omega can improve this scalability to N*log(N) by employing a\r
-fast clustering algorithm called mBed [2]; this option is\r
-automatically invoked (default). If a full distance matrix evaluation\r
-is desired, then the --full flag has to be set. The mBed mode\r
-calculates a reduced set of pair-wise distances. These distances are\r
-used in a k-means algorithm, that clusters at most 100 sequences. For\r
-each cluster a full distance matrix is calculated. No full distance\r
-matrix (of all input sequences) is calculated in mBed mode. If there\r
-are less than 100 sequences in the input, then in effect a full\r
-distance matrix is calculated in mBed mode, however, no distance\r
-matrix can be outputted (see below).\r
-\r
+and ClustalW2 [5,6]. If the protein sequences inputted via -i are\r
+aligned, then Clustal-Omega uses pairwise aligned identities, these\r
+distances can be Kimura-corrected [7] by specifying --use-kimura. The\r
+distances between aligned DNA/RNA sequences are determined from the\r
+alignment, no Kimura correction can be used. The computational effort\r
+(time/memory) to calculate and store a full distance matrix grows\r
+quadratically with the number of sequences.  Clustal-Omega can improve\r
+this scalability to N*log(N) by employing a fast clustering algorithm\r
+called mBed [2]; this option is automatically invoked (default). If a\r
+full distance matrix evaluation is desired, then the --full flag has\r
+to be set. The mBed mode calculates a reduced set of pair-wise\r
+distances. These distances are used in a k-means algorithm, that\r
+clusters at most 100 sequences. For each cluster a full distance\r
+matrix is calculated. No full distance matrix (of all input sequences)\r
+is calculated in mBed mode. If there are less than 100 sequences in\r
+the input, then in effect a full distance matrix is calculated in mBed\r
+mode, however, no distance matrix can be outputted (see below).  The\r
+default cluster size of 100 can be over-written by specifying the\r
+--cluster-size flag.\r
 \r
 Clustal-Omega uses Muscle's [8] fast UPGMA implementation to construct\r
 its guide trees from the distance matrix. By default, the distance\r
 matrix is used internally to construct the guide tree and is then\r
 discarded. By specifying --distmat-out the internal distance matrix\r
-can be written to file. This is only possible in --full mode. The\r
-guide trees by default are used internally to guide the multiple\r
-alignment and are then discarded. By specifying the --guidetree-out\r
-option these internal guide trees can be written out to\r
-file. Conversely, the distance calculation and/or guide tree building\r
-stage can be skipped, by reading in a pre-calculated distance matrix\r
-and/or pre-calculated guide tree. These options are invoked by\r
+can be written to file. This is only possible in --full or --full-iter\r
+mode. The guide trees by default are used internally to guide the\r
+multiple alignment and are then discarded. By specifying the\r
+--guidetree-out option these internal guide trees can be written out\r
+to file. Conversely, the distance calculation and/or guide tree\r
+building stage can be skipped, by reading in a pre-calculated distance\r
+matrix and/or pre-calculated guide tree. These options are invoked by\r
 specifying the --distmat-in and/or --guidetree-in flags,\r
-respectively. However, distance matrix reading is disabled in the\r
-current version. By default, distance matrix and guide tree files are\r
-not over-written, if a file with the specified name already exists. In\r
+respectively. By default, distance matrix and guide tree files are not\r
+over-written, if a file with the specified name already exists. In\r
 this case Clustal-Omega aborts during the command-line processing\r
 stage. To force over-writing of already existing files use the --force\r
 flag (see MISCELLANEOUS).  In mBed mode a full distance matrix cannot\r
 be outputted, distance matrix output is only possible in --full mode.\r
 mBed or --full distance mode do not affect the ability to write out\r
-guide-trees.\r
+guide-trees. It is possible to perform an initial mBed (not-full)\r
+distance calculation and a subsequent full distance calculation by\r
+specifying the --full-iter flag (see section ITERATION). In this case\r
+a distance matrix can be outputted.\r
 \r
 Guide trees can be iterated to refine the alignment (see section\r
 ITERATION). Clustal-Omega takes the alignment, that was produced\r
 initially and constructs a new distance matrix from this alignment.\r
-The distance measure used at this stage is the Kimura distance [7]. By\r
-default, Clustal-Omega constructs a reduced distance matrix at this\r
-stage using the mBed algorithm, which will then be used to create an\r
-improved (iterated) new guide tree. To turn off mBed-like clustering\r
-at this stage the --full-iter flag has to be set. While Kimura\r
-distances in general are much faster to calculate than k-tuple\r
-distances, time and memory requirements still scale quadratically with\r
-the number of sequences and --full-iter clustering should only be\r
-considered for smaller cases (<< 10,000 sequences).\r
-\r
+The distance measure used at this stage is a full alignment distance\r
+(as opposed the initial pairwise k-tuple distance); distances of\r
+protein sequences can be Kimura corrected [7], DNA/RNA distances are\r
+not. By default, Clustal-Omega constructs a reduced distance matrix at\r
+this stage using the mBed algorithm, which will then be used to create\r
+an improved (iterated) new guide tree. To turn off mBed-like\r
+clustering at this stage the --full-iter flag has to be set. While\r
+full alignment distances in general are much faster to calculate than\r
+k-tuple distances, time and memory requirements still scale\r
+quadratically with the number of sequences and --full-iter clustering\r
+should only be considered for smaller cases (<< 10,000 sequences) or\r
+if response time and resources are not an issue.\r
+\r
+The default cluster size in mBed mode is 100. This means that\r
+sequences are grouped into clusters with a soft maximum of 100\r
+sequences, full distance matrices are calculated for these clusters,\r
+guide-trees are calculated for the clusters and the clusters are then\r
+strung together with an over-arching guide-tree. It is possible to\r
+change the cluster-size with the --cluster-size flag. The clustering\r
+can be outputted to file. The output is comprised of the cluster\r
+index, a running index for the sequences within each cluster, the\r
+running index for the sequence within the input file, the name of the\r
+sequence and the bi-section sequence (see EXAMPLES). \r
+\r
+Clustal-Omega uses pair-distances. Between unaligned sequences these\r
+are so called k-tuple distance, between aligned sequences they are\r
+full alignment distances, as employed by Squid. These values range\r
+between 0.0 (identical) and 1.0 (completely different). The distances\r
+are used to construct the guide-tree and are by default outputted if\r
+--distmat-out is specified (and --full and/or --full-iter are\r
+set). For full alignment distances there is a so called Kimura\r
+correction [7] which more closely reflects evolutionary\r
+distance. Kimura-corrected distances range from 0.0 (identical) to\r
+theoretically infinity (completely different). In practice there\r
+appears to be a maximum value. In Clustal-Omega these Kimura-corrected\r
+distance can be outputted for protein if the --use-kimura flag is\r
+specified. Kimura correction is not available for DNA/RNA.  Up to and\r
+including version 1.1.1 Kimura-corrected distances were outputted by\r
+default (where possible). Since version 1.2.0 the default is to output\r
+uncorrected distances.\r
+\r
+\r
+Pair-distances closely correspond to percentage pair-wise identities\r
+through i=100*(1-d), where i is the percentage pair-wise identity and\r
+d is the pair-wise distance. Percentage pair-wise identities can be\r
+outputted in Clustal-Omega instead of the distance matrix by\r
+specifying the --percent-id flag as well as --distmat-out, --full\r
+and/or --full-iter. Percentage pair-wise identities cannot be\r
+outputted if --use-kimura is specified.\r
 \r
 \r
 ALIGNMENT OUTPUT:\r
 \r
-  -o, --out, --outfile={file,-} Multiple sequence alignment output file (default: stdout)\r
+  -o, --out, --outfile={file,-} \r
+       Multiple sequence alignment output file (default: stdout)\r
+\r
+  --outfmt={a2m=fa[sta],clu[stal],msf,phy[lip],selex,st[ockholm],vie[nna]} \r
+       MSA output file format (default: fasta)\r
+\r
+  --residuenumber, --resno  \r
+       in Clustal format print residue numbers (default no)\r
 \r
-  --outfmt={a2m=fa[sta],clu[stal],msf,phy[lip],selex,st[ockholm],vie[nna]} MSA output file format (default: fasta)\r
+  --wrap=<n>  \r
+       number of residues before line-wrap in output\r
+\r
+  --output-order={input-order,tree-order} \r
+       MSA output order like in input/guide-tree\r
 \r
 \r
 By default Clustal-Omega writes its results (alignments) to stdout. An\r
@@ -261,6 +353,19 @@ Clustal-Omega can output alignments in various formats by setting the
 \r
   * for Vienna format set: --outfmt=vie  or  --outfmt=vienna\r
 \r
+In ClustalW one could print the residue number of the last residue in\r
+each line in Clustal-Format. This feature can be turned on by setting\r
+the --resno or --residuenumber flag.\r
+\r
+The line lengths in Clustal Format is usually 60 residues, in Fasta\r
+format it is usually 60 or 80 residues. This value can be set using\r
+the --wrap flag.\r
+\r
+By default the order of sequences in the output is the same as in the\r
+input (--output-order=input-order). This can be changed to the order\r
+in which the sequences appear in the guide-tree by setting\r
+--output-order=tree-order.\r
+\r
 \r
 ITERATION:\r
 \r
@@ -274,9 +379,9 @@ ITERATION:
 By default, Clustal-Omega calculates (or reads in) a guide tree and\r
 performs a multiple alignment in the order specified by this guide\r
 tree. This alignment is then outputted. Clustal-Omega can 'iterate'\r
-its guide tree. The hope is that the (Kimura) distances, that can be\r
-derived from the initial alignment, will give rise to a better guide\r
-tree, and by extension, to a better alignment.\r
+its guide tree. The hope is that the full alignment distances, that\r
+can be derived from the initial alignment, will give rise to a better\r
+guide tree, and by extension, to a better alignment.\r
 \r
 A similar rationale applies to HMM-iteration. MSAs in general are very\r
 'vulnerable' at their early stages. Sequences that are aligned at an\r
@@ -317,9 +422,9 @@ re-calculated. This is invoked by setting the --iter flag. For
 example, if --iter=1, then first an initial alignment is produced\r
 (without external HMM background information and using k-tuple\r
 distances to calculate the guide tree). This initial alignment is then\r
-used to re-calculate a new guide tree (using Kimura distances) and to\r
-create a HMM. The new guide tree and the HMM are then used to produce\r
-a new MSA.\r
+used to re-calculate a new guide tree (using full alignment distances)\r
+and to create a HMM. The new guide tree and the HMM are then used to\r
+produce a new MSA.\r
 \r
 Iteration of guide tree and HMM can be de-coupled. This means that the\r
 number of guide tree iterations and HMM iterations can be\r
@@ -333,7 +438,11 @@ be performed only 3 times, then one should set --iter=5 and
 --max-guidetree-iterations=3. All three flags can be specified at the\r
 same time (however, this makes no sense). It is not sufficient just to\r
 specify --max-guidetree-iterations and --max-hmm-iterations but not\r
---iter. If any iteration is desired --iter has to be set.\r
+--iter. If any iteration is desired, then --iter has to be\r
+set. Conversely, if no alignment is desired but only distance\r
+calculation and tree construction, then --max-hmm-iterations=-1 will\r
+terminate the calculation before the alignment stage; --iter does not\r
+have to be specified in this case.\r
 \r
 \r
 LIMITS (will exit early, if exceeded):\r
@@ -474,7 +583,7 @@ Clustal-Omega reads the file globin.sto (of aligned sequences in
 Stockholm format). It converts the alignment into a HMM, de-aligns the\r
 sequences and re-aligns them, transferring pseudo-count information to\r
 the sequences/profiles during the MSA. The guide tree is constructed\r
-using a full distance matrix of Kimura distances.\r
+using a full distance matrix.\r
 \r
 \r
 ./clustalo -i globin.sto  --dealign\r
@@ -491,15 +600,15 @@ unaligned output (like in the first example ./clustalo -i globin.fa)
 Clustal-Omega reads the file globin.fa, creates a UPGMA guide tree\r
 built from k-tuple distances, and performs an initial alignment. This\r
 initial alignment is converted into a HMM and a new guide tree is\r
-built from the Kimura distances of the initial alignment. The\r
-un-aligned sequences are then aligned (for the second time but this\r
-time) using pseudo-count information from the HMM created after the\r
-initial alignment (and using the new guide tree). This second\r
-alignment is then again converted into a HMM and a new guide tree is\r
-constructed. The un-aligned sequences are then aligned (for a third\r
-time), again using pseudo-count information of the HMM from the\r
-previous step and the most recent guide tree. The final alignment is\r
-written to screen.\r
+built from the (preliminary) full alignment distances of the initial\r
+alignment. The un-aligned sequences are then aligned (for the second\r
+time but this time) using pseudo-count information from the HMM\r
+created after the initial alignment (and using the new guide\r
+tree). This second alignment is then again converted into a HMM and a\r
+new guide tree is constructed. The un-aligned sequences are then\r
+aligned (for a third time), again using pseudo-count information of\r
+the HMM from the previous step and the most recent guide tree. The\r
+final alignment is written to screen.\r
 \r
 \r
 ./clustalo -i globin.fa --iter=5 --max-guidetree-iterations=1\r
@@ -507,14 +616,14 @@ written to screen.
 Clustal-Omega reads the file globin.fa, creates a UPGMA guide tree\r
 built from k-tuple distances, and performs an initial alignment. This\r
 initial alignment is converted into a HMM and a new guide tree is\r
-built from the Kimura distances of the initial alignment. The\r
-un-aligned sequences are then aligned (for the second time but this\r
-time) using pseudo-count information from the HMM created after the\r
-initial alignment (and using the new guide tree). For the last 4\r
-iterations the guide tree is left unchanged and only HMM iteration is\r
-performed. This means that intermediate alignments are converted to\r
-HMMs, and these intermediate HMMs are used to guide the MSA during\r
-subsequent iteration stages.\r
+built from the (preliminary) full alignment distances of the initial\r
+alignment. The un-aligned sequences are then aligned (for the second\r
+time but this time) using pseudo-count information from the HMM\r
+created after the initial alignment (and using the new guide\r
+tree). For the last 4 iterations the guide tree is left unchanged and\r
+only HMM iteration is performed. This means that intermediate\r
+alignments are converted to HMMs, and these intermediate HMMs are used\r
+to guide the MSA during subsequent iteration stages.\r
 \r
 \r
 ./clustalo -i globin.fa -o globin.a2m -v\r
@@ -586,6 +695,40 @@ was used to align the sequences in globin.fa; the hope being that this
 intermediate alignment will have profited from the bigger profile.\r
 \r
 \r
+./clustalo -i globin.fa --clustering-out=globin.aux  --cluster-size=3\r
+\r
+globin.fa contains 7 sequences. Usually a full distance matrix is\r
+created for less than 100 sequences. This is over-written by\r
+specifying --cluster-size=3. Clustal-Omega attempts to create clusters\r
+of no more than 3 sequences. This clustering is recorded in the file\r
+globin.aux which looks like\r
+\r
+       Cluster 0: object 0 has index 0 (=seq P1|HBB_HUMAN )     00\r
+       Cluster 0: object 1 has index 1 (=seq P1|HBB_HORSE )     00\r
+       Cluster 1: object 0 has index 4 (=seq P1|MYG_PHYCA )     1\r
+       Cluster 1: object 1 has index 5 (=seq P1|GLB5_PETMA )    1\r
+       Cluster 1: object 2 has index 6 (=seq P1|LGB2_LUPLU )    1\r
+       Cluster 2: object 0 has index 2 (=seq P1|HBA_HUMAN )     01\r
+       Cluster 2: object 1 has index 3 (=seq P1|HBA_HORSE )     01\r
+\r
+There are 3 clusters, named Cluster~0, Cluster~1 and\r
+Cluster~2. Cluster~0 has 2 sequences, which are sequence 0 and 1 from\r
+the input file, named P1|HBB_HUMAN and P1|HBB_HORSE. Cluster~1 has 3\r
+sequences, sequences 4,5,6 from the input file and Cluster~2 has 2\r
+sequences, sequences 2 and 3 from the input file. The binary string at\r
+the end of each line encode the bi-section that led to this\r
+clustering. The first digit indicated the initial split. The '0'\r
+indicates that in the first split sequences 0,1,2,3 were grouped\r
+together and the '1' that sequences 4,5,6 were grouped together. The\r
+size of Cluster~1 does not exceed --cluster-size, so it does not need\r
+to be broken up. The Cluster (with the initial '0') containing\r
+sequences 0,1,2,3 is comprised of 4 sequences; this number exceeds\r
+--cluster-size, so that it will have to be broken up. This second\r
+split is indicated by the second digit of the binary string. The\r
+second '0' indicates that sequences 0,1 fall into one Cluster (which\r
+will ultimately be Cluster~0), and the second '1' indicates that\r
+sequences 2,3 fall into another cluster (ultimately Cluster~2).\r
+\r
 \r
 LITERATURE:\r
 \r