Skip to main content

cleanyerreads

Tags: reads quality-control trimming filtering host-removal preprocessing named-workflow

Quality control and optional host read removal from raw sequencing reads.

This workflow performs comprehensive read quality control including trimming, adapter removal, quality filtering, and optionally removes host contamination using nohuman or SRA Human Scrubber. It processes raw sequencing reads to produce high-quality clean reads ready for downstream analysis.

Usage

clean-yer-reads CLI:

clean-yer-reads \
--input samples.csv \
--outdir results/

Nextflow:

nextflow run bactopia/bactopia/workflows/cleanyerreads/main.nf \
--input samples.csv \
--outdir results/

Outputs

Expected Output Files

<BACTOPIA_DIR>
├── <SAMPLE_NAME>
│ ├── main
│ │ ├── gather
│ │ │ ├── <SAMPLE_NAME>-meta.tsv
│ │ │ └── logs
│ │ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ │ └── versions.yml
│ │ └── qc
│ │ ├── <SAMPLE_NAME>_SE.fastq.gz
│ │ ├── logs
│ │ │ ├── <SAMPLE_NAME>-fastp.log
│ │ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ │ └── versions.yml
│ │ └── supplemental
│ │ ├── <SAMPLE_NAME>.fastp.html
│ │ ├── <SAMPLE_NAME>.fastp.json
│ │ ├── <SAMPLE_NAME>_SE-final.json
│ │ ├── <SAMPLE_NAME>_SE-final_fastqc.html
│ │ ├── <SAMPLE_NAME>_SE-final_fastqc.zip
│ │ ├── <SAMPLE_NAME>_SE-original.json
│ │ ├── <SAMPLE_NAME>_SE-original_fastqc.html
│ │ └── <SAMPLE_NAME>_SE-original_fastqc.zip
│ └── tools
│ └── srahumanscrubber
│ ├── <SAMPLE_NAME>.scrub.report.tsv
│ ├── <SAMPLE_NAME>.scrubbed.fastq.gz
│ └── logs
│ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ └── versions.yml
└── bactopia-runs
└── cleanyerreads-<TIMESTAMP>
├── merged-results
│ ├── logs
│ │ ├── meta-concat
│ │ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ │ └── versions.yml
│ │ └── scrubber-concat
│ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ └── versions.yml
│ ├── meta.tsv
│ └── scrubber.tsv
└── nf-reports
├── cleanyerreads-dag.dot
├── cleanyerreads-report.html
└── cleanyerreads-timeline.html

Quality Control Reports

FileDescription
supplemental/*_fastqc.*FastQC reports for raw and cleaned reads
supplemental/*-NanoPlot.*NanoPlot reports for Nanopore reads
supplemental/*.fastp.*Fastp quality reports (when applicable)
supplemental/*_original.jsonQuality metrics for original reads
supplemental/*_final.jsonQuality metrics for final reads

Cleaned Reads

FileDescription
*.fastq.gzQuality controlled and trimmed reads
*.unclassified.fastq.gzHost-decontaminated reads (if scrubber enabled)

Host Decontamination

note

Only created when host removal is enabled

FileDescription
*.kraken2.report.txtKraken2 classification report
*.scrub.report.tsvHuman contamination report

Audit Trail

Below are files that can assist you in understanding which parameters and program versions were used.

Logs

Each process that is executed will have a folder named logs. In this folder are helpful files for you to review if the need ever arises.

ExtensionDescription
.beginAn empty file used to designate the process started
.errContains STDERR outputs from the process
.logContains both STDERR and STDOUT outputs from the process
.outContains STDOUT outputs from the process
.runThe script Nextflow uses to stage/unstage files and queue processes based on given profile
.shThe script executed by bash for the process
.traceThe Nextflow trace report for the process
versions.ymlA YAML formatted file with program versions

Nextflow Reports

These Nextflow reports provide great a great summary of your run. These can be used to optimize resource usage and estimate expected costs if using cloud platforms.

FilenameDescription
cleanyerreads-dag.dotThe Nextflow DAG visualization
cleanyerreads-report.htmlThe Nextflow Execution Report
cleanyerreads-timeline.htmlThe Nextflow Timeline Report
cleanyerreads-trace.txtThe Nextflow Trace report

Parameters

Required Parameters

The following parameters are how you will provide either local or remote samples to be processed by Bactopia.

ParameterTypeDefaultDescription
--samplesstringA FOFN (via bactopia prepare) with sample names and paths to FASTQ/FASTAs to process
--r1stringFirst set of compressed (gzip) Illumina paired-end FASTQ reads (requires --r2 and --sample)
--r2stringSecond set of compressed (gzip) Illumina paired-end FASTQ reads (requires --r1 and --sample)
--sestringCompressed (gzip) Illumina single-end FASTQ reads (requires --sample)
--ontstringCompressed (gzip) Oxford Nanopore FASTQ reads (requires --sample)
--hybridbooleanfalseCreate hybrid assembly using Unicycler. (requires --r1, --r2, --ont and --sample)
--short_polishbooleanfalseCreate hybrid assembly from long-read assembly and short read polishing. (requires --r1, --r2, --ont and --sample)
--samplestringSample name to use for the input sequences
--accessionsstringA file containing ENA/SRA Experiment accessions or NCBI Assembly accessions to processed
--accessionstringSample name to use for the input sequences
--assemblystringA assembled genome in compressed FASTA format. (requires --sample)
--check_samplesbooleanfalseValidate the input FOFN provided by --samples
Dataset Parameters

Define where the pipeline should find input data and save output data.

ParameterTypeDefaultDescription
--speciesstringName of species for species-specific dataset to use
--ask_merlinbooleanAsk Merlin to execute species specific Bactopia tools based on Mash distances
--coverageinteger100Reduce samples to a given coverage, requires a genome size
--genome_sizeinteger0Expected genome size (bp) for all samples, required for read error correction and read subsampling
--use_baktabooleanUse Bakta for annotation, instead of Prokka
Optional Parameters

These optional parameters can be useful in certain settings.

ParameterTypeDefaultDescription
--outdirstringbactopiaBase directory to write results to
Nextflow Profile Parameters

Parameters to fine-tune your Nextflow setup.

ParameterTypeDefaultDescription
--datasets_cachestring<HOME>/.bactopia/datasetsDirectory where downloaded datasets should be stored.
Helpful Parameters

Uncommonly used parameters that might be useful.

ParameterTypeDefaultDescription
--wfstringbactopiaSpecify which workflow or Bactopia Tool to execute
--list_wfsbooleanList the available workflows and Bactopia Tools to use with '--wf'
--help_allbooleanAn alias for --help --show_hidden_params
--versionbooleanDisplay version text.

Composition

This workflow uses the following subworkflows:

  • bactopia_gather - Search, validate, gather, and standardize input samples.
  • bactopia_qc - Perform comprehensive quality control on sequencing reads.
  • scrubber - Remove contaminant sequences from metagenomic data.

Citations

If you use this in your analysis, please cite the following.

Source

View source on GitHub