anvi-cluster-contigs

A program to cluster items in a merged anvi'o profile using automatic binning algorithms.

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

profile-db contigs-db

Can use

collection

Provides

collection bin

Usage

This program clusters the contigs stored in a profile-db using your binning algorithm of choice and stores the results in several bins.

This is a quick alternative to manually binning your contigs, but it might miss some details that a human doing manual binning would find. After running this, you might want to run anvi-summarize on the resulting collection to look through your bins, and, if necessary, use anvi-refine to change the contents of them.

You have to option to use several different clustering algorithms, which you’ll specify with the driver parameter: concoct, metabat2, maxbin2, dastool, and binsanity.

So, a run of this program will look like the following:

anvi-cluster-contigs -p profile-db \ -c contigs-db \ -C collection \ --driver concoct

Once you specify an algorithm, there are many algorithm specific parameters that you can change to your liking. When this program is set up, these parameters will appear in the help menu for the algorithms that anvi’o can find.

Edit this file to update this information.

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-cluster-contigs.

The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).


Command line usage

anvi-cluster-contigs [-h] -p PROFILE_DB -c CONTIGS_DB -C COLLECTION_NAME --driver DRIVER [-T NUM_THREADS] [--log-file FILE_PATH] [--just-do-it]

Parameters and their descriptions

options
-p, --profile-db PROFILE_DB required
Anvi'o profile database
-c, --contigs-db CONTIGS_DB required
Anvi'o contigs database generated by 'anvi-gen-contigs-database'
-C, --collection-name COLLECTION_NAME required
Collection name.
--driver DRIVER required
Automatic binning drivers. Available options 'concoct, metabat2, maxbin2, dastool, binsanity'. Choices: concoct metabat2 maxbin2 dastool binsanity
-T, --num-threads NUM_THREADS
Maximum number of threads to use for multithreading whenever possible. Very conservatively, the default is 1, unless the environmental variable `ANVIO_THREADS` sets another positive integer. If you use this parameter, it will override `ANVIO_THREADS`. It is a good idea to not exceed the number of CPUs / cores on your system. Plus, please be careful with this option if you are running your commands on a SGE -- if you are clusterizing your runs, and asking for multiple threads to use, you may deplete your resources very fast. Default: 1
--log-file FILE_PATH
File path to store debug/output messages.
--just-do-it
Don't bother me with questions or warnings, just do it.
--driver concoct
--clusters INT
specify maximal number of clusters for VGMM, default 400
--kmer-length INT
pecify kmer length, default 4
--length-threshold INT
specify the sequence length threshold, contigs shorter than this value will not be included. Defaults to 1000
--read-length INT
specify read length for coverage, default 100
--no-cov-normalization
By default the coverage is normalized with regards to samples, then normalized with regards of contigs and finally log transformed. By setting this flag you skip the normalization and only do log transorm of the coverage.
--total-percentage-pca INT
The percentage of variance explained by the principal components for the combined data.
--epsilon FLOAT
Specify the epsilon for VBGMM. Default value is 1.0e-6
--iterations INT
Specify maximum number of iterations for the VBGMM. Default value is 500
--seed INT
Specify an integer to use as seed for clustering. 0 gives a random seed, 1 is the default seed and any other positive integer can be used. Other values give ArgumentTypeError.
--driver metabat2
-m, --minContig INT
Minimum size of a contig for binning (should be >=1500)
--maxP INT
Percentage of 'good' contigs considered for binning decided by connection among contigs. The greater, the more sensitive.
--minS INT
Minimum score of a edge for binning (should be between 1 and 99). The greater, the more specific.
--maxEdges INT
Maximum number of edges per node. The greater, the more sensitive.
--pTNF INT
TNF probability cutoff for building TNF graph. Use it to skip the preparation step. (0: auto).
--noAdd
Turning off additional binning for lost or small contigs.
--minCV INT
Minimum mean coverage of a contig in each library for binning.
--minCVSum INT
Minimum size of a bin as the output.
--minClsSize INT
Minimum size of a bin as the output.
--seed INT
For exact reproducibility. (0: use random seed).
--driver maxbin2
--min-contig-length INT
Minimum contig length. Default: 1000.
--max-iteration INT
Maximum Expectation-Maximization algorithm iteration number. Default 50.
--prob-threshold FLOAT
Probability threshold for EM final classification. Default 0.9.
--merkerset INT
Minimum contig length. Default: 1000
--driver dastool
-S, --source-collections COLLECTION_LIST required
Comma-separated list of collections, case sensitive.
--search-engine PROGRAM
Engine used for single copy gene identification [blast/diamond/usearch]. (default: usearch) Default: usearch
--score-threshold FLOAT
Score threshold until selection algorithm will keep selecting bins [0..1]. (default: 0.5)
--duplicate-penalty FLOAT
Penalty for duplicate single copy genes per bin (weight b). Only change if you know what you're doing. [0..3] (default: 0.6)
--megabin-penalty FLOAT
Penalty for megabins (weight c). Only change if you know what you're doing. [0..3] (default: 0.5)
--db-directory PATH
Directory of single copy gene database. (default: install_dir/db)
--driver binsanity
--preference INT
Specify a preference (default is -3) Note: decreasing the preference leads to more lumping, increasing will lead to more splitting. If your range of coverages are low you will want to decrease the preference, if you have 10 or less replicates increasing the preference could benefit you.
--maxiter INT
Specify a max number of iterations [default is 2000]
--conviter INT
Specify the convergence iteration number (default is 200) e.g Number of iterations with no change in the number of estimated clusters that stops the convergence.
--damp FLOAT
Specify a damping factor between 0.5 and 1, default is 0.9
--contigsize INT
TNF probability cutoff for building TNF graph. Use it to skip the preparation step. (0: auto).

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.