Skip to content

feature request: Add FastQ Screen contamination check to demultiplexing pipeline #197

Description

@georgemarselis-nvi

Summary

Add a FastQ Screen step post-demultiplexing to verify that sequenced reads originate from the expected organism. Currently there is no check between bcl2fastq output and upload to IRIDA/NIRD that validates the biological identity of the data. A sample swap or cross-contamination is silently accepted and only discovered (if ever) during downstream analysis.

Problem

The pipeline currently validates:

  • Samplesheet structure and fields
  • File existence and pairing (R1/R2)
  • bcl2fastq completion (CompletedJobInfo.xml)

It does not validate whether the sequenced DNA belongs to the organism the samplesheet claims. NVI processes samples from dozens of species across multiple surveillance programmes. Sample swaps, cross-contamination during library prep, and index hopping on the sequencer are all realistic failure modes. Detecting these after data has been uploaded, analyzed, and reported is expensive and damaging.

FASTQ quality tools (FastQC, Falco, fastp) only assess sequencing quality metrics (base quality, adapters, duplication). None of them answer the question: "does this data come from the organism we expected?"

Solution

Integrate [FastQ Screen](https://www.bioinformatics.babraham.ac.uk/projects/fastq_screen/) into the pipeline between bcl2fastq completion and the upload/archival phase. FastQ Screen aligns a subsample of reads against a panel of reference genomes and reports the proportion mapping to each. This catches:

  • Sample swaps (bovine sample is actually poultry)
  • Cross-species contamination during library prep
  • Index hopping (reads from one sample bleeding into another)
  • Environmental/human contamination

Computational cost

FastQ Screen is lightweight. It subsamples reads (default 100,000) rather than aligning the full file, so runtime is roughly constant per sample regardless of total read count. With Bowtie2 as the aligner:

  • Per sample: ~30-60 seconds for a paired-end subsample against a panel of 10-15 reference genomes
  • Per run (96 samples): ~1-2 hours total, parallelizable
  • Disk: Reference genome indices for all organisms, approximately 5-20 GB depending on genome sizes
  • Memory: ~3-4 GB per alignment thread (Bowtie2)
  • Dependencies: FastQ Screen (Perl), Bowtie2 (C++). No Java dependency.

This is negligible compared to bcl2fastq runtime and IRIDA upload time, especially over the mechanical HDDs on the VIGASP infrastructure.

Reference genome panel

Based on NVI surveillance programmes and routine diagnostic work, the following reference genomes should be included. This is a starting list - adjust based on actual sequencing volume per organism.

Bacterial (primary workload)

  • Salmonella enterica (multiple serovars - use representative reference e.g. LT2)
  • Campylobacter jejuni / C. coli
  • Escherichia coli (K-12 or O157:H7 reference)
  • Listeria monocytogenes
  • Staphylococcus aureus (MRSA surveillance)
  • Actinobacillus pleuropneumoniae
  • Mycobacterium bovis (tuberculosis surveillance)
  • Brucella spp.
  • Mycoplasma spp. (including M. ovipneumoniae)
  • Renibacterium salmoninarum (bacterial kidney disease in fish)

Viral

  • Infectious salmon anemia virus (ISAV)
  • Classical swine fever virus (CSFV)
  • African swine fever virus (ASFV)
  • Avian influenza virus
  • Bluetongue virus
  • Schmallenberg virus
  • Bovine viral diarrhoea virus (BVDV)

Host/contamination (negative controls)

  • Homo sapiens (human contamination - always include)
  • Bos taurus (bovine)
  • Sus scrofa (porcine)
  • Gallus gallus (poultry)
  • Salmo salar (Atlantic salmon)
  • Ovis aries (ovine)
  • Oncorhynchus mykiss (rainbow trout)
  • PhiX174 (Illumina spike-in control)

Parasitic/eukaryotic (if relevant to amplicon panels)

  • Aphanomyces astaci (crayfish plague)
  • Echinococcus multilocularis
  • Trichinella spp.

Implementation

  1. Add FastQ Screen as a pipeline step after bcl2fastq, before upload
  2. Run against the reference panel with default subsampling (100k reads)
  3. Report per-sample: percentage mapping to each reference genome
  4. Flag samples where the dominant mapped organism does not match the expected organism from the samplesheet
  5. Flagged samples should generate a loud warning in the pipeline log but not block upload by default (configurable via runtime flag)
  6. Store FastQ Screen output (text + HTML report) alongside per-sample QC in the run output directory

Open questions

  • Should flagged samples block upload entirely, or just warn? Default to warn, make it configurable.
  • How to map samplesheet Sample_Project or organism field to expected reference genome? Needs a lookup table or naming convention.
  • Should this run before or in parallel with the upload to IRIDA? Before is safer, parallel is faster.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions