Skip to content

Commit

Permalink
Merge pull request #68 from tmooney/idx_rx_only
Browse files Browse the repository at this point in the history
Add a version of the RxIdentifier workflow that takes index as an input
  • Loading branch information
tmooney authored Dec 13, 2021
2 parents b852da2 + 6ace446 commit ff7f603
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
59 changes: 59 additions & 0 deletions PreindexedRxIdentifier.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

version 1.0

## Portions Copyright Broad Institute, 2018
##
## This WDL pipeline implements QC in human whole-genome or exome/targeted sequencing data.
##
## Requirements/expectations
## - Human paired-end sequencing data in aligned BAM or CRAM format
## - Input BAM/CRAM files must additionally comply with the following requirements:
## - - files must pass validation by ValidateSamFile
## - - reads are provided in query-sorted order
## - - all reads must have an RG tag
## - Reference genome must be Hg38 with ALT contigs
##
## Runtime parameters are optimized for Broad's Google Cloud Platform implementation.
## For program versions, see docker containers.
##
## LICENSING :
## This script is released under the WDL open source code license (BSD-3).
## Full license text at https://github.com/openwdl/wdl/blob/master/LICENSE
## Note however that the programs it calls may be subject to different licenses.
## Users are responsible for checking that they are authorized to run all programs before running this script.
## - [Picard](https://broadinstitute.github.io/picard/)
## - [VerifyBamID2](https://github.com/Griffan/VerifyBamID)
# Git URL import
import "tasks/Qc.wdl" as QC

# WORKFLOW DEFINITION
workflow RxIdentifier {
input {
File input_bam
File input_bam_index
String base_name
Int preemptible_tries
}

# Collect BAM/CRAM index stats
call QC.BamIndexStats as BamIndexStats {
input:
input_bam = input_bam,
input_bam_index = input_bam_index,
preemptible_tries = preemptible_tries
}

call QC.RxIdentifier as RxIdentifier {
input:
idxstats = BamIndexStats.idxstats,
sample_id = base_name,
preemptible_tries = preemptible_tries
}

output {
File bam_idxstats = BamIndexStats.idxstats
File bam_rx_result = RxIdentifier.rx_result
String rx_value = RxIdentifier.rx_value
}
}
3 changes: 2 additions & 1 deletion RxIdentifier.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version 1.0
import "tasks/Qc.wdl" as QC

# WORKFLOW DEFINITION
workflow Idxstats {
workflow RxIdentification {
input {
File input_bam
String base_name
Expand Down Expand Up @@ -63,5 +63,6 @@ workflow Idxstats {
File bam_index = BuildBamIndex.bam_index
File bam_idxstats = BamIndexStats.idxstats
File bam_rx_result = RxIdentifier.rx_result
String bam_rx_value = RxIdentifier.rx_value
}
}
1 change: 1 addition & 0 deletions SingleSampleQc.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,6 @@ workflow SingleSampleQc {
File input_bam_index = BuildBamIndex.bam_index
File input_bam_idxstats = BamIndexStats.idxstats
File input_bam_rx_result = RxIdentifier.rx_result
String input_bam_rx_value = RxIdentifier.rx_value
}
}
1 change: 1 addition & 0 deletions tasks/Qc.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ task RxIdentifier {
}
output {
File rx_result = "~{output_name}"
String rx_value = read_tsv(output_name)[0][5]
}
}
Expand Down

0 comments on commit ff7f603

Please sign in to comment.