lp-wgs is a Nextflow pipeline for shallow whole genome sequencing analysis. It can start from paired-end FASTQ files or aligned BAM files, then generate low-pass copy number and QC outputs from tools including FastQC, fastp, BWA, mosdepth, Picard, HMMcopy, ichorCNA, QDNAseq, ACE, ASCAT-style low-pass fitting, BayesCNA, and optionally MEDICC2.
The pipeline deliberately supports multiple low-pass copy number callers because they model the same signal with different statistical assumptions. This allows results to be compared across complementary approaches:
- IchorCNA: hidden Markov modelling for tumour fraction and copy number calling.
- ACE: circular binary segmentation for absolute copy number estimation.
- ASCATlp: piecewise constant fitting for low-pass purity, ploidy, and copy number inference.
- BayesCNA: Bayesian inference for copy number modelling.
optional
- Medicc2, can infer phylogenies from CNA segment data generated by ACE or IchorCNA.
The pipeline uses Nextflow DSL2 and supports containerised execution with Docker, Singularity/Apptainer, Podman, Shifter, Charliecloud, or Conda.
When starting from FASTQ files (--step mapping), the pipeline runs:
- Read QC with FastQC
- Read trimming with fastp
- Alignment with BWA
- Lane merging and BAM indexing
- Optional fragment-size BAM filtering with samtools
- Alignment and insert-size QC with Picard
- Coverage QC with mosdepth
When starting from BAM files (--step calling), or after mapping has completed, the pipeline runs copy number preparation and callers:
- HMMcopy read counting, using a supplied GC wig or generating one with
--call_gc - ichorCNA hidden Markov model tumour fraction and copy number calling
- QDNAseq segmentation and bin-level log2 ratios
- ACE circular binary segmentation and absolute copy number estimation
- ASCATlp piecewise constant low-pass purity, ploidy, and copy number fitting
- BayesCNA Bayesian copy number inference
- Optional MEDICC2 preparation and execution
- MultiQC reporting
The caller set is controlled with --tools, for example --tools ace,ichor,ascat.
Run from paired-end FASTQ files:
nextflow run /path/to/lp_wgs \
--input samplesheet_fastq.csv \
--outdir results \
--igenomes_base /path/to/igenomes \
--step mapping \
-profile singularity \
-resumeRun from existing BAM files:
nextflow run /path/to/lp_wgs \
--input samplesheet_bam.csv \
--outdir results \
--igenomes_base /path/to/igenomes \
--step calling \
-profile singularity \
-resumeFASTQ input:
patient,sample,lane,fastq_1,fastq_2,predicted_ploidy
patient1,sample1,1,/data/patient1_sample1_L001_R1.fastq.gz,/data/patient1_sample1_L001_R2.fastq.gz
patient1,sample1,2,/data/patient1_sample1_L002_R1.fastq.gz,/data/patient1_sample1_L002_R2.fastq.gz
patient1,sample2,1,/data/patient1_sample2_L001_R1.fastq.gz,/data/patient1_sample2_L001_R2.fastq.gzBAM input:
patient,sample,bam,bai
patient1,sample1,/data/patient1_sample1.bam,/data/patient1_sample1.bam.bai
patient1,sample2,/data/patient1_sample2.bam,/data/patient1_sample2.bam.baipatient and sample are required. lane is required for FASTQ input. predicted_ploidy is optional and defaults to 2; it is used by ACE/ASCAT-related copy number steps.
| Parameter | Default | Description |
|---|---|---|
--step |
mapping |
Use mapping for FASTQ input or calling for BAM input. |
--tools |
ace,ichor,ascat,bayes_cna |
Comma-separated copy number tools to run. |
--bin |
1000 |
Bin size in kb for HMMcopy/ichorCNA-style read counting. Supported values in the bundled config are 10, 50, 500, and 1000. |
--ploidy |
2,3,4 |
Comma-separated ploidy values passed to ACE and ASCATlp. |
--ascat_pcf_gamma |
10 |
Penalty passed to copynumber::pcf() for ASCAT low-pass segmentation. Higher values produce fewer segments. |
--medicc_source |
ace |
Caller output used to prepare MEDICC2 input. Supported values: ace, ichor. |
--filter_bam |
false |
Filter BAMs by insert size before calling/QC. |
--filter_bam_min |
90 |
Minimum insert size when --filter_bam is enabled. |
--filter_bam_max |
150 |
Maximum insert size when --filter_bam is enabled. |
--ichor_cfDNA |
false |
Use low-fraction cfDNA ichorCNA defaults. |
--ichor_purity_manual |
unset | Manually pass ichorCNA normal fractions, for example "c(0.95,0.99,0.995,0.999)". |
See docs/usage.md for more complete run examples and reference configuration notes.
The default human configuration expects an iGenomes-style directory layout under --igenomes_base, including BWA indexes, FASTA, FASTA index, sequence dictionary, GC/mappability wig files, centromeres, and chromosome arm boundary files.
You can override individual reference paths directly, for example:
--fasta /refs/Homo_sapiens_assembly38.fasta \
--fasta_fai /refs/Homo_sapiens_assembly38.fasta.fai \
--dict /refs/Homo_sapiens_assembly38.dict \
--bwa /refs/BWAIndex \
--chr_arm_boundaries /refs/chrArmBoundaries_hg38.txtResults are written under:
<outdir>/<patient>/<patient>_<sample>/low_pass_wgs/
The main result areas are:
reports/: FastQC, Picard, mosdepth, and other QC outputs.ichorcna_<bin>/: ichorCNA outputs for the chosen bin size.ace/: ACE outputs.ascat/ascat_ploidy_<ploidy>/: ASCAT low-pass copy number calls and plot PDFs for each--ploidyvalue.bwa/: mapped BAM/BAM index outputs when mapping is run.<outdir>/reports/low_pass_wgs/: MultiQC report and pipeline-level reporting files.
See docs/output.md for details.
lp-wgs was originally written by Chela James George Cresswell.
If you would like to contribute to this pipeline, please see the contributing guidelines.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.
This pipeline uses code and infrastructure developed and maintained by the nf-core community, reused here under the MIT license.