From 7ed9164b8ae525b4a50da0ad0611401da00c002e Mon Sep 17 00:00:00 2001 From: Dan Fornika Date: Fri, 23 Jun 2023 09:31:42 -0700 Subject: [PATCH] Allow normalizeDepth process to be skipped (#16) --- README.md | 2 ++ nextflow.config | 5 ++++- workflows/illuminaMpxv.nf | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cedb83b..19f1da0 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ Important config options are: | `varFreqThreshold` | `0.75` | Allele frequency threshold for unambiguous variant | | `varMinDepth` | `10` | Minimum coverage depth to call variant | +### Depth Normalization +By default, sequence depth will be normalized using `bbnorm` to the value specified by the `--normalizationTargetDepth` param (default: 200). To skip depth normalization, add the `--skip_normalize_depth` flag. #### QC A script to do some basic QC is provided in `bin/qc.py`. It measures the % of reference bases are covered by `varMinDepth`, and the longest stretch of consensus sequence with no `N` bases. This script does not make a QC pass/fail call. diff --git a/nextflow.config b/nextflow.config index 45490ca..4363fa1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -35,7 +35,10 @@ params { help = false outdir = './results' tracedir = "${params.outdir}/pipeline_info" - + + // depth normalization + skip_normalize_depth = false + // host filtering composite_ref = false viral_contig_name = 'NC_063383.1' diff --git a/workflows/illuminaMpxv.nf b/workflows/illuminaMpxv.nf index 7d5a5ac..44875c6 100644 --- a/workflows/illuminaMpxv.nf +++ b/workflows/illuminaMpxv.nf @@ -3,8 +3,8 @@ nextflow.enable.dsl = 2 include { articDownloadScheme } from '../modules/utils.nf' -include { performHostFilter } from '../modules/illumina.nf' include { normalizeDepth } from '../modules/illumina.nf' +include { performHostFilter } from '../modules/illumina.nf' include { readTrimming } from '../modules/illumina.nf' include { filterResidualAdapters } from '../modules/illumina.nf' include { indexReference } from '../modules/illumina.nf' @@ -88,9 +88,13 @@ workflow sequenceAnalysis { main: - normalizeDepth(ch_filePairs) + if (!params.skip_normalize_depth) { + ch_reads_to_hostfilter = normalizeDepth(ch_filePairs) + } else { + ch_reads_to_hostfilter = ch_filePairs + } - performHostFilter(normalizeDepth.out) + performHostFilter(ch_reads_to_hostfilter) readTrimming(performHostFilter.out.fastqPairs)