Skip to content

Command line options

Chloë Cornelissen edited this page Nov 17, 2026 · 6 revisions

Commands

  • download

    Download and preprocess data from NCBI nr or GTDB.

  • prepare

    Construct CAT/BAT/RAT database files.

  • cat

    Run Contig Annotation Tool (CAT)

  • bat

    Run Bin Annotation Tool (BAT).

  • rat

    Read Annotation Tool (RAT)

  • add_names

    Add taxonomic names to CAT, BAT, or RAT output files.

  • summarise

    Summarise a named CAT or BAT classification file.

General Options

  • --no_log

    turns off logging to a log file.

  • --threads/-n #

    Number of CPU threads. By default, the program will use 1 cpu core.

  • --verbose

    Shows verbose output of external tools (e.g. DIAMOND, BWA-MEM)

  • --debug

    Verbose flag for CAT_pack itself including unexpected-error tracebacks with variable names (Also handy for if you run into an issue and want to open a Issue)

  • --quiet

    Turns off verbose terminal output

Download options

  • --db {nr, GTDB}

    Choose a database

  • --out_dir <DIR>

    Directory where the downloaded data will be stored.

  • --cleanup

    Remove unnecessary files after all data have been processed

Prepare options

  • --db_fasta <FastaFile>

    Fasta file containing all sequences.

  • --names <FILE>

    Taxonomy names dump, usually names.dmp

  • --nodes <FILE>

    Taxonomy nodes dump file, usually nodes.dmp

  • --acc2tax <FILE[.gz|.bz2]>

    Tab seperated accession to taxid table. Generated by the download step. Can be compressed as either .gz or bz2.

  • --database/--db_dir/-d <DIR>

    Output directory where CAT/BAT/RAT database and taxonomy files will be created

  • --common_prefix <str>

    Sets the prefix for generated database files. The default will be <current_date>_CAT_pack

  • --build_mmseqs2

    Also create an MMseqs2 sequence database.

  • --gpu

    Also prepare a GPU MMseqs2 database. Requires --build_mmseqs2.

  • --path_to_mmseqs <path>

    Path to MMseqs2, used with --build_mmseqs2.

  • --path_to_diamond <path>

    Path to DIAMOND. You can supply it if it is not on PATH.

CAT options

  • --contigs/-c <FILE[.gz|.bz2]>

    Input contig FASTA file that you want to classify

  • --database/-d <DIR>

    Directory that contains the database and taxonomy files

  • --range/-r <Decimal>

    r parameter, this keeps hits within this percentage of the best bitscore for each query. Default is 10, with a range of 0 to 100

  • --fraction/-f <Decimal>

    f parameter, this sets the fraction of bitscore support a taxon must exceeds. Default is 0.5, with a range of 0-0.99.

Note

If the fraction is set to smaller than 0.5 one contig may have multiple classifications

see shared classification options for more options.

BAT options

Classifies bins or metagenome-assembled genomes.

  • --bin_fasta/--bin_folder/-b <FILE|DIR>

    Input bin FASTA or directory of bin FASTAs.

  • --output_prefix/--out_prefix/-o <str>

    Sets the prefix for generated files. default is out.BAT

  • --bin_suffix/-s <str>

    Selects files with this suffix when reading a bin directory. Also recognizes the corresponding gzip and bzip2 files. The default is .fna

  • --database/-d <DIR>

    Directory that contains the database and taxonomy files

  • --range/-r <Decimal>

    r parameter, this keeps hits within this percentage of the best bitscore for each query. Default is 5, with a range of 0 to 100

  • --fraction/-f <Decimal>

    f parameter, this sets the fraction of bitscore support a taxon must exceeds. Default is 0.3, with a range of 0-0.99.

Note

If the fraction is set to smaller than 0.5 one contig may have multiple classifications

see shared classification options for more options.

Shared classification options

These options are available for CAT, BAT, and RAT unless noted otherwise.

  • --no_stars

    Disables the adding of stars to taxis that suggest questionable taxonomic assignments.

  • --log_file <FilePath>

    Set your own log path. By default this is <output_prefix>.log

  • --tmpdir <DIR>

    Set a custom directory for temporary files

  • --proteins_fasta/-p <FILE>

    Supply already predicted proteins, For RAT, this only applies to its CAT & BAT runs.

RAT options

Assigns taxonomy to reads using bins, contigs, and direct searches.

  • --contigs_fasta/-c <FILE[.gz|.bz2]>

    Input contig FASTA file.

  • --database/-d <DIR>

    Directory that contains the database and taxonomy files.

  • --mode/-m {mcr, cr, mr, mc, c, m}

    Choose the classification mode. m uses bins or MAGs, c uses contigs, and r enables direct searches of sequences that remain unclassified.

    • mcr: Use bins, contigs, and direct searches.

    • cr: Use contigs and direct searches.

    • mr: Use bins and direct searches.

    • mc: Use bins and contigs.

    • c: Use contigs.

    • m: Use bins.

  • --output_prefix/--out_prefix/-o <str>

    Sets the prefix for generated files. The default is out.RAT.

  • --read_file/-r <FILE[.gz|.bz2]>

    Input read file. For paired-end reads, repeat the option:

    --read_file reads_R1.fq.gz --read_file reads_R2.fq.gz
    
  • --bam_file <FILE>

    Supply an existing sorted BAM or SAM mapping file and skip running a new read mapping. Repeat the option to supply separate mate files.

Note

A new direct search still requires the original read files. Supply these with --read_file, or supply existing direct-search results with --alignment_unmapped or --u2c.

  • --bin_fasta/--bin_folder/-b <FILE|DIR>

    Input bin FASTA or directory of bin FASTAs. Required if the classification mode includes m.

  • --bin_suffix/-s <str>

    Selects files with this suffix when reading a bin directory. Also recognizes the corresponding gzip and bzip2 files. The default is .fna.

  • --c2c <FILE[.gz|.bz2]>

    Supply an existing contig2classification file and skip running CAT again.

  • --b2c <FILE[.gz|.bz2]>

    Supply an existing bin2classification file and skip running BAT again. The bin FASTA files are still required to couple contigs to bins.

  • --u2c <FILE[.gz|.bz2]>

    Supply an existing unmapped2classification file and skip the direct search and classification.

  • --alignment_unmapped <FILE[.gz|.bz2]>

    Supply an alignment table for reads and contigs that could not be classified by CAT/BAT. This skips running a new direct alignment.

  • --read2classification

    Write a classification row for each read or mate.

  • --mapping_quality #

    Minimum mapping quality Phred score. The default is 2, with a range of 0 to 255.

  • --mapper {bwa, bwa-mem2}

    Choose the read mapper. The default is bwa.

  • --path_to_bwa <PATH>

    Path to the selected BWA or BWA-MEM2 executable. Supply if it is not on PATH.

  • --path_to_samtools <PATH>

    Path to SAMtools. Supply if it is not on PATH.

  • --sort_memory_mib #

    Set the memory used by SAMtools sorting per thread, in MiB. The minimum is 1. If not supplied, SAMtools uses its own default.

  • --range <Decimal>

    r parameter, this keeps hits within this percentage of the best bitscore for each query. The default is 10, with a range of 0 to 100.

Note

For RAT, -r is used for read files. Use --range to change the r parameter.

  • --fraction/-f <Decimal>

    f parameter, this sets the fraction of bitscore support a taxon must exceed. The default is 0.5, with a range of 0 to 0.99.

See shared classification options for more options.

Shared alignment options

  • --alignment_table/-a <FILE>

    Supply a alignment table and skip running a new alignment. Supply the matching protein FASTA with -p. For RAT direct-search hits, use --alignment_unmapped instead.

  • --bit_score_column #

    Select a custom bitscore column, NOTE this uses a zero based index, so 2 for the third column or 9 for the eight column. By default it automatically detects compact input (Consisting of: query, target, bit-score) and BLAST6 default output (Containing twelve columns).

  • --blast6_out

    Turns off the default compact alignment output table, and writes a twelve column BLAST6 alignment table

  • --compress

    Compresses the alignment tables in a gzip format.

  • --top #

    Set a custom percentage range of the top alignment score for a query. Default is 11, with a range of 0 to 100 and must exceed the --range option

DIAMOND specific options

  • --path_to_diamond <PATH>

    Path to DIAMOND. Supply if it is not on PATH.

  • --diamond_mode {default, faster, fast, mid-sensitive, sensitive, more-sensitive, very-sensitive, ultra-sensitive}

    Choose the sensitivity of diamond. By default this is set to default. This will increase sensitivity but will make alignment considerably slower.

  • --block_size <Int>

    Setting the parameter lower will decrease memory and temporary disk space usage. Setting it higher will increase performance. Default is 12.

  • --index_chunks <int range>

    For high memory machines, it is advised to set the parameter to 1 (currently the default). This parameter has no effect on temporary disk space usage.

  • --no_self_hits

    Do not report identical self hits. Off by default.

MMseqs2 specific options

  • --sensitivity <Decimal>

    Mseqs2 CPU sensitivity (-s). GPU searches always use maximum sensitivity. The default is 5.7, with a range from 1.0 to 7.5.

  • --split_memory_limit <str>

    MMseqs2 max memory per split, e.g. 10M, 1G. 0 uses all available memory. The default is set to 0

  • --path_to_mmseqs <path>

    Path to MMseqs2. Supply if it is not on PATH.

  • --gpu

    Use MMseqs2 GPU search. Requires a database prepared with --build_mmseqs2 --gpu.

Memory options

These options are available for CAT, BAT, and RAT. Only one memory option can be selected.

  • --low_memory

    Use an estimated memory budget of up to 1 GiB.

  • --high_memory

    Use all detected available memory. This is also the default.

  • --available_memory #

    Set the estimated available memory in GiB. The minimum is 1.

Note

These options control CAT_pack’s memory budget. They do not set a hard memory limit for external tools such as DIAMOND or MMseqs2.

Add_names options

Add taxonomic names to CAT, BAT, or RAT classification output files.

  • --input_file/-i <FILE>

    Input classification or ORF2LCA output file.

  • --output_file/-o <FILE>

    Output file.

  • --database/-d <DIR>

    Directory that contains the database and taxonomy files.

  • --only_official

    Only output official taxonomic ranks: superkingdom, phylum, class, order, family, genus, and species.

  • --exclude_scores

    Do not include bitscore support scores in the lineage of a classification output file.

  • --force

    Overwrite existing output files.

  • --quiet/-q

    Turns off verbose terminal output.

  • --debug

    Show debugging information and unexpected-error tracebacks.

Summarise options

Summarise a named CAT or BAT classification file.

  • --input_file/-i <FILE>

    Input named CAT contig classification or BAT bin classification file.

  • --output_file/-o <FILE>

    Output summary file.

  • --contigs_fasta/-c <FILE>

    Contig FASTA file. Required if you want to summarise a contig classification file.

  • --force

    Overwrite existing output files.

  • --quiet/-q

    Turns off verbose terminal output.

  • --debug

    Show debugging information and unexpected-error tracebacks.

Note

Currently only official ranks are supported, and the input file must contain a single classification per contig or bin.

Clone this wiki locally