Skip to content

Commit 8de95b7

Browse files
committed
Provide interface to pseudoaligner kmer length
1 parent e4c8d67 commit 8de95b7

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

conf/modules.config

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ process {
7575
}
7676

7777
withName: 'SALMON_INDEX' {
78-
ext.args = params.gencode ? '--gencode' : ''
78+
ext.args = { [
79+
params.gencode ? '--gencode' : '',
80+
params.pseudo_kmer_size ? "-k ${params.pseudo_kmer_size}": ''
81+
].join(' ').trim() }
7982
publishDir = [
8083
path: { "${params.outdir}/genome/index" },
8184
mode: params.publish_dir_mode,
@@ -84,7 +87,7 @@ process {
8487
}
8588

8689
withName: 'KALLISTO_INDEX' {
87-
ext.args = { params.gencode ? '--gencode' : '' }
90+
ext.args = params.kmer_size ? "-k ${params.pseudo_kmer_size}" : ''
8891
publishDir = [
8992
path: { "${params.outdir}/genome/index" },
9093
mode: params.publish_dir_mode,

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ params {
5959
// Alignment
6060
aligner = 'star_salmon'
6161
pseudo_aligner = null
62+
pseudo_aligner_kmer_size = 31
6263
seq_center = null
6364
bam_csi_index = false
6465
star_ignore_sjdbgtf = false

nextflow_schema.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,13 @@
361361
"fa_icon": "fas fa-hamburger",
362362
"enum": ["salmon", "kallisto"]
363363
},
364+
"pseudo_aligner_kmer_size": {
365+
"type": "integer",
366+
"default": 31,
367+
"description": "Kmer length passed to indexing step of pseudoaligners",
368+
"help_text": "Failure to set a good kmer size could cause issues with quantification with Kallisto or Salmon. This is mostly an issue for short reads (<50bp), where the default kmer size of 31 is an problem.",
369+
"fa_icon": "fas fa-ruler-horizontal"
370+
},
364371
"bam_csi_index": {
365372
"type": "boolean",
366373
"description": "Create a CSI index for BAM files instead of the traditional BAI index. This will be required for genomes with larger chromosome sizes.",
@@ -397,7 +404,7 @@
397404
},
398405
"min_mapped_reads": {
399406
"type": "number",
400-
"default": 5.0,
407+
"default": 5,
401408
"fa_icon": "fas fa-percentage",
402409
"description": "Minimum percentage of uniquely mapped reads below which samples are removed from further processing.",
403410
"help_text": "Some downstream steps in the pipeline will fail if this threshold is too low."

0 commit comments

Comments
 (0)