Skip to content
Merged
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 @@ -47,4 +47,4 @@ template:
- igenomes
- multiqc
- fastqc
version: 2.0.2
version: 2.0.3
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
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).

## [[v2.0.3](https://github.com/sanger-tol/readmapping/releases/tag/2.0.3)] - Hungarian Horntail (patch 3) - [2026-05-15]

### Enhancements & fixes

- Handle empty barcode in the samplesheet

## [[v2.0.2](https://github.com/sanger-tol/readmapping/releases/tag/2.0.2)] - Hungarian Horntail (patch 2) - [2026-05-07]

### Enhancements & fixes
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ authors:
orcid: https://orcid.org/0000-0003-1658-1762
website: https://github.com/BethYates
cff-version: 1.2.0
date-released: "2026-05-07"
date-released: "2026-05-15"
doi: 10.5281/zenodo.6563577
license: MIT
message: If you use this software, please cite it using the metadata from this file
and all references from CITATIONS.md .
repository-code: https://github.com/sanger-tol/readmapping
title: sanger-tol/readmapping v2.0.2 - Hungarian Horntail (patch 2)
title: sanger-tol/readmapping v2.0.3 - Hungarian Horntail (patch 3)
type: software
url: https://pipelines.tol.sanger.ac.uk/readmapping
version: 2.0.2
version: 2.0.3
2 changes: 1 addition & 1 deletion assets/samplesheet.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ SAMEA7524439,ERR6688600,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_
SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,,
SAMEA7524440,PAE35587,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz,,
SAMEA7524440,PAE35587_test,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.addrg.bam,,
SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam,,bc1022
SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam,,
SAMEA7524440,ERR6939249,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz,,bc1022
15 changes: 8 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This pipeline aligns raw reads from various technolgies (such as HiC, Illumina,

## Samplesheet input

You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 4 columns, and a header row as shown in the examples below.
You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with a header row as shown in the examples below. The first 4 columns are required (`specimen`, `run`, `datatype`, `datafile`), while `library` and `barcode` are optional.

```bash
--input '[path to samplesheet file]'
Expand All @@ -32,12 +32,12 @@ The samplesheet can have as many columns as you desire, however, there is a stri
A final samplesheet file consisting of both HiC and PacBio data may look something like the one below.

```console
specimen,run,datatype,datafile,library
specimen1,run1,hic1.cram,
specimen1,run2,hic2.cram,
specimen2,run3,hic3.cram,
specimen2,run4,pacbio,pacbio1.bam,uli
specimen3,run5,pacbio,pacbio2.bam,
specimen,run,datatype,datafile,library,barcode
specimen1,run1,hic,hic1.cram,,
specimen1,run2,hic,hic2.cram,,
specimen2,run3,hic,hic3.cram,,
specimen2,run4,pacbio,pacbio1.bam,uli,
specimen3,run5,pacbio,pacbio2.bam,,
```

| Column | Description |
Expand All @@ -47,6 +47,7 @@ specimen3,run5,pacbio,pacbio2.bam,
| `datatype` | Type of sequencing data. Must be one of `hic`, `illumina`, `pacbio`, `pacbio_clr`, or `ont`. |
| `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. |
| `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. |
| `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. |

An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline.

Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ manifest {
mainScript = 'main.nf'
defaultBranch = 'main'
nextflowVersion = '!>=25.04.0'
version = '2.0.2'
version = '2.0.3'
doi = '10.5281/zenodo.6563577'
}

Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$",
"description": "Path to comma-separated file containing information about the samples in the experiment.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 4 columns, and a header row.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with at least 4 columns, and a header row.",
"fa_icon": "fas fa-file-csv"
},
"outdir": {
Expand Down
13 changes: 7 additions & 6 deletions ro-crate-metadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"@context": "https://w3id.org/ro/crate/1.1/context",
"@context": "https://w3id.org/ro/crate/1.2/context",

"@graph": [
{
"@id": "./",
"@type": "Dataset",
"creativeWorkStatus": "Stable",
"datePublished": "2026-05-07T11:04:49+00:00",
"datePublished": "2026-05-15T14:33:37+00:00",
"description": "# sanger-tol/readmapping\n\n![sanger-tol/readmapping](docs/images/sanger-tol-readmapping_logo.png)\n\n[![Open in GitHub Codespaces](https://img.shields.io/badge/Open_In_GitHub_Codespaces-black?labelColor=grey&logo=github)](https://github.com/codespaces/new/sanger-tol/readmapping)\n[![GitHub Actions CI Status](https://github.com/sanger-tol/readmapping/actions/workflows/nf-test.yml/badge.svg)](https://github.com/sanger-tol/readmapping/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/sanger-tol/readmapping/actions/workflows/linting.yml/badge.svg)](https://github.com/sanger-tol/readmapping/actions/workflows/linting.yml)\n[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.6563577-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.6563577)\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%A525.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.5.2-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.5.2)\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/sanger-tol/readmapping)\n\n## Introduction\n\n**sanger-tol/readmapping** is a bioinformatics best-practice analysis pipeline for mapping reads generated using Illumina, HiC, PacBio and Nanopore technologies against a genome assembly.\n\nThe pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The [Nextflow DSL2](https://www.nextflow.io/docs/latest/dsl2.html) implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from [nf-core/modules](https://github.com/nf-core/modules) in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!\n\nOn merge to `dev` and `main` branch, automated continuous integration tests run the pipeline on a full-sized dataset on the Wellcome Sanger Institute HPC farm using the Nextflow Tower infrastructure. This ensures that the pipeline runs on full sized datasets, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources.\n\n## Pipeline summary\n\n<img src=\"https://raw.githubusercontent.com/sanger-tol/readmapping/976525ad7b5327607a049aa85bbca36a48c6ba48/docs/images/sanger-tol-readmapping_workflow.png\" height=\"700\">\n\n## Quick Start\n\n1. Install [`Nextflow`](https://www.nextflow.io/docs/latest/getstarted.html#installation) (`>=22.10.1`)\n\n2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) (you can follow [this tutorial](https://singularity-tutorial.github.io/01-installation/)), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(you can use [`Conda`](https://conda.io/miniconda.html) both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_.\n\n3. Download the pipeline and test it on a minimal dataset with a single command:\n\n ```bash\n nextflow run sanger-tol/readmapping -profile test,YOURPROFILE --outdir <OUTDIR>\n ```\n\n Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (`YOURPROFILE` in the example command above). You can chain multiple config profiles in a comma-separated string.\n\n > - The pipeline comes with config profiles called `docker`, `singularity`, `podman`, `shifter`, `charliecloud` and `conda` which instruct the pipeline to use the named tool for software management. For example, `-profile test,docker`.\n > - Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile <institute>` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment.\n > - If you are using `singularity`, please use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs.\n > - If you are using `conda`, it is highly recommended to use the [`NXF_CONDA_CACHEDIR` or `conda.cacheDir`](https://www.nextflow.io/docs/latest/conda.html) settings to store the environments in a central location for future pipeline runs.\n\n4. Start running your own analysis!\n\n ```bash\n nextflow run sanger-tol/readmapping --input samplesheet.csv --fasta genome.fa.gz --outdir <OUTDIR> -profile <docker/singularity/podman/shifter/charliecloud/conda/institute>\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**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\n## Credits\n\nsanger-tol/readmapping was originally written by [Priyanka Surana](https://github.com/priyanka-surana).\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- [Matthieu Muffato](https://github.com/muffato) for the text logo\n- [Guoying Qi](https://github.com/gq1) for being able to run tests using Nf-Tower and the Sanger HPC farm\n- [Tyler Chafin](https://github.com/tkchafin) for maintenance, updates, and code reviews\n- [Chau Duong](https://github.com/reichan1998) for updates and code reviews\n- [Sandra Babirye](https://github.com/SandraBabirye) for updates and code reviews\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\nFor further information or help, please [create an issue](https://github.com/sanger-tol/readmapping/issues/new/choose) on GitHub if you are not on the Sanger slack channel.\n\n## Citations\n\nIf you use sanger-tol/readmapping for your analysis, please cite it using the following doi: [10.5281/zenodo.6563577](https://doi.org/10.5281/zenodo.6563577)\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/main/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 @@ -93,7 +94,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 Down Expand Up @@ -133,7 +134,7 @@
}
],
"dateCreated": "",
"dateModified": "2026-04-29T19:05:01Z",
"dateModified": "2026-05-15T15:33:37Z",
"dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/",
"keywords": [
"nextflow",
Expand Down Expand Up @@ -163,10 +164,10 @@
},
"url": [
"https://github.com/sanger-tol/readmapping",
"https://pipelines.tol.sanger.ac.uk/readmapping/2.0.2/"
"https://pipelines.tol.sanger.ac.uk/readmapping/2.0.3/"
],
"version": [
"2.0.2"
"2.0.3"
]
},
{
Expand Down
11 changes: 7 additions & 4 deletions subworkflows/local/align_long.nf
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ workflow ALIGN_LONG {
if (val_pacbio_adapter_fasta && val_pacbio_adapter_yaml) {
ch_yaml_meta = ch_reads.pacbio
.combine( channel.fromPath(val_pacbio_adapter_yaml, checkIfExists: true) )
.map { meta, _reads, yaml -> [ meta, yaml ]
.map{ meta, _reads, yaml -> [ meta, yaml ]}
.branch { meta, yaml ->
has_barcode: meta.barcode != null && !meta.barcode.isEmpty()
no_barcode: true
}

GAWK_MODIFY_YAML_BARCODE( ch_yaml_meta, [], false )
ch_pacbio_read_yaml = ch_reads.pacbio.combine(GAWK_MODIFY_YAML_BARCODE.out.output, by: 0)
GAWK_MODIFY_YAML_BARCODE( ch_yaml_meta.has_barcode, [], false )
ch_yml_barcoded = GAWK_MODIFY_YAML_BARCODE.out.output.mix( ch_yaml_meta.no_barcode )
ch_pacbio_read_yaml = ch_reads.pacbio.combine(ch_yml_barcoded, by: 0)
adapter_fasta_for_preprocess = [[id:file( val_pacbio_adapter_fasta ).baseName], val_pacbio_adapter_fasta]
} else {
ch_pacbio_read_yaml = ch_reads.pacbio.map { meta, read_files -> [ meta, read_files, [] ] } //PacBio reads with dummy yaml
Expand Down
Loading
Loading