Skip to content

Commit

Permalink
Made finalization optional in SRBamToFq.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonn-smith committed Dec 9, 2024
1 parent e46a4e2 commit 039478c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions wdl/pipelines/TechAgnostic/Utility/SRBamToFq.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ workflow SRBamToFq {
File bam
String participant_name

String gcs_out_root_dir
String? gcs_out_root_dir
}

String outdir = sub(gcs_out_root_dir, "/$", "") + "/SRBamToFq/~{participant_name}"

call SRUtils.BamToFq { input: bam = bam, prefix = participant_name }

call FF.FinalizeToFile as FinalizeFqEnd1 { input: outdir = outdir, file = BamToFq.fq_end1 }
call FF.FinalizeToFile as FinalizeFqEnd2 { input: outdir = outdir, file = BamToFq.fq_end2 }
call FF.FinalizeToFile as FinalizeFqUnpaired { input: outdir = outdir, file = BamToFq.fq_unpaired }
if (defined(gcs_out_root_dir)) {
String outdir = sub(select_first([gcs_out_root_dir]), "/$", "") + "/SRBamToFq/~{participant_name}"

call FF.FinalizeToFile as FinalizeFqEnd1 { input: outdir = outdir, file = BamToFq.fq_end1 }
call FF.FinalizeToFile as FinalizeFqEnd2 { input: outdir = outdir, file = BamToFq.fq_end2 }
call FF.FinalizeToFile as FinalizeFqUnpaired { input: outdir = outdir, file = BamToFq.fq_unpaired }
}

output {
File fq_end1 = FinalizeFqEnd1.gcs_path
File fq_end2 = FinalizeFqEnd2.gcs_path
File fq_unpaired = FinalizeFqUnpaired.gcs_path
File fq_end1 = select_first([FinalizeFqEnd1.gcs_path, BamToFq.fq_end1])
File fq_end2 = select_first([FinalizeFqEnd2.gcs_path, BamToFq.fq_end2])
File fq_unpaired = select_first([FinalizeFqUnpaired.gcs_path, BamToFq.fq_unpaired])
}
}

0 comments on commit 039478c

Please sign in to comment.