@@ -3,6 +3,9 @@ version 1.0
33workflow RescueAndLocityper {
44 input {
55 String sample_id
6+
7+ # File long_reads_bam
8+
69 File cram
710 File crai
811
@@ -11,32 +14,47 @@ workflow RescueAndLocityper {
1114 File ref_cache_tar_gz
1215 File counts_jf
1316
14- # File reference
15- # File reference_index
16- # File db_path
17+ # File vcf
18+ # File vcf_tbi
19+ # File bed
1720
18- String locus_name
21+ # String locus_name
1922 String locus_coordinates
2023
2124 File alleles_fa
22- # File weights_file
23-
24- String locityper_docker = "eichlerlab/locityper:0.19.1"
2525 }
2626
2727 call GenerateDB {
2828 input :
2929 reference = ref_fa_with_alt ,
3030 reference_index = ref_fai_with_alt ,
3131 counts_jf = counts_jf ,
32- locus_name = locus_name ,
32+ locus_name = "test" ,
3333 locus_coordinates = locus_coordinates ,
3434 alleles_fa = alleles_fa ,
35- docker = locityper_docker
3635 }
3736
37+ # call GenerateDBFromVCF {
38+ # input:
39+ # reference = ref_fa_with_alt,
40+ # reference_index = ref_fai_with_alt,
41+ # counts_jf = counts_jf,
42+ # vcf = vcf,
43+ # vcf_tbi = vcf_tbi,
44+ # bed = bed,
45+ # }
46+
47+ # call Fetch {
48+ # input:
49+ # bam = long_reads_bam,
50+ # loci = bed,
51+ # padding = 10000,
52+ # prefix = sample_id
53+ # }
54+
3855 call Rescue {
3956 input :
57+ # long_reads_fastx = Fetch.fastq,
4058 long_reads_fastx = alleles_fa ,
4159 short_reads_cram = cram ,
4260 short_reads_crai = crai ,
@@ -50,12 +68,13 @@ workflow RescueAndLocityper {
5068 input :
5169 sample_id = sample_id ,
5270 input_fq1 = Rescue .fastq_gz ,
71+ # db_targz = GenerateDBFromVCF.db_tar,
5372 db_targz = GenerateDB .db_tar ,
5473 counts_file = counts_jf ,
5574 reference = ref_fa_with_alt ,
56- locus_name = locus_name ,
75+ # locus_name = locus_name,
76+ locus_name = "test" ,
5777 reference_index = ref_fai_with_alt ,
58- docker = locityper_docker ,
5978 locityper_n_cpu = 4 ,
6079 locityper_mem_gb = 32
6180 }
@@ -100,8 +119,9 @@ task GenerateDBFromVCF {
100119 File reference_index
101120 File counts_jf
102121 File vcf
122+ File vcf_tbi
103123 File bed
104- String docker
124+ # String docker = "eichlerlab/locityper:0.19.1"
105125 }
106126
107127 Int disk_size = 10
@@ -124,16 +144,16 @@ task GenerateDBFromVCF {
124144 echo "done compressing DB"
125145 >>>
126146
147+ output {
148+ File db_tar = output_tar
149+ }
150+
127151 runtime {
128152 memory : "8 GB"
129153 cpu : "1"
130154 disks : "local-disk " + disk_size + " HDD"
131155 preemptible : 3
132- docker : docker
133- }
134-
135- output {
136- File db_tar = output_tar
156+ docker : "eichlerlab/locityper:0.19.1"
137157 }
138158}
139159
@@ -145,7 +165,6 @@ task GenerateDB {
145165 String locus_name
146166 String locus_coordinates
147167 File alleles_fa
148- String docker
149168 }
150169
151170 Int disk_size = 10
@@ -169,16 +188,47 @@ task GenerateDB {
169188 echo "done compressing DB"
170189 >>>
171190
191+ output {
192+ File db_tar = output_tar
193+ }
194+
172195 runtime {
173196 memory : "8 GB"
174197 cpu : "1"
175198 disks : "local-disk " + disk_size + " HDD"
176199 preemptible : 3
177- docker : docker
200+ docker : "eichlerlab/locityper:0.19.1"
201+ }
202+ }
203+
204+ task Fetch {
205+ input {
206+ String bam
207+ String ? locus
208+ File ? loci
209+ Int padding
210+
211+ String prefix = "out"
212+
213+ Int disk_size_gb = 2
214+ Int num_cpus = 4
178215 }
179216
217+ command <<<
218+ set -euxo pipefail
219+
220+ hidive fetch -l ~{select_first ([locus , loci ])} -p ~{padding } ~{bam } > ~{prefix }.fq
221+ >>>
222+
180223 output {
181- File db_tar = output_tar
224+ File fastq = "~{prefix }.fq"
225+ }
226+
227+ runtime {
228+ docker : "us.gcr.io/broad-dsp-lrma/lr-hidive:kvg_interlaced"
229+ memory : "2 GB"
230+ cpu : num_cpus
231+ disks : "local-disk ~{disk_size_gb } SSD"
182232 }
183233}
184234
@@ -238,14 +288,14 @@ task LocityperPreprocessAndGenotype {
238288 File counts_file
239289 File reference
240290 File reference_index
241- # File weights_file
242- String docker
243291 File db_targz
244292 String sample_id
245293 String locus_name
246294
247295 Int locityper_n_cpu
248296 Int locityper_mem_gb
297+
298+ String docker = "eichlerlab/locityper:0.19.1"
249299 }
250300
251301 Int disk_size = 80 + ceil (size (select_all ([input_fq1 , input_fq2 ]), "GiB" ))
@@ -274,6 +324,7 @@ task LocityperPreprocessAndGenotype {
274324
275325 mkdir -p out_dir
276326 locityper genotype -i ~{sep =" " select_all ([input_fq1 , input_fq2 ])} \
327+ --interleaved \
277328 -d db \
278329 -p locityper_prepoc \
279330 -@ ${nthreads } \
0 commit comments