-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.nf
More file actions
116 lines (101 loc) · 2.96 KB
/
main.nf
File metadata and controls
116 lines (101 loc) · 2.96 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
nextflow.preview.dsl=2
/*
================================================================================
= Sinonkt Style I N I T =
================================================================================
*/
params.MAINTAINERS = [
'Krittin Phornsiricharoenphant (oatkrittin@gmail.com)'
]
include './modules/nbt/utils'
def schema = readAvroSchema("${workflow.projectDir}/schemas/value.avsc")
params = params << getDefaultParams(schema)
include './modules/nbt/log' params(params)
include helpMessage from './modules/nbt/help' params(params)
if (params.version) exit 1, workflowVersionMessage()
if (params.help) exit 1, helpMessage(schema)
/*
================================================================================
= Sinonkt Style Workflows definitions =
================================================================================
*/
include "./modules/math.nf" params(params)
include "./modules/combine.nf" params(params)
// workflow SumOfPower2 {
// get:
// xs
// main:
// Power2(xs)
// Sum(Power2.out.toList())
// emit:
// Sum.out.y
// }
// workflow SumOfPower3 {
// get:
// xs
// main:
// Power3(xs)
// Sum(Power3.out.toList())
// emit:
// Sum.out.z
// }
// workflow Proton {
// get: files
// main:
// Concat(files)
// }
process MyFastQBam {
tag { chr }
input:
set sampleId, file(fastq), file(bam)
each chrPos
// each ref
script:
(chr, pos) = chrPos
println (chr)
println (pos)
"""
ls
"""
}
workflow {
fastqs = Channel.fromPath("/tarafs/biobank/bio0001-human/GeTH/FASTQ/HS06/*/*.{fq,fastq}.gz").map { [ it.parent.name, it ] }
bams = Channel.fromPath("/tarafs/biobank/bio0001-human/GeTH/BAM/HS06/*/*.bam").map { [ it.parent.name, it ] }
// ref = Channel.fromPath("/tarafs/biobank/data/share/pachyderm/variant-calling-toolkit/references/human/ucsc_hg19/ucsc.hg19.fa").first()
chrs = Channel.from(["chr1", "pos1"], ["chr2", "pos2"], ["chr3", "pos3"])
// refs = Channel.from("ref1", "ref2")
// bams.view()
merged = fastqs.join(bams)
// combined = merged.combine(chrs)
// combined.view()
MyFastQBam(merged, chrs)
// right= Channel.from(['Z', 6], ['Y', 5], ['X', 4], ['X', 5])
// left.join(right).view()
// xs = Channel.from(1..params.x)
// ys = Channel.from(1..params.y)
// xs.product(ys).view()
// Power2(my_nums)
// Power2.out.result.view()
// (Result, Original) = Power2.out
// Proton(Result.toList())
// Original.view()
// Result.view()
// if (params.need2) {
// SumOfPower2(my_nums)
// SumOfPower2.out.view()
// } else {
// SumOfPower3(my_nums)
// SumOfPower3.out.view()
// }
// Power2(my_nums)
// Power3(my_nums)
// Power2.out.toList().view()
// power2odd = Power2.out.filter { it % 2 == 1 }
// Sum(power2odd.toList())
// Sum.out.z.view()
// Sum.out.y.view()
// Sum.out.z.view()
// Power2.out.view()
// Power3.out.view()
// Power3()
}