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 whitelist parameter to kb module #7369

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
13 changes: 8 additions & 5 deletions modules/nf-core/kallistobustools/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ process KALLISTOBUSTOOLS_COUNT {
path t2g
path t1c
path t2c
path whitelist
val technology
val workflow_mode

Expand All @@ -25,11 +26,12 @@ process KALLISTOBUSTOOLS_COUNT {
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def cdna = t1c ? "-c1 $t1c" : ''
def intron = t2c ? "-c2 $t2c" : ''
def memory = task.memory.toGiga() - 1
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def cdna = t1c ? "-c1 $t1c" : ''
def intron = t2c ? "-c2 $t2c" : ''
def whitelist = whitelist ? "-w $whitelist" : ''
def memory = task.memory.toGiga() - 1
"""
kb \\
count \\
Expand All @@ -38,6 +40,7 @@ process KALLISTOBUSTOOLS_COUNT {
-g $t2g \\
$cdna \\
$intron \\
$whitelist \\
-x $technology \\
--workflow $workflow_mode \\
$args \\
Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/kallistobustools/count/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ input:
type: file
description: kb ref's c2 intron_t2c file
pattern: "*.{intron_t2c.txt}"
- - whitelist:
type: file
description: barcode whitelist file
pattern: "*.txt"
- - technology:
type: string
description: String value defining the sequencing technology used.
Expand Down
10 changes: 6 additions & 4 deletions modules/nf-core/kallistobustools/count/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ nextflow_process {
input[2] = KALLISTOBUSTOOLS_REF.out.t2g
input[3] = KALLISTOBUSTOOLS_REF.out.cdna_t2c.ifEmpty{ [] } // when empty the module doesn't run unless something is passed.
input[4] = KALLISTOBUSTOOLS_REF.out.intron_t2c.ifEmpty{ [] } // when empty the module doesn't run unless something is passed.
input[5] = "10XV3"
input[6] = "standard"
input[5] = [] // Barcode whitelist is not required, as 10XV3 is used
input[6] = "10XV3"
input[7] = "standard"
"""
}
}
Expand Down Expand Up @@ -82,8 +83,9 @@ nextflow_process {
input[2] = KALLISTOBUSTOOLS_REF.out.t2g
input[3] = KALLISTOBUSTOOLS_REF.out.cdna_t2c.ifEmpty{ [] } // when empty the module doesn't run unless something is passed.
input[4] = KALLISTOBUSTOOLS_REF.out.intron_t2c.ifEmpty{ [] } // when empty the module doesn't run unless something is passed.
input[5] = "10XV3"
input[6] = "standard"
input[5] = [] // Barcode whitelist is not required, as 10XV3 is used
input[6] = "10XV3"
input[7] = "standard"
"""
}
}
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-core/kallistobustools/count/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
[
" \"commands\": [",
" \"kallisto bus -i kb_ref_out.idx -o test.count -x 10XV3 -t 2 subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R1_001.fastq.gz subsampled_SC3_v3_NextGem_DI_CellPlex_Human_PBMC_10K_1_gex_S2_L001_R2_001.fastq.gz\",",
" \"bustools sort -o test.count/tmp/output.s.bus -T test.count/tmp -t 2 -m 2G test.count/output.bus\",",
" \"bustools sort -o test.count/tmp/output.s.bus -T test.count/tmp -t 2 -m 3G test.count/output.bus\",",
" \"bustools inspect -o test.count/inspect.json -w test.count/10x_version3_whitelist.txt test.count/tmp/output.s.bus\",",
" \"bustools correct -o test.count/tmp/output.s.c.bus -w test.count/10x_version3_whitelist.txt test.count/tmp/output.s.bus\",",
" \"bustools sort -o test.count/output.unfiltered.bus -T test.count/tmp -t 2 -m 2G test.count/tmp/output.s.c.bus\",",
" \"bustools sort -o test.count/output.unfiltered.bus -T test.count/tmp -t 2 -m 3G test.count/tmp/output.s.c.bus\",",
" \"bustools count -o test.count/counts_unfiltered/cells_x_genes -g t2g.txt -e test.count/matrix.ec -t test.count/transcripts.txt --genecounts --umi-gene test.count/output.unfiltered.bus\"",
" ],"
],
Expand All @@ -92,9 +92,9 @@
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nf-test": "0.9.2",
"nextflow": "24.10.3"
},
"timestamp": "2024-03-01T15:48:24.476953631"
"timestamp": "2025-01-26T19:28:54.613634668"
}
}
Loading