diff --git a/processing-for-variant-discovery-gatk3.wdl b/processing-for-variant-discovery-gatk3.wdl index 7631ab9..56c05cc 100644 --- a/processing-for-variant-discovery-gatk3.wdl +++ b/processing-for-variant-discovery-gatk3.wdl @@ -76,18 +76,14 @@ workflow GenericPreProcessingWorkflow { # Align flowcell-level unmapped input bams in parallel scatter (unmapped_bam in flowcell_unmapped_bams) { - # Because of a wdl/cromwell bug this is not currently valid so we have to sub(sub()) in each task - # String base_name = sub(sub(unmapped_bam, "gs://.*/", ""), unmapped_bam_suffix + "$", "") - - String sub_strip_path = "gs://.*/" - String sub_strip_unmapped = unmapped_bam_suffix + "$" + String base_name = sub(basename(unmapped_bam), unmapped_bam_suffix + "$", "") + ".unmerged" # Map reads to reference call SamToFastqAndBwaMem { input: input_bam = unmapped_bam, bwa_commandline = bwa_commandline, - output_bam_basename = sub(sub(unmapped_bam, sub_strip_path, ""), sub_strip_unmapped, "") + ".unmerged", + output_bam_basename = base_name, ref_fasta = ref_fasta, ref_fasta_index = ref_fasta_index, ref_dict = ref_dict, @@ -108,7 +104,7 @@ workflow GenericPreProcessingWorkflow { bwa_commandline = bwa_commandline, bwa_version = GetBwaVersion.version, aligned_bam = SamToFastqAndBwaMem.output_bam, - output_bam_basename = sub(sub(unmapped_bam, sub_strip_path, ""), sub_strip_unmapped, "") + ".aligned.unsorted", + output_bam_basename = base_name, ref_fasta = ref_fasta, ref_fasta_index = ref_fasta_index, ref_dict = ref_dict, @@ -120,7 +116,7 @@ workflow GenericPreProcessingWorkflow { call SortAndFixTags as SortAndFixReadGroupBam { input: input_bam = MergeBamAlignment.output_bam, - output_bam_basename = sub(sub(unmapped_bam, sub_strip_path, ""), sub_strip_unmapped, "") + ".sorted", + output_bam_basename = base_name, ref_dict = ref_dict, ref_fasta = ref_fasta, ref_fasta_index = ref_fasta_index,