Skip to content

CoverM

CoverM is a tool for reading alignment statistics for metagenomics.

Availability

Cluster Module/Version
BOSE coverm/0.7.0
BGSC N/A

Note: You can simply use module load coverm to activate the most recently installed version of this software.

Arguments / Options

This is a list of arguments for the coverm command that we wanted to highlight. Look at the project README for usage instructions.

Option Description
coverm genome Calculate read coverage per-genome
coverm contig Calculate read coverage per-contig
--threads $SLURM_NTASKS
-t $SLURM_NTASKS
Number of CPUs to use for each calculation
--help Help documentation for each command

Sample Slurm Script

This sample script comes directly from CoverM, with some modifications to work on our cluster.

submit.sh
#!/bin/bash
# -- SLURM SETTINGS -- #
# [..] other settings here [..]

# The following settings are for the overall request to Slurm
#SBATCH --ntasks-per-node=32     # How many CPU cores do you want to request
#SBATCH --nodes=1                # How many nodes do you want to request

# -- SCRIPT COMMANDS -- #

# Load the needed modules
module load coverm/0.7.0      # Load CoverM module

# Downloads test files
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/sample_1.1.fq.gz
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/sample_1.2.fq.gz
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_1.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_2.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_3.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_4.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_5.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_6.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_7.fna
wget https://raw.githubusercontent.com/wwood/CoverM/refs/heads/main/demo/genome_8.fna

# Run a test with the downloaded files and requested Slurm CPU cores, setting the output to output_coverm.tsv
coverm genome \
  --coupled sample_1.1.fq.gz sample_1.2.fq.gz \
  --genome-fasta-files \
    genome_1.fna genome_2.fna genome_3.fna genome_4.fna \
    genome_5.fna genome_6.fna genome_7.fna genome_8.fna \
  -t $SLURM_NTASKS \
  -m mean relative_abundance covered_fraction \
  -o output_coverm.tsv

Real Example

Has your research group used CoverM in a project? Contact the HPC Team and we'd be glad to feature your work.

Citation

Please include the following citation in your papers to support continued development of CoverM.

Aroney, S.T., Newell, R.J., Nissen, J.N., Camargo, A.P., Tyson, G.W. and Woodcroft, B.J., 2025. CoverM: Read alignment statistics for metagenomics, Bioinformatics 41:4, https://doi.org/10.1093/bioinformatics/btaf147.

Resources