Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#181](https://github.com/IntGenomicsLab/lrsomatic/pull/181) - NanoPlot pre- and post-alignment statistics now reach MultiQC. `ch_nanoplot_pre_txt` and `ch_nanoplot_post_txt` were declared empty and mixed into the MultiQC inputs, but never assigned from `NANOPLOT_PRE.out.txt` / `NANOPLOT_POST.out.txt`, so the NanoStat section was silently missing from every report (@ljwharbers).
- [#181](https://github.com/IntGenomicsLab/lrsomatic/pull/181) - `NANOPLOT_PRE` now includes the replicate in its output prefix, so samples with more than one replicate no longer collapse into a single MultiQC sample (@ljwharbers).
- [#181](https://github.com/IntGenomicsLab/lrsomatic/pull/181) - samtools stats/flagstat/idxstats and mosdepth outputs are now prefixed `<sample>_<type>` instead of `<sample>`. The tumor and normal files of a matched pair shared a basename, so MultiQC logged `Duplicate sample name found! Overwriting` and reported only one of the two; the general statistics table now has one row per BAM (`<sample>_tumor`, `<sample>_normal`), which the post-alignment NanoStat row joins (@ljwharbers).
- [#181](https://github.com/IntGenomicsLab/lrsomatic/pull/181) - Raised MultiQC's `log_filesize_limit` to 500 MB. `samtools stats` output for long reads is 70 MB and more, above the 50 MB default, so MultiQC silently skipped it and the samtools stats section covered only small files (@ljwharbers).
Comment on lines +28 to +31
- [#186](https://github.com/IntGenomicsLab/lrsomatic/pull/186) - Stopped snapshotting the md5 of sample4's merged tumour BAM and its index in the `clair_only` nf-test: `samtools merge` gives the colliding `@PG` IDs of the two replicates a random hex suffix, so neither digest is reproducible. The alignment records are, and are now asserted with `bam().getReadsMD5()` instead (@ljwharbers).
- [#182](https://github.com/IntGenomicsLab/lrsomatic/pull/182) - Added `--vcf` to the default `vep_args` so VEP writes VCF output rather than its default tab-delimited format (@AmberVerhasselt).
- [#183](https://github.com/IntGenomicsLab/lrsomatic/pull/183) - Corrected the `github` URL for Laurens Lambrechts in `manifest.contributors`, which was a copy of @MariosEft97's, to @laulambr. RO-Crate metadata updated to match (@ljwharbers).
Expand Down
4 changes: 4 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@

> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

- [NanoPlot](https://pubmed.ncbi.nlm.nih.gov/37171891/)

> De Coster W, Rademakers R. NanoPack2: population-scale evaluation of long-read sequencing data. Bioinformatics. 2023 May 4;39(5):btad311. doi: 10.1093/bioinformatics/btad311. PubMed PMID: 37171891; PubMed Central PMCID: PMC10196664.

- [SAMtools](https://pubmed.ncbi.nlm.nih.gov/19505943/)

> Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. doi: 10.1093/bioinformatics/btp352. Epub 2009 Jun 8. PubMed PMID: 19505943; PubMed Central PMCID: PMC2723002.
Expand Down
10 changes: 10 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@ report_section_order:

export_plots: true

# Post-alignment NanoPlot files are named <sample>_<type>_aln_NanoStats.txt. Dropping "_aln"
# puts their NanoStat row on the same <sample>_<type> row as samtools and mosdepth for that BAM.
extra_fn_clean_exts:
- "_aln"
Comment on lines +13 to +16

# samtools stats on long reads writes 70+ MB files (its read-length and coverage histograms run to
# the longest read and deepest base). MultiQC silently skips any file above log_filesize_limit,
# whose default is 50 MB, so the samtools stats section would only ever cover small files.
log_filesize_limit: 500000000

disable_version_detection: true
8 changes: 6 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ process {
}

withName: '.*:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}" }
// Type in the prefix, otherwise the tumor and normal files of a pair share a basename and MultiQC keeps only one
ext.prefix = { "${meta.id}_${meta.type}" }
publishDir = [
Comment on lines 34 to 37
path: { "${params.outdir}/${meta.id}/qc/${meta.type}/samtools/" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -60,7 +61,8 @@ process {
}

withName: '.*:NANOPLOT_PRE' {
ext.prefix = { "${meta.id}_${meta.type}_ubam" }
// Replicate in the prefix, otherwise MultiQC keeps only one identically named NanoStats.txt
ext.prefix = { "${meta.id}_${meta.type}_rep${meta.replicate}_ubam" }
publishDir = [
path: { "${params.outdir}/${meta.id}/qc/${meta.type}/nanoplot_ubam_rep${meta.replicate}" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -88,6 +90,8 @@ process {

withName: '.*:MOSDEPTH' {
ext.args = { '-n -x' }
// Type in the prefix, otherwise the tumor and normal files of a pair share a basename and MultiQC keeps only one
ext.prefix = { "${meta.id}_${meta.type}" }
publishDir = [
path: { "${params.outdir}/${meta.id}/qc/${meta.type}/mosdepth" },
mode: params.publish_dir_mode,
Expand Down
50 changes: 27 additions & 23 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,41 +178,41 @@ QC outputs are placed under `tumor/` for all samples, and additionally under `no
│ │ ├── fibertoolsrs
│ │ │ ├── sample_qc.txt
│ │ ├── mosdepth
│ │ │ ├── sample.mosdepth.global.dist.txt
│ │ │ ├── sample.mosdepth.summary.txt
│ │ │ ├── sample_tumor.mosdepth.global.dist.txt
│ │ │ ├── sample_tumor.mosdepth.summary.txt
│ │ ├── nanoplot_aln
│ │ │ ├── sample_tumor_aln_NanoStats.txt
│ │ │ ├── sample_tumor_aln_NanoPlot-report.html
│ │ ├── nanoplot_ubam_rep1
│ │ │ ├── sample_tumor_ubam_NanoStats.txt
│ │ │ ├── sample_tumor_ubam_NanoPlot-report.html
│ │ │ ├── sample_tumor_rep1_ubam_NanoStats.txt
│ │ │ ├── sample_tumor_rep1_ubam_NanoPlot-report.html
│ │ ├── samtools
│ │ │ ├── sample.flagstat
│ │ │ ├── sample.idxstats
│ │ │ ├── sample.stats
│ │ │ ├── sample_tumor.flagstat
│ │ │ ├── sample_tumor.idxstats
│ │ │ ├── sample_tumor.stats
│ ├── normal # paired samples only
│ │ └── [same subdirectories as tumor]
│ ├── whatshap_stats
│ │ ├── sample.stats.tsv
│ │ ├── sample.blocklist.tsv
```

| File | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `cramino_aln/sample_{type}_cramino.txt` | cramino QC summary statistics for the aligned bam file |
| `cramino_ubam_rep1/sample_{type}_cramino.txt` | cramino QC summary statistics for the unaligned bam files |
| `fibertoolsrs/sample_qc.txt` | fibertools QC summary for the bam file |
| `mosdepth/sample.mosdepth.global.dist.txt` | a cumulative distribution indicating the proportion of total bases that were covered for at least a given coverage value |
| `mosdepth/sample.mosdepth.summary.txt` | overall summary file from mosdepth tool |
| `nanoplot_aln/sample_{type}_aln_NanoStats.txt` | NanoPlot summary statistics for the aligned BAM file |
| `nanoplot_aln/sample_{type}_aln_NanoPlot-report.html` | NanoPlot interactive HTML report for the aligned BAM file |
| `nanoplot_ubam_rep1/sample_{type}_ubam_NanoStats.txt` | NanoPlot summary statistics for the unaligned BAM file |
| `nanoplot_ubam_rep1/sample_{type}_ubam_NanoPlot-report.html` | NanoPlot interactive HTML report for the unaligned BAM file |
| `samtools/sample.flagstat` | a summary of the counts of different samtools flags |
| `samtools/sample.idxstats` | a summary of the number of mapped and unmapped reads |
| `samtools/sample.stats` | summary statistics from the bamfile |
| `whatshap_stats/sample.stats.tsv` | WhatsHap phasing statistics per chromosome including phase block N50 and switch error rates |
| `whatshap_stats/sample.blocklist.tsv` | list of all phase blocks with their genomic coordinates |
| File | Description |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `cramino_aln/sample_{type}_cramino.txt` | cramino QC summary statistics for the aligned bam file |
| `cramino_ubam_rep1/sample_{type}_cramino.txt` | cramino QC summary statistics for the unaligned bam files |
| `fibertoolsrs/sample_qc.txt` | fibertools QC summary for the bam file |
| `mosdepth/sample_{type}.mosdepth.global.dist.txt` | a cumulative distribution indicating the proportion of total bases that were covered for at least a given coverage value |
| `mosdepth/sample_{type}.mosdepth.summary.txt` | overall summary file from mosdepth tool |
| `nanoplot_aln/sample_{type}_aln_NanoStats.txt` | NanoPlot summary statistics for the aligned BAM file |
| `nanoplot_aln/sample_{type}_aln_NanoPlot-report.html` | NanoPlot interactive HTML report for the aligned BAM file |
| `nanoplot_ubam_rep1/sample_{type}_rep1_ubam_NanoStats.txt` | NanoPlot summary statistics for the unaligned BAM file |
| `nanoplot_ubam_rep1/sample_{type}_rep1_ubam_NanoPlot-report.html` | NanoPlot interactive HTML report for the unaligned BAM file |
Comment on lines +209 to +210
| `samtools/sample_{type}.flagstat` | a summary of the counts of different samtools flags |
| `samtools/sample_{type}.idxstats` | a summary of the number of mapped and unmapped reads |
| `samtools/sample_{type}.stats` | summary statistics from the bamfile |
| `whatshap_stats/sample.stats.tsv` | WhatsHap phasing statistics per chromosome including phase block N50 and switch error rates |
| `whatshap_stats/sample.blocklist.tsv` | list of all phase blocks with their genomic coordinates |

</details>

Expand Down Expand Up @@ -552,6 +552,8 @@ The report is one self-contained file — plots and tables are embedded, so it c

### `multiqc`

Sample rows are named per BAM: `{sample}_tumor` and `{sample}_normal` carry the samtools, mosdepth and post-alignment NanoPlot statistics of that BAM, `{sample}_{type}_rep{N}_ubam` rows carry the pre-alignment NanoPlot statistics of each unaligned replicate, and WhatsHap phasing statistics sit on a plain `{sample}` row because phasing is done once per sample.

<details markdown="1">
<summary>Output files</summary>

Expand All @@ -570,8 +572,10 @@ The report is one self-contained file — plots and tables are embedded, so it c
│ │ ├── multiqc_data.json
│ │ ├── multiqc_general_stats.txt
│ │ ├── multiqc_software_versions.txt
│ │ ├── multiqc_nanostat.txt
│ │ ├── multiqc_sources.txt
│ │ ├── multiqc.log
│ │ ├── nanostat_fasta_stats_table.txt
│ ├── multiqc_plots
│ │ ├── pdf
│ │ │ ├── mosdepth-coverage-per-contig-multi-cnt.pdf
Expand Down
Loading
Loading