Sign inSign up

niemasd/multivirusconsensus

By niemasd

Updated 4 days ago

Fast consensus genome reconstruction of multiple viruses from a mixed sample

Image
0

2.1K

niemasd/multivirusconsensus repository overview

MultiVirusConsensus (MVC)

MultiVirusConsensus (MVC): Fast consensus genome reconstruction of multiple viruses from a mixed sample

Installation

MVC is written in Python 3 and has the following dependencies:

Once you have all dependencies installed, you can simply download MultiVirusConsensus.py to your machine and make it executable:

wget "https://github.com/niemasd/MultiVirusConsensus/releases/latest/download/MultiVirusConsensus.py"
chmod a+x MultiVirusConsensus.py
sudo mv MultiVirusConsensus.py /usr/local/bin/MultiVirusConsensus.py # optional step to install globally

We also provide a Docker image with all dependencies installed: niemasd/multivirusconsensus

Usage

A help message demonstrating MVC usage can be viewed using the -h/--help argument.

Example

./MultiVirusConsensus.py -o output -i example/reads.illumina.30X.fq.gz -r example/NC_001802.fas example/NC_045512.fas example/NC_063383.fas -p example/NC_045512.bed

Optional Arguments

While we anticipate that MVC should perform reasonably well using the default settings, some settings can be optionally tweaked as desired.

Minimap2 Arguments

By default, we run Minimap2 using its short read preset (-x sr). To use a different present, or to manually specify Minimap2 mapping settings, you can provide the Minimap2 arguments you want to use via: --minimap2_args

For example, to use the accurate long reads preset (-x lr:hq), you could run the following:

./MultiVirusConsensus.py --minimap2_args '-x lr:hq' -i hq_long_reads.fq.gz -r example/NC_001802.fas example/NC_045512.fas example/NC_063383.fas -o output

In general, please only include arguments from the Indexing:, Mapping:, and Alignment: sections of the Minimap2 usage: do not include arguments from the Input/Output: section of the Minimap2 usage!

ViralConsensus Arguments

By default, we run ViralConsensus using its default settings. To manually specify ViralConsenus settings, you can provide the ViralConsensus arguments you want to use via: --viral_consensus_args

For example, to change the minimum depth setting to 1 (-d 1), you could run the following:

./MultiVirusConsensus.py --viral_consensus_args '-d 1' -i example/reads.illumina.30X.fq.gz -r example/NC_001802.fas example/NC_045512.fas example/NC_063383.fas -o output

In general, please only include arguments related to consensus sequence calling: do not include arguments related to input/output files!

Interpreting Results

Visualizing Coverages

You can interactively visualize the coverages of each reference sequence of a MultiVirusConsensus run using our visualization web application.

Helper Scripts

We provide helper scripts for post-processing of MultiVirusConsensus results in the scripts directory in this repository. Notably, the summary.py script calculates many summary statistics about the read mapping, base/indel counting, and consensus sequence calling processes and outputs them as a TSV: most importantly, it also attempts to predict which viruses likely actually exist in the sample (e.g. for multi-virus surveillance panels).

Citing MultiVirusConsensus (MVC)

If you use MVC in your work, please cite:

Moshiri N (2026). "MultiVirusConsensus: An accurate and efficient open-source pipeline for identification and consensus sequence generation of multiple viruses from mixed samples." Bioinformatics Advances. vbag256. doi:10.1093/bioadv/vbag256

Tag summary

Content type

Image

Digest

sha256:27a531190

Size

111.7 MB

Last updated

4 days ago

docker pull niemasd/multivirusconsensus