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

Draft: Add feature for sample demultiplexing followed by immune profiling #364

Closed
wants to merge 14 commits into from
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ reports/
testme.sh
.nf-test*
.vscode
null/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
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).

## [Unreleased]

## v2.7.1 - 2024-08-13

- Fix that tests have not been executed with nf-test v0.9 ([#359](https://github.com/nf-core/scrnaseq/pull/359))
Expand Down
4 changes: 2 additions & 2 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/scrnaseq/releases/tag/2.7.1" target="_blank">nf-core/scrnaseq</a>
This report has been generated by the <a href="https://github.com/nf-core/scrnaseq/tree/dev" target="_blank">nf-core/scrnaseq</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/scrnaseq/2.7.1/docs/output" target="_blank">documentation</a>.
<a href="https://nf-co.re/scrnaseq/dev/docs/output" target="_blank">documentation</a>.
report_section_order:
"nf-core-scrnaseq-methods-description":
order: -1000
Expand Down
9 changes: 8 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ if (params.aligner == 'kallisto') {
if (params.aligner == 'cellrangermulti') {
process {
withName: FASTQC { ext.prefix = { "${meta.id}_${meta.feature_type}" } } // allow distinguishment of data types after renaming
withName: 'NFCORE_SCRNASEQ:SCRNASEQ:CELLRANGER_MULTI_ALIGN:CELLRANGER_MULTI' {
withName: 'NFCORE_SCRNASEQ:SCRNASEQ:CELLRANGER_MULTI_ALIGN:CELLRANGER_MULTI|NFCORE_SCRNASEQ:SCRNASEQ:CELLRANGER_MULTI_ALIGN_VDJ:CELLRANGER_MULTI_DEMUX|NFCORE_SCRNASEQ:SCRNASEQ:CELLRANGER_MULTI_ALIGN_VDJ:CELLRANGER_MULTI_IMMUNE' {
ext.prefix = null // force it null, for some reason it was being wrongly read in the module
publishDir = [
path: "${params.outdir}/${params.aligner}/count",
Expand Down Expand Up @@ -250,5 +250,12 @@ if (params.aligner == 'cellrangermulti') {
mode: params.publish_dir_mode
]
}
withName: BAMTOFASTQ10X {
publishDir = [
path: "${params.outdir}/${params.aligner}/bam2fastq",
mode: params.publish_dir_mode
]
ext.args = "--reads-per-fastq=2200000000"
}
}
}
2 changes: 2 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ for the corresponding documentation.

- Overall same output structure as cellranger. In case of multiplexed samples there will be one ouput folder for
each demultiplexed sample, and one containing all (non-demultiplexed) cells.
- In case sample demultiplexing is to be followed by immune profiling, an extra output is added containing .fastq files
converted from the standard .bam file output.

## UniverSC

Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"bamtofastq10x": {
"branch": "master",
"git_sha": "63d6994f4f85c0628b7f2ac1e7097136c1b4be34",
"installed_by": ["modules"]
},
"cellranger/count": {
"branch": "master",
"git_sha": "90dad5491658049282ceb287a3d7732c1ce39837",
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/bamtofastq10x/environment.yml

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

54 changes: 54 additions & 0 deletions modules/nf-core/bamtofastq10x/main.nf

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

48 changes: 48 additions & 0 deletions modules/nf-core/bamtofastq10x/meta.yml

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

55 changes: 55 additions & 0 deletions modules/nf-core/bamtofastq10x/tests/main.nf.test

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

47 changes: 47 additions & 0 deletions modules/nf-core/bamtofastq10x/tests/main.nf.test.snap

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

2 changes: 2 additions & 0 deletions modules/nf-core/bamtofastq10x/tests/tags.yml

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

2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ manifest {
description = """Pipeline for processing 10x Genomics single cell rnaseq data"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '2.7.1'
version = '2.8.0dev'
doi = '10.5281/zenodo.3568187'
}

Expand Down
61 changes: 2 additions & 59 deletions subworkflows/local/align_cellrangermulti.nf
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
//
// Include modules
//
include { CELLRANGER_MKGTF } from "../../modules/nf-core/cellranger/mkgtf/main.nf"
include { CELLRANGER_MKREF } from "../../modules/nf-core/cellranger/mkref/main.nf"
include { CELLRANGER_MKVDJREF } from "../../modules/nf-core/cellranger/mkvdjref/main.nf"
include { CELLRANGER_MULTI } from "../../modules/nf-core/cellranger/multi/main.nf"
include { PARSE_CELLRANGERMULTI_SAMPLESHEET } from "../../modules/local/parse_cellrangermulti_samplesheet.nf"

// Define workflow to subset and index a genome region fasta file
workflow CELLRANGER_MULTI_ALIGN {
take:
ch_fasta
ch_gtf
ch_fastq
cellranger_gex_index
cellranger_vdj_index
ch_cellranger_gex_index
ch_cellranger_vdj_index
ch_multi_samplesheet

main:
Expand Down Expand Up @@ -109,58 +104,6 @@ workflow CELLRANGER_MULTI_ALIGN {
ch_frna_sample_csv = []
}

//
// Prepare GTF
//
if ( !cellranger_gex_index || (!cellranger_vdj_index && !params.skip_cellrangermulti_vdjref) ) {

// Filter GTF based on gene biotypes passed in params.modules
CELLRANGER_MKGTF ( ch_gtf )
ch_versions = ch_versions.mix(CELLRANGER_MKGTF.out.versions)

}

//
// Prepare gex reference (Normal Ref)
//
if ( !cellranger_gex_index ) {

// Make reference genome
CELLRANGER_MKREF(
ch_fasta,
CELLRANGER_MKGTF.out.gtf,
"gex_reference"
)
ch_versions = ch_versions.mix(CELLRANGER_MKREF.out.versions)
ch_cellranger_gex_index = CELLRANGER_MKREF.out.reference.ifEmpty { [] }

} else {
ch_cellranger_gex_index = cellranger_gex_index
}

//
// Prepare vdj reference (Special)
//
if ( !cellranger_vdj_index ) {

if ( !params.skip_cellrangermulti_vdjref ) { // if user uses cellranger multi but does not have VDJ data
// Make reference genome
CELLRANGER_MKVDJREF(
ch_fasta,
CELLRANGER_MKGTF.out.gtf,
[], // currently ignoring the 'seqs' option
"vdj_reference"
)
ch_versions = ch_versions.mix(CELLRANGER_MKVDJREF.out.versions)
ch_cellranger_vdj_index = CELLRANGER_MKVDJREF.out.reference.ifEmpty { [] }
} else {
ch_cellranger_vdj_index = []
}

} else {
ch_cellranger_vdj_index = cellranger_vdj_index
}

//
// MODULE: cellranger multi
//
Expand Down
Loading
Loading