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
2 changes: 1 addition & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ template:
name: sampletracking
description: CMGG Sampletracking workflow
author: Matthias De Smet
version: 1.0.2
version: 1.0.3
force: true
outdir: .
is_nfcore: false
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.3

- Fixed an issue where pool grouping for multiqc wasn't properly performed on pipeline resume

## v1.0.2

- Fixed an issue where multiqc didn't run for each pool
Expand Down
2 changes: 1 addition & 1 deletion assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-cmgg/sampletracking/releases/tag/1.0.2" target="_blank">nf-cmgg/sampletracking</a> analysis pipeline.
This report has been generated by the <a href="https://github.com/nf-cmgg/sampletracking/releases/tag/1.0.3" target="_blank">nf-cmgg/sampletracking</a> analysis pipeline.
report_section_order:
"nf-cmgg-sampletracking-methods-description":
order: -1000
Expand Down
1 change: 1 addition & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ process {
params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'
custom_config_base = null

input = "${projectDir}/assets/samplesheet.csv"
bwa_index = "s3://test-data/genomics/homo_sapiens/genome/bwa/"
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ manifest {
mainScript = 'main.nf'
defaultBranch = 'master'
nextflowVersion = '!>=26.04.0'
version = '1.0.2'
version = '1.0.3'
doi = ''
}

Expand Down
19 changes: 11 additions & 8 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions ro-crate-metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@context": [
"https://w3id.org/ro/crate/1.1/context",
"https://w3id.org/ro/crate/1.2/context",
{
"GithubService": "https://w3id.org/ro/terms/test#GithubService",
"JenkinsService": "https://w3id.org/ro/terms/test#JenkinsService",
Expand All @@ -22,7 +22,7 @@
"@id": "./",
"@type": "Dataset",
"creativeWorkStatus": "Stable",
"datePublished": "2026-05-27T11:44:13+00:00",
"datePublished": "2026-07-23T15:20:45+00:00",
"description": "# ![nf-cmgg/sampletracking](docs/images/nf-cmgg-sampletracking_logo_light.svg#gh-light-mode-only) ![nf-cmgg/sampletracking](docs/images/nf-cmgg-sampletracking_logo_dark.svg#gh-dark-mode-only)\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/sampletracking)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/sampletracking/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/sampletracking/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/sampletracking/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/sampletracking/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A526.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/sampletracking)\n\n## Introduction\n\n**nf-cmgg/sampletracking** is a bioinformatics pipeline that performs sampletracking on sequencing samples. The pipeline does this by crosschecking SNP fingerprints and by checking if the expected sex matches the real sex of the sample.\n\n![metro_map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv`:\n\n```csv\nsample,pool,sex,sample_bam,sample_bam_index,snp_bam,snp_bam_index\nSAMPLE1,POOL1,F,SAMPLE1.bam,SAMPLE1.bam.bai,SAMPLE1_snp.cram,SAMPLE2_snp.cram.crai\n```\n\nEach row represents a sample annotated with the pool it was sequenced in and the expected sex of this sample. It also needs a BAM/CRAM file with the sample data and (optionally) a FASTQ/BAM/CRAM file with SNP tracking data for the sample. Crosschecking fingerprints will be skipped when no SNP tracking data is provided.\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/sampletracking \\\n -profile <docker/singularity/.../institute> \\\n --input samplesheet.csv \\\n --outdir <OUTDIR>\n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/sampletracking was originally written by [@matthdsm](https://github.com/matthdsm).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- [@nvnieuwk](https://github.com/nvnieuwk)\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Development environment\n\nA [pixi](https://pixi.prefix.dev/latest/) development environment is available for this pipeline. Run the following command to install the environment:\n\n```\npixi install\n```\n\nThen run `pixi shell` to enter the environment and start developing.\n\n## Citations\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n",
"hasPart": [
{
Expand Down Expand Up @@ -99,7 +99,7 @@
},
"mentions": [
{
"@id": "#3fade23d-b7f2-4138-bbee-fa7c35bcbcb3"
"@id": "#1afaeae5-d623-4182-864b-131038a46785"
}
],
"name": "nf-cmgg/sampletracking"
Expand All @@ -112,7 +112,7 @@
},
"conformsTo": [
{
"@id": "https://w3id.org/ro/crate/1.1"
"@id": "https://w3id.org/ro/crate/1.2"
},
{
"@id": "https://w3id.org/workflowhub/workflow-ro-crate/1.0"
Expand All @@ -132,7 +132,7 @@
}
],
"dateCreated": "",
"dateModified": "2026-05-27T13:44:13Z",
"dateModified": "2026-07-23T17:20:45Z",
"dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/",
"image": {
"@id": "docs/images/metro_map.png"
Expand Down Expand Up @@ -163,10 +163,10 @@
},
"url": [
"https://github.com/nf-cmgg/sampletracking",
"https://nf-co.re/nf-cmgg/sampletracking/1.0.2/"
"https://nf-co.re/nf-cmgg/sampletracking/1.0.3/"
],
"version": [
"1.0.2"
"1.0.3"
]
},
{
Expand All @@ -190,11 +190,11 @@
"name": "Workflow diagram"
},
{
"@id": "#3fade23d-b7f2-4138-bbee-fa7c35bcbcb3",
"@id": "#1afaeae5-d623-4182-864b-131038a46785",
"@type": "TestSuite",
"instance": [
{
"@id": "#5249f773-adaa-4bdf-a11c-7cdffb4db2e7"
"@id": "#3c6ba561-6507-48ed-b107-371fc7904400"
}
],
"mainEntity": {
Expand All @@ -203,7 +203,7 @@
"name": "Test suite for nf-cmgg/sampletracking"
},
{
"@id": "#5249f773-adaa-4bdf-a11c-7cdffb4db2e7",
"@id": "#3c6ba561-6507-48ed-b107-371fc7904400",
"@type": "TestInstance",
"name": "GitHub Actions workflow for testing nf-cmgg/sampletracking",
"resource": "repos/nf-cmgg/sampletracking/actions/workflows/nf-test.yml",
Expand Down
21 changes: 12 additions & 9 deletions workflows/sampletracking.nf
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,14 @@ workflow SAMPLETRACKING {

def ch_crosscheck_metrics_out = channel.empty()
ch_samplesheet_fixed
.filter { meta, _sample_bam, _sample_bam_index, snp_fastq, snp_bam, _snp_bam_index ->
if(!snp_bam && !snp_fastq) {
log.warn("No SNP BAM/CRAM/FASTQ files were detected for '${meta.id}'. Skipping the crosscheck fingerprints step for this sample.")
return false
}
return true
}
.branch { meta, sample_bam, sample_bam_index, snp_fastq, snp_bam, snp_bam_index ->
aligned: snp_bam
return [meta, sample_bam, sample_bam_index, snp_bam, snp_bam_index]
to_align : snp_fastq
return [meta, sample_bam, sample_bam_index, snp_fastq]
no_snp: true
log.warn("No SNP BAM/CRAM/FASTQ files were detected for '${meta.id}'. Skipping the crosscheck fingerprints step for this sample.")
return [[id:meta.pool], []]
}
.set{ ch_inputs }

Expand Down Expand Up @@ -144,7 +140,10 @@ workflow SAMPLETRACKING {
ch_fasta_fai
)
ch_crosscheck_metrics_out = PICARD_CROSSCHECKFINGERPRINTS.out.crosscheck_metrics
ch_multiqc_files = ch_multiqc_files.mix(PICARD_CROSSCHECKFINGERPRINTS.out.crosscheck_metrics)
ch_multiqc_files = ch_multiqc_files.mix(
PICARD_CROSSCHECKFINGERPRINTS.out.crosscheck_metrics,
ch_inputs.no_snp.unique() // Add pools with no snp data for flow consistency
)


//
Expand Down Expand Up @@ -283,7 +282,11 @@ workflow SAMPLETRACKING {
.map { files -> [files] }
.dump(tag: "Summary files for MultiQC", pretty: true)
ch_multiqc_input = ch_multiqc_files
.groupTuple(by: 0)
.map { meta, files ->
// This is needed to prevent merge key mismatches on pipeline resume
tuple([id: meta.id], files)
}
.groupTuple(size:2) // size 2 for sex check + crosscheck fingerprints
.combine(ch_summary_files)
.map { meta, multiqc_files, summary_files ->
return [meta, (multiqc_files + summary_files).flatten(), multiqc_config.flatten(), multiqc_logo, [], []]
Expand Down
Loading