Skip to content
yenkaiCPublic

About

A pipeline to run many different metagenomic tools

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

393 Commits

Folders and files

Repository files navigation

OpusTaxa: Streamlining Metagenome Discoveries

OpusTaxa is an easy‑to‑use pipeline that helps you process shotgun metagenomic data from raw reads to final results. Simply provide your FASTQ files or SRA IDs, and it handles the rest: downloading data and databases, performing quality checks, removing human reads, profiling the microbiome, assembling the metagenome, and running functional analysis. Results are saved as clean tables ready for downstream exploration. OpusTaxa delivers a clear, reproducible, best‑practice workflow without requiring advanced coding or bioinformatics experience.

OpusTaxa has built‑in integration with the Sequence Read Archive (SRA) API, which makes it straightforward to reanalyse published datasets alongside your own.

OpusTaxa Subway Plot

Summary of pipeline

  1. Public Dataset Downloading with SRA Toolkit
    • Parallel downloading
    • Parallel compression with pigz
    • Or provide your own local files!
  2. Quality Control with fastp
    • Filters out low-quality reads
  3. Host Read Removal with NoHuman
  4. Quality Reports with FastQC
    • Quality control reports at each step (raw, trimmed and filter)
    • Aggregates FastQC reports with MultiQC
    • Coverage/redundancy estimation with Nonpareil
  5. Taxonomic Profiling with
  6. Metagenomic Assembly with MetaSPAdes
  7. Gene Prediction with Prodigal-GV
    • Gene/protein prediction on assembled contigs
  8. Functional Profiling with
  9. Inference Analysis with Microbial Load Predictor

Quick Start

# 1. Clone the repository
git clone https://github.com/yenkaiC/OpusTaxa.git
cd OpusTaxa

# 2. Create and activate Snakemake environment
conda create -n snakemake -c conda-forge -c bioconda snakemake
conda activate snakemake

# 3. Test with dry-run (does not download, only checks whether the operation will run correctly)
snakemake --use-conda --dry-run --cores 1

# 4. (Optional) Real test run on the bundled mini dataset (2 samples, 100k reads each, in Misc/Test/Raw_FastQ). Checks that containers, dependencies and core steps execute. Note: the first run also downloads the NoHuman database.
snakemake --use-conda --cores 4 --config test_mode=true

Usage

1. Prepare Input Data

OpusTaxa accepts two input methods:

Option A: Local FASTQ files
Place your paired-end FASTQ files in OpusTaxa/Data/Raw_FastQ/:

OpusTaxa/Data/Raw_FastQ/
├── sample1_R1_001.fastq.gz
├── sample1_R2_001.fastq.gz
├── sample2_R1_001.fastq.gz
└── sample2_R2_001.fastq.gz

Or specify location via command line:

snakemake --workflow-profile config/slurm \
    --config inputFastQDirectory=/path/to/your/data

Supported filename formats (auto-detected and standardised):

Pattern Example Source
{sample}_S#_L###_R1_001.fastq.gz MySample_S1_L001_R1_001.fastq.gz Illumina bcl2fastq
{sample}_S#_R1_001.fastq.gz MySample_S1_R1_001.fastq.gz Illumina (no lane)
{sample}_R1_001.fastq.gz MySample_R1_001.fastq.gz Standard
{sample}_R1.fastq.gz MySample_R1.fastq.gz Simple paired
{sample}_1.fastq.gz SRR12345_1.fastq.gz SRA / ENA
{sample}.R1.fastq.gz MySample.R1.fastq.gz Dot-separated
{sample}.1.fastq.gz MySample.1.fastq.gz Dot-separated

Both .fastq.gz and .fq.gz extensions are accepted. Non-standard filenames are automatically symlinked to the internal convention ({sample}_R1_001.fastq.gz) — your original files are not modified.

Option B: SRA accessions
Add your SRA run IDs to the sra_id.txt file in the OpusTaxa folder, one per line:

SRR27916045
SRR27916046
SRR27916047

Note: Start with 2-3 samples to test before running your full dataset. If the sample has already been processed, OpusTaxa will recognise it and will not re-run.

2. Run the Pipeline

New to OpusTaxa or running on a cluster? Read the full tutorial before running:

Use --config to toggle modules or change settings:

# Local
snakemake --use-conda --cores 16
snakemake --use-conda --cores 16 --config metaphlan=true # Example of a run where Metaphlan and QC was runned.

# HPC / SLURM
snakemake --workflow-profile config/slurm
snakemake --workflow-profile config/slurm --config singlem=true # Only run SingleM (and QC).

3. Access Results

Results are organised in the Data/ and Reports/ directories: The tables from MetaPhlAn, SingleM, Kraken2, and HUMAnN are abundances merged across all samples

OpusTaxa/
├── Data/
│   ├── Raw_FastQ/          # Raw reads
│   ├── FastP/              # Quality-trimmed reads
│   ├── NoHuman/            # Host-filtered reads
│   │   ├── Table/          # Host-read percentage   
│   ├── MetaPhlAn/          
│   │   ├── Table/          # Relative abundance table
│   ├── SingleM/            # Microbial Fractions
│   │   ├── Table/          # Profile tables in different taxonomic orders
│   ├── Kraken2/            
│   │   ├── Table/          # Bracken table (relative-abundance)
│   ├── Sylph/              
│   │   ├── Table/          # # Sylph Average Nucleotide, taxonomic profiles
│   ├── HUMAnN/
│   │   ├── merged/         # Abundance tables of gene-families and pathways (normalised, stratified and unstratified)
│   ├── MetaSPAdes/         # Metagenome Assemblies
│   ├── ProdigalGV/         # Predicted proteins, genes and gene annotations
│   ├── AntiSMASH/          # Biosynthetic Gene Clusters
│   │   ├── Table/ 
│   ├── RGI/                # Antibiotic Resistance Genes
│   │   ├── Table/ 
│   └── MLP/                # Predicted Microbial Load
└── Reports/
    ├── FastQC/             # Individual QC reports
    │   ├── Step_1_Raw/
    │   ├── Step_2_FastP/
    │   └── Step_3_NoHuman/
    ├── MultiQC/            # Aggregated reports
    │   ├── raw_multiqc_report.html
    │   ├── fastp_multiqc_report.html
    │   └── nohuman_multiqc_report.html
    └── Nonpareil/
        └── table/          # Coverage/redundancy tables and curves

Resource Requirements

Minimum (for testing)

  • CPU: 4 cores
  • RAM: 16 GB
  • Storage: 100 GB

Recommended (for production)

  • CPU: 8+ cores
  • RAM: 40+ GB (100 GB for MetaSPAdes, 64GB for HUMAnN)
  • Storage: 500 GB (depends on dataset size)

Citation

If you use OpusTaxa, please cite:

Chen Y-K, Harker CM, Pham CM, Grundy L, Wardill HR, Roach MJ, Ryan FJ. OpusTaxa: A Unified Workflow for Taxonomic Profiling, Assembly, and Functional Analysis of Shotgun Metagenomes. bioRxiv 2026. doi: 10.64898/2026.04.15.718825

Things to note

  • OpusTaxa currently only accepts paired reads.
  • OpusTaxa should be only fed with Illumina or MGI based sequences. Please do not supply long reads or old read tech like 454 sequencing
  • We've configured HUMAnN to run only on the forward read due to drawbacks of collapsing forward and reverse read together.
  • Databases (for selected tools) are downloaded automatically on first run.
  • Small Datasets are not recommended for Microbial Load Predictor (MLP)
  • Microbial Load Predictor was trained only with faecal samples, so may not be suitable for saliva, skin, and other sample types. As the smaples trained were all from adults, there may be uncertainties with children stood samples.

About

A pipeline to run many different metagenomic tools

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages