nf-core viralrecon

SARS-CoV-2 amplicon variant calling, consensus and assembly: a native port of nf-core/viralrecon 3.0.0.

by Temple Compute

Run nf-core viralrecon on Horus

W-57 · nf-core/viralrecon (native port)

SARS-CoV-2 amplicon variant calling, consensus and assembly: a native port of nf-core/viralrecon 3.0.0.

Domain: nf-core ports

Overview

Runs the route nextflow run nf-core/viralrecon -r 3.0.0 -profile test,docker takes, as Horus tasks with the same containers, rendered command lines and per-process cpus/memory. That route is Illumina amplicon reads (ARTIC V1 primers) through fastp, Kraken2, Bowtie2, iVar primer trimming and variant calling, SnpEff/SnpSift, Freyja, a BCFtools consensus checked with Nextclade, Pangolin and QUAST, SPAdes and Unicycler assemblies with Bandage, ABACAS, BLAST and QUAST, then MultiQC. Per-sample steps are horus_map stages over a list of sample meta files. The pipeline's Groovy filters run as small decision tasks: samples with no reads left after fastp, the minimum mapped reads filter and the empty iVar table filter. The Nextclade clade table for MultiQC is a decision task as well, so other samplesheets work too. The workflow has 86 tasks (60 maps).

Left out, because the test profile does not run them: the Nanopore route, --variant_caller bcftools, --consensus_caller ivar, the minia assembler, PlasmidID, Picard MarkDuplicates (--skip_markduplicates is the default), the metagenomic protocol and --additional_annotation.

Variants

Pipeline

fetch_reference     genome fasta/GFF, primer BED, Kraken2 db, Nextclade dataset
stage_samples       samplesheet.csv ──► reads/<id>/, samples/<id> (single_end)
genome              GUNZIP, UNTAR, COLLAPSE_PRIMERS, GETCHROMSIZES, GETFASTA, PREPARE_PRIMER_FASTA,
                    MAKEBLASTDB, BOWTIE2_BUILD, SNPEFF_BUILD, FREYJA_UPDATE, PANGOLIN_UPDATEDATA
per sample          CAT_FASTQ ─► FASTQC_RAW, FASTP ─► [reads left] ─► FASTQC_TRIM, KRAKEN2
                    BOWTIE2 ─► SORT/INDEX/STATS ─► [min mapped reads] ─► IVAR_TRIM ─► SORT/INDEX/STATS
                    ─► PICARD, MOSDEPTH (genome, amplicon), FREYJA (variants, demix, boot)
                    ─► IVAR_VARIANTS ─► [non-empty] ─► VCF, SORT, TABIX, STATS, SNPEFF, SNPSIFT, QUERY
                    ─► BCFTOOLS_FILTER ─► mask ─► BCFTOOLS_CONSENSUS ─► NEXTCLADE, PANGOLIN, base density
                    KRAKEN2 unclassified ─► CUTADAPT ─► FASTQC, SPADES, UNICYCLER ─► BANDAGE, ABACAS, BLAST
all samples         PLOT_MOSDEPTH_REGIONS, QUAST (consensus, SPAdes, Unicycler), variants long table, MULTIQC

Inputs / Outputs

The summary tables, consensus sequences, variant tables, VCF records, read and alignment statistics, QUAST reports and MultiQC data match the Nextflow run. FREYJA_UPDATE and PANGOLIN_UPDATEDATA download the current Freyja barcodes and pangolin-data, as the pipeline does, so Freyja abundances and Pangolin lineages follow the release of the run day. The MultiQC report has no software versions, workflow summary or methods sections, which nf-core builds from Nextflow run metadata.

One MultiQC value depends on file order in the pipeline itself. <id>.sorted.bam.flagstat and <id>.ivar_trim.sorted.bam.flagstat both clean to the sample name, and the pipeline's MultiQC config has no path filters on its three samtools sections. So "# Mapped reads", "# Trimmed reads (iVar)" and the samtools sections hold whichever of the two files MultiQC reads last. The reference Nextflow run shows the raw count for one sample and the trimmed count for another, and a second Nextflow run on another machine flipped one of them. The flagstat files themselves match byte for byte; the parity check accepts either count there.

Parameters

| id | Default | Meaning | |---|---|---| | samplesheet | examples/samplesheet.csv | Samples and their reads (--input) | | fasta_url, gff_url | MN908947.3 test genome | Genome and annotation (--genome MN908947.3) | | primer_bed_url | ARTIC nCoV-2019 V1 | Primer BED (--primer_set artic --primer_set_version 1) | | kraken2_db_url | kraken2_hs22.tar.gz | Kraken2 host database (--kraken2_db) | | nextclade_dataset_url | 2024-10-17 MN908947 dataset | Nextclade dataset (--nextclade_dataset) | | input_mirror | empty | Folder searched by file name before downloading | | min_mapped_reads | 1000 | Drop samples with this many mapped reads or fewer | | freyja_repeats | 10 | Freyja bootstrap repeats (--freyja_repeats) |

References