-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsma_finder_wdl_pipeline.wdl
More file actions
63 lines (52 loc) · 1.61 KB
/
sma_finder_wdl_pipeline.wdl
File metadata and controls
63 lines (52 loc) · 1.61 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
version 1.0
workflow SMAFinderWorkflow {
input {
String genome_version = "hg38" # can be "hg38", "hg37", or "t2t"
File ref_fasta
File ref_fasta_fai = "${ref_fasta}.fai"
File input_cram_or_bam
File input_crai_or_bai
String output_filename_prefix = sub(basename(input_cram_or_bam), "\\.bam$\|\\.cram$", "")
}
call SMAFinder {
input:
genome_version=genome_version,
ref_fasta=ref_fasta,
ref_fasta_fai=ref_fasta_fai,
input_cram_or_bam=input_cram_or_bam,
input_crai_or_bai=input_crai_or_bai,
output_filename_prefix=output_filename_prefix
}
output {
File output_tsv = SMAFinder.output_tsv
}
}
task SMAFinder {
input {
String genome_version
File ref_fasta
File ref_fasta_fai
File input_cram_or_bam
File input_crai_or_bai
String output_filename_prefix
Int disk_size = ceil(size(ref_fasta, "GB") + size(input_cram_or_bam, "GB") + 5)
}
command {
if [[ "${genome_version}" != "hg37" && "${genome_version}" != "hg38" && "${genome_version}" != "t2t" ]]; then
echo "ERROR: unexpected genome_version: ${genome_version}. It must be one of 'hg37', 'hg38', or 't2t'"
exit 1
fi
set -ex
python3 -u /sma_finder.py --verbose --${genome_version}-reference-fasta ${ref_fasta} \
--output-tsv ${output_filename_prefix}.tsv ${input_cram_or_bam}
}
output {
File output_tsv = "${output_filename_prefix}.tsv"
}
runtime {
docker: "weisburd/sma_finder@sha256:7ec68777a15b153dfad8c147482e57e2e3224b101be89e3e6dcecc3bc626c3bc"
cpu: 1
preemptible: 1
disks: "local-disk ${disk_size} HDD"
}
}