-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
130 lines (102 loc) · 2.96 KB
/
main.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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/env/ nextflow
nextflow.enable.dsl=2
input_exp = file(params.input)
output_exp = params.output
read_in = file(params.read_in)
read_out = params.read_out
pre_in = file(params.pre_in)
pre_out = params.pre_out
pre_vio_1 = params.vio1
pre_vio_2 = params.vio2
pre_vio_3 = params.vio3
pre_scat1 = params.scat1
pre_scat2 = params.scat2
pre_dispersion = params.dispersion
pre_adata_out = params.pre_adata_out
pca_in = params.pca_in
pca_plot1 = params.pca_plot1
pca_plot2 = params.pca_plot2
pca_plot3 = params.pca_plot3
pca_plot4 = params.pca_plot4
pca_plot5 = params.pca_plot5
pca_out = params.pca_out
mgenes_in = params.mgenes_in
mgenes_plot1 = params.mgenes_plot1
mgenes_plot2 = params.mgenes_plot2
mgenes_out = params.mgenes_out
mgenes_plot3 = params.mgenes_plot3
mgenes_plot4 = params.mgenes_plot4
mgenes_plot5 = params.mgenes_plot5
mgenes_plot6 = params.mgenes_plot6
mgenes_plot7 = params.mgenes_plot7
mgenes_plot8 = params.mgenes_plot8
mgenes_plot9 = params.mgenes_plot9
// mgenes_plot10 = params.mgenes_plot10
mgenes_out2 = params.mgenes_out2
mgenes_out3 = params.mgenes_out3
process READ {
publishDir "output", mode: "copy"
publishDir "output", pattern: "pbmc3k.h5ad"
input: path(read_in)
output: path("${read_out}")
script:
"""
1_read.py --path ${read_in} --outfile ${read_out}
"""
}
process PREPRO {
publishDir "output", mode: "copy"
input: path(read_out)
output: path("figures/*")
path("${pre_adata_out}"), emit: pre_adata_out
script:
"""
2_preprocess.py --anndata_path ${read_out} --results_file ${pre_adata_out}
"""
}
process PCA {
conda 'scanpy_38'
publishDir "output", mode: "copy"
publishDir "output", pattern: ".h5ad"
input: path(pre_adata_out)
output: path("${pca_plot1}")
path("${pca_plot2}")
path("${pca_plot3}")
path("${pca_plot4}")
path("${pca_plot5}")
path("${pca_out}")
script:
"""
3_PCA.py --pca_adata_input ${pre_adata_out} --pca_outfile ${pca_out}
"""
}
process M_GENES {
conda 'scanpy_38'
publishDir "output", mode: "copy"
publishDir "output", pattern: ".h5ad"
input: path(pca_out)
output: path("${mgenes_plot1}")
path("${mgenes_plot2}")
path("${mgenes_out}")
path("${mgenes_plot3}")
path("${mgenes_plot4}")
path("${mgenes_plot5}")
path("${mgenes_plot6}")
path("${mgenes_plot7}")
path("${mgenes_plot8}")
path("${mgenes_plot9}")
// path("${mgenes_plot10}")
path("${mgenes_out2}")
path("${mgenes_out3}")
script:
"""
4_marker_genes.py --mg_adata_input ${pca_out} --mg_outfile_mid ${mgenes_out} --mg_outfile_end ${mgenes_out2} \
--mg_outfile_withoutx ${mgenes_out3}
"""
}
workflow {
READ(read_in)
PREPRO(READ.out[0])
PCA(PREPRO.out.pre_adata_out)
M_GENES(PCA.out[5])
}