-
Notifications
You must be signed in to change notification settings - Fork 164
/
kallistobustools_count.nf
52 lines (47 loc) · 1.65 KB
/
kallistobustools_count.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
process KALLISTOBUSTOOLS_COUNT {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::kb-python=0.25.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/kb-python:0.25.1--py_0' :
'quay.io/biocontainers/kb-python:0.25.1--py_0' }"
input:
//
// Input reads are expected to come as: [ meta, [ pair1_read1, pair1_read2, pair2_read1, pair2_read2 ] ]
// Input array for a sample is created in the same order reads appear in samplesheet as pairs from replicates are appended to array.
//
tuple val(meta), path(reads)
path index
path t2g
path t1c
path t2c
val use_t1c
val use_t2c
val sc_workflow
val technology
output:
tuple val(meta), path ("*_kallistobustools_count*") , emit: counts
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def cdna = use_t1c ? "-c1 $t1c" : ''
def introns = use_t2c ? "-c2 $t2c" : ''
"""
kb count \\
-t $task.cpus \\
-i $index \\
-g $t2g \\
$cdna \\
$introns \\
--workflow $sc_workflow \\
-x $technology \\
$args \\
-o ${prefix}_kallistobustools_count \\
${reads.join( " " )}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
kallistobustools: \$(echo \$(kb --version 2>&1) | sed 's/^.*kb_python //;s/positional arguments.*\$//')
END_VERSIONS
"""
}