-
Notifications
You must be signed in to change notification settings - Fork 0
/
bShrink.nf
61 lines (46 loc) · 1.43 KB
/
bShrink.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
53
54
55
56
57
58
59
60
61
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
////////////////////////////////////////////////////
/* -- VALIDATE INPUTS -- */
////////////////////////////////////////////////////
Channel
.fromPath(params.count, checkIfExists:true)
.map{ it -> [it.getParent().getName(), it] }
.set{ ch_count }
Channel
.fromList(params.ncell)
.set{ ch_ncell }
Channel
.fromList(params.ngene)
.set{ ch_ngene }
Channel
.of(1..params.nsamp)
.set{ ch_nsamp }
ch_count
.combine(ch_ncell)
.combine(ch_ngene)
.combine(ch_nsamp)
.set{ ch_input }
///////////////////////////////////////////////////////////////
/* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */
///////////////////////////////////////////////////////////////
include { SAMPLE } from './modules/sample.nf'
include { IMPUTE } from './modules/impute.nf'
include { BENCHMARK } from './modules/benchmark.nf'
workflow {
// sample genes and cells
SAMPLE(ch_input)
// impute zeros
IMPUTE(SAMPLE.out, params.imputation)
// benchmark
SAMPLE.out
.map{ it -> [ it[0], it[1], it[2], it[3], 'None', it[4], it[5] ] }
.set{ch_bench_nozero}
IMPUTE.out
.map{ it -> [ it[0], it[1], it[2], it[3], it[4], it[5], it[7] ] }
.set{ch_bench_withzero}
ch_bench_nozero
.mix(ch_bench_withzero)
.set{ch_bench}
BENCHMARK(ch_bench, params.transformation)
}