forked from vib-singlecell-nf/vsn-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_atac.nf
121 lines (82 loc) · 2.63 KB
/
main_atac.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
import static groovy.json.JsonOutput.*
nextflow.enable.dsl=2
include {
INIT;
} from './src/utils/workflows/utils' params(params)
INIT(params)
include {
SC__FILE_CONVERTER;
} from './src/utils/processes/utils' params(params)
include {
getDataChannel;
} from './src/channels/channels' params(params)
/*
ATAC-seq pipelines
*/
// runs mkfastq, then cellranger-atac count:
workflow cellranger_atac {
include {
CELLRANGER_ATAC
} from './src/cellranger-atac/main.nf' params(params)
CELLRANGER_ATAC(
file(params.tools.cellranger_atac.mkfastq.csv),
file(params.tools.cellranger_atac.mkfastq.runFolder),
file(params.tools.cellranger_atac.count.reference)
)
}
workflow atac_preprocess {
// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
include {
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)
ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata))
}
workflow atac_preprocess_bap {
include {
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)
include {
get_bam;
BAP__BARCODE_MULTIPLET_WF;
} from './src/bap/main.nf' params(params)
ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata)) |
get_bam |
BAP__BARCODE_MULTIPLET_WF
}
workflow bap {
include {
BAP__BARCODE_MULTIPLET_WF;
} from './src/bap/main.nf' params(params)
getDataChannel | BAP__BARCODE_MULTIPLET_WF
}
/*
QC
*/
workflow atac_qc_filtering {
include {
ATAC_QC_PREFILTER;
} from './workflows/atac/qc_filtering.nf' params(params)
getDataChannel | ATAC_QC_PREFILTER
}
workflow atac_preprocess_with_qc {
// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
include {
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)
include {
ATAC_QC_PREFILTER;
} from './workflows/atac/qc_filtering.nf' params(params)
pp = ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata))
ATAC_QC_PREFILTER(pp.bam.mix(pp.fragments))
}
workflow atac_preprocess_freemuxlet {
// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
include {
ATAC_PREPROCESS_WITH_METADATA;
} from './workflows/atac/preprocess.nf' params(params)
include {
freemuxlet as FREEMUXLET;
} from './workflows/popscle' params(params)
ATAC_PREPROCESS_WITH_METADATA(file(params.tools.atac.preprocess.metadata))
FREEMUXLET(ATAC_PREPROCESS_WITH_METADATA.out.bam)
}