Skip to content

Commit

Permalink
expose --skipMarkDupes and --plotOnlyNonDuplicates in WDL (#925)
Browse files Browse the repository at this point in the history
expose --skipMarkDupes and --plotOnlyNonDuplicates in WDL task plot_coverage in tasks_reports.wdl
  • Loading branch information
tomkinsc authored Feb 14, 2019
1 parent aeb76dd commit f89f55a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pipes/WDL/workflows/tasks/tasks_reports.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ task plot_coverage {
String? aligner="novoalign" # novoalign or bwa
String? aligner_options="-r Random -l 40 -g 40 -x 20 -t 100 -k"

Boolean? skip_mark_dupes=false
Boolean? plot_only_non_duplicates=false

command {
set -ex -o pipefail

Expand All @@ -37,6 +40,7 @@ task plot_coverage {
--GATK_PATH gatk/ \
--aligner ${aligner} \
--aligner_options "${aligner_options}" \
${true='--skipMarkDupes' false="" skip_mark_dupes} \
--JVMmemory=3g \
--loglevel=DEBUG

Expand All @@ -56,6 +60,11 @@ task plot_coverage {
# fastqc mapped bam
reports.py fastqc ${sample_name}.mapped.bam ${sample_name}.mapped_fastqc.html

PLOT_DUPE_OPTION=""
if [[ "${skip_mark_dupes}" != "true" ]]; then
PLOT_DUPE_OPTION="${true='--plotOnlyNonDuplicates' false="" plot_only_non_duplicates}"
fi

# plot coverage
if [ $(cat reads_aligned) != 0 ]; then
reports.py plot_coverage \
Expand All @@ -65,6 +74,7 @@ task plot_coverage {
--plotWidth 1100 \
--plotHeight 850 \
--plotDPI 100 \
$PLOT_DUPE_OPTION \
--plotTitle "${sample_name} coverage plot" \
--loglevel=DEBUG
else
Expand Down

0 comments on commit f89f55a

Please sign in to comment.