Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add demultiplexing subworkflow 10x #202

Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
fail-fast: false
matrix:
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
profile:
- docker
profile: ["bases2fastq", "bcl2fastq", "bclconvert", "fqtk", "sgdemux", "skip_tools"]
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
Expand All @@ -60,7 +59,7 @@ jobs:

# Run nf-test
- name: Run nf-test
run: nf-test test tests/pipeline/ --profile=test,${{ matrix.profile }} --junitxml=test.xml
run: nf-test test tests/pipeline/${{ matrix.profile }}.nf.test --profile=test,docker --junitxml=test.xml

# If the test fails, output the software_versions.yml using the 'batcat' utility
- name: Output log on failure
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#202](https://github.com/nf-core/demultiplex/pull/202) Added cellranger mkfastq subworkflow for demultiplexing 10x samples.
- [#206](https://github.com/nf-core/demultiplex/pull/206) Add test with uncompressed data.
- [#208](https://github.com/nf-core/demultiplex/pull/208) Added parameter for removing adapter information from samplesheets.

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
2. Element Biosciences (via `bases2fastq`)
3. Singular Genomics (via [`sgdemux`](https://github.com/Singular-Genomics/singular-demux))
4. FASTQ files with user supplied read structures (via [`fqtk`](https://github.com/fulcrumgenomics/fqtk))
5. 10x Genomics (via [`mkfastq`](https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/mkfastq))

The 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!

Expand All @@ -39,6 +40,7 @@ On release, automated continuous integration tests run the pipeline on a full-si
- [bcl2fastq](#bcl2fastq) - converting bcl files to fastq, and demultiplexing (CONDITIONAL)
- [sgdemux](#sgdemux) - demultiplexing bgzipped fastq files produced by Singular Genomics (CONDITIONAL)
- [fqtk](#fqtk) - a toolkit for working with FASTQ files, written in Rust (CONDITIONAL)
- [mkfastq](#mkfastq) - converting bcl files to fastq, and demultiplexing for single-cell sequencing data (CONDITIONAL)

2. [fastp](#fastp) - Adapter and quality trimming
3. [Falco](#falco) - Raw read QC
Expand Down
29 changes: 29 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,35 @@ process {
]
}

withName: CELLRANGER_MKFASTQ {
ext.args = {[
meta.lane ? "--lanes ${meta.lane}" : "",
].join(" ").trim()}
publishDir = [
[
// Gather and write InterOp files
path: { "${params.outdir}/${meta.id}/InterOp" },
mode: params.publish_dir_mode,
pattern: "**/outs/interop_path/**.bin",
saveAs: {filename -> filename.split("/")[-1] }
],
[
// Gather and write Reports and Stats
path: { meta.lane ? "${params.outdir}/${meta.id}/L00${meta.lane}" : "${params.outdir}/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "**/outs/fastq_path/{Reports,Stats}",
saveAs: {filename -> filename.split("/")[-1] }
],
[
//Gather fastqs
path: { "${params.outdir}/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "**/outs/fastq_path/**.fastq.gz",
saveAs: {filename -> filename.split("/")[-1] }
]
]
}

withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
Expand Down
25 changes: 25 additions & 0 deletions conf/test_mkfastq.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nf-core/demultiplex -profile test_mkfastq,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test mkfastq profile'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '1.h'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/samplesheet/1.3.0/mkfastq-samplesheet.csv'
demultiplexer = 'mkfastq'
}
20 changes: 20 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [bcl2fastq](#bcl2fastq) - converting bcl files to fastq, and demultiplexing (CONDITIONAL)
- [sgdemux](#sgdemux) - demultiplexing bgzipped fastq files produced by Singular Genomics (CONDITIONAL)
- [fqtk](#fqtk) - demultiplexing fastq files (CONDITIONAL)
- [mkfastq](#mkfastq) - converting bcl files to fastq, and demultiplexing for single-cell sequencing data (CONDITIONAL)
- [fastp](#fastp) - Adapter and quality trimming
- [Falco](#falco) - Raw read QC
- [md5sum](#md5sum) - Creates an MD5 (128-bit) checksum of every fastq.
Expand Down Expand Up @@ -101,6 +102,25 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d

</details>

### mkfastq

[mkfastq](https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/using/mkfastq) A tool for converting BCL files to FASTQ and demultiplexing for single-cell sequencing data.

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

| File | Directory | Description |
| :------------------- | :--------------------------------- | :---------------------------------------------------------- |
| FASTQ | <OUTDIR>/<id> | Demultiplexed fastq.gz files |
| `*.fastp.html` | <OUTDIR>/<id> | HTML report for fastp |
| `*.fastp.json` | <OUTDIR>/<id> | JSON report for fastp |
| `*_summary.txt` | <OUTDIR>/<id> | Summary statistics for the sequencing run |
| Fastqc summary stats | <OUTDIR>/<id>/\*fastqc_data.txt | Per base quality summary, for each demultiplexed FASTQ file |
| Fastqc summary html | <OUTDIR>/<id>/\*fastqc_report.html | Interactive html link for fastqc summary stats |
| Md5Sum | <OUTDIR>/<id>/\*.md5 | Md5Sums for each demultiplexed FASTQ file |

</details>

### fastp

<details markdown="1">
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"git_sha": "e1e42c1312400df268a0c92e14bd33552e782448",
"installed_by": ["bcl_demultiplex"]
},
"cellranger/mkfastq": {
"branch": "master",
"git_sha": "2bb941b6d3a01006c9f5bb49ca7eb8bb395dda9f",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "de45447d060b8c8b98575bc637a4a575fd0638e1",
Expand Down
40 changes: 40 additions & 0 deletions modules/nf-core/cellranger/mkfastq/Dockerfile

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

24 changes: 24 additions & 0 deletions modules/nf-core/cellranger/mkfastq/README.md

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

73 changes: 73 additions & 0 deletions modules/nf-core/cellranger/mkfastq/main.nf

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

41 changes: 41 additions & 0 deletions modules/nf-core/cellranger/mkfastq/meta.yml

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

Loading
Loading