Skip to content

Commit

Permalink
added parameter to output 10x counts
Browse files Browse the repository at this point in the history
  • Loading branch information
kafkasl committed Oct 12, 2022
1 parent 7f7d69e commit 080c258
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nf-core/scrnaseq: Usage
3# nf-core/scrnaseq: Usage

> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ params {
// generic options
aligner = 'alevin'
bustools_correct = true
output_10x = false
outdir = null
input = null
save_reference = null
Expand Down
4 changes: 4 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"type": "string",
"description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.",
"fa_icon": "fas fa-file-signature"
},
"output_10x": {
"type": "boolean",
"description": "Generate 10x counts"
}
}
},
Expand Down
23 changes: 13 additions & 10 deletions subworkflows/local/mtx_conversion.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ workflow MTX_CONVERSION {
gtf
txp2gene
genome_fasta
output_10x


main:
Expand All @@ -25,17 +26,19 @@ workflow MTX_CONVERSION {
mtx_matrices
)

// Generate the t2g file to enrich the 10x files with gene names
KALLISTOBUSTOOLS_REF( genome_fasta, gtf, 'standard' )
txp2gene = KALLISTOBUSTOOLS_REF.out.t2g.collect()
if (output_10x) {
// Generate the t2g file to enrich the 10x files with gene names
KALLISTOBUSTOOLS_REF( genome_fasta, gtf, 'standard' )
txp2gene = KALLISTOBUSTOOLS_REF.out.t2g.collect()

//
// Convert h5ad files to 10x counts format
//
H5AD_TO_10X (
MTX_TO_H5AD.out.h5ad, // gather all sample-specific files
txp2gene
)
//
// Convert h5ad files to 10x counts format
//
H5AD_TO_10X (
MTX_TO_H5AD.out.h5ad, // gather all sample-specific files
txp2gene
)
}

//
// Concat sample-specific h5ad in one
Expand Down
5 changes: 4 additions & 1 deletion workflows/scrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true)

// general input and params
ch_input = file(params.input)
ch_output_10x = params.output_10x
ch_genome_fasta = params.fasta ? file(params.fasta) : []
ch_gtf = params.gtf ? file(params.gtf) : []
ch_transcript_fasta = params.transcript_fasta ? file(params.transcript_fasta): []
ch_txp2gene = params.txp2gene ? file(params.txp2gene) : []
ch_multiqc_alevin = Channel.empty()
ch_multiqc_star = Channel.empty()

if (params.barcode_whitelist) {
ch_barcode_whitelist = file(params.barcode_whitelist)
} else if (params.protocol.contains("10X")) {
Expand Down Expand Up @@ -188,7 +190,8 @@ workflow SCRNASEQ {
ch_input,
ch_gtf,
ch_txp2gene,
ch_genome_fasta
ch_genome_fasta,
ch_output_10x,

)

Expand Down

0 comments on commit 080c258

Please sign in to comment.