-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVelopipe2.wdl
90 lines (78 loc) · 2.51 KB
/
Velopipe2.wdl
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
version 1.0
import "modules/ExtractBarcodes.wdl" as ExtractBarcodes
import "modules/SplitBam.wdl" as SplitBam
import "modules/SortIndexBam.wdl" as SortIndexBam
import "modules/TagBam2.wdl" as TagBam2
import "modules/MergeBam.wdl" as MergeBam
import "modules/SortByBarcode.wdl" as SortByBarcode
import "modules/Velocyto.wdl" as Velocyto
workflow Velopipe2 {
input {
String sampleName
File bam
Int numOfChunks = 20
File cbCorrection
File umiCorrection
File filteredBarcodes
File gtf
File fullBarcodeWhitelist
# docker-related
String dockerRegistry
}
call ExtractBarcodes.ExtractBarcodes {
input:
filteredBarcodes = filteredBarcodes,
dockerRegistry = dockerRegistry
}
call SplitBam.SplitBam {
input:
inBam = bam,
numOfChunks = numOfChunks
}
scatter (bam in SplitBam.outBam) {
call SortIndexBam.SortIndexBam {
input:
inBam = bam,
dockerRegistry = dockerRegistry
}
}
call TagBam2.TagBam2 {
input:
inBam = SortIndexBam.outSortedBam,
inBai = SortIndexBam.outSortedBai,
whitelist = fullBarcodeWhitelist,
cbCorrection = cbCorrection,
umiCorrection = umiCorrection,
dockerRegistry = dockerRegistry
}
call MergeBam.MergeBam {
input:
chunks = TagBam2.outTaggedBam,
fileName = sampleName + ".tagged.bam"
}
# if the file cellsorted_${ORIGINAL-BAM-NAME} exists,
# the sorting procedure will be skipped and the file present will be used.
call SortByBarcode.SortByBarcode as CBSortedTaggedBam {
input:
inBam = MergeBam.outBam,
dockerRegistry = dockerRegistry
}
call Velocyto.Velocyto {
input:
bamCBSorted = CBSortedTaggedBam.outSortedBam,
bamPosSorted = MergeBam.outBam,
baiPosSorted = MergeBam.outBai,
gtf = gtf,
filteredBarcodeSet = ExtractBarcodes.outFilteredBarcodesACGT,
dockerRegistry = dockerRegistry
}
output {
File outCBSortedTaggedBam = CBSortedTaggedBam.outSortedBam
File outPosSortedTaggedBam = MergeBam.outBam
File outPosSortedTaggedBai = MergeBam.outBai
File outLoom = Velocyto.outLoom
File outTagBamLog = TagBam2.outLog
File outTagBamStats = TagBam2.outStats
File outVelocytoLog = Velocyto.outLog
}
}