Skip to content

Commit

Permalink
Cleaned up intermediate files in gCNV WDL. (#5382)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelklee committed Feb 21, 2019
1 parent ac1b146 commit c66bbbd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
11 changes: 6 additions & 5 deletions scripts/cnv_wdl/cnv_common_tasks.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -405,21 +405,22 @@ task PostprocessGermlineCNVCalls {
model_args="$model_args --model-shard-path MODEL_$index"
done

mkdir extracted-contig-ploidy-calls
tar xzf ${contig_ploidy_calls_tar} -C extracted-contig-ploidy-calls
mkdir contig-ploidy-calls
tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls

gatk --java-options "-Xmx${command_mem_mb}m" PostprocessGermlineCNVCalls \
$calls_args \
$model_args \
${sep=" " allosomal_contigs_args} \
--autosomal-ref-copy-number ${ref_copy_number_autosomal_contigs} \
--contig-ploidy-calls extracted-contig-ploidy-calls \
--contig-ploidy-calls contig-ploidy-calls \
--sample-index ${sample_index} \
--output-genotyped-intervals ${genotyped_intervals_vcf_filename} \
--output-genotyped-segments ${genotyped_segments_vcf_filename}

rm -r CALLS_*
rm -r MODEL_*
rm -rf CALLS_*
rm -rf MODEL_*
rm -rf contig-ploidy-calls
>>>

runtime {
Expand Down
9 changes: 6 additions & 3 deletions scripts/cnv_wdl/germline/cnv_germline_case_workflow.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -372,16 +372,16 @@ task GermlineCNVCallerCaseMode {
export MKL_NUM_THREADS=${default=8 cpu}
export OMP_NUM_THREADS=${default=8 cpu}

mkdir contig-ploidy-calls-dir
tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls-dir
mkdir contig-ploidy-calls
tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls

mkdir gcnv-model
tar xzf ${gcnv_model_tar} -C gcnv-model

gatk --java-options "-Xmx${command_mem_mb}m" GermlineCNVCaller \
--run-mode CASE \
--input ${sep=" --input " read_count_files} \
--contig-ploidy-calls contig-ploidy-calls-dir \
--contig-ploidy-calls contig-ploidy-calls \
--model gcnv-model \
--output ${output_dir_} \
--output-prefix case \
Expand Down Expand Up @@ -425,6 +425,9 @@ task GermlineCNVCallerCaseMode {
tar czf case-gcnv-calls-shard-${scatter_index}-sample-$CURRENT_SAMPLE_WITH_LEADING_ZEROS.tar.gz -C ${output_dir_}/case-calls/SAMPLE_$CURRENT_SAMPLE .
let CURRENT_SAMPLE=CURRENT_SAMPLE+1
done

rm -rf contig-ploidy-calls
rm -rf gcnv-model
>>>

runtime {
Expand Down
8 changes: 5 additions & 3 deletions scripts/cnv_wdl/germline/cnv_germline_cohort_workflow.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,14 @@ task GermlineCNVCallerCohortMode {
export MKL_NUM_THREADS=${default=8 cpu}
export OMP_NUM_THREADS=${default=8 cpu}

mkdir contig-ploidy-calls-dir
tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls-dir
mkdir contig-ploidy-calls
tar xzf ${contig_ploidy_calls_tar} -C contig-ploidy-calls

gatk --java-options "-Xmx${command_mem_mb}m" GermlineCNVCaller \
--run-mode COHORT \
-L ${intervals} \
--input ${sep=" --input " read_count_files} \
--contig-ploidy-calls contig-ploidy-calls-dir \
--contig-ploidy-calls contig-ploidy-calls \
${"--annotated-intervals " + annotated_intervals} \
--interval-merging-rule OVERLAPPING_ONLY \
--output ${output_dir_} \
Expand Down Expand Up @@ -549,6 +549,8 @@ task GermlineCNVCallerCohortMode {
tar czf ${cohort_entity_id}-gcnv-calls-shard-${scatter_index}-sample-$CURRENT_SAMPLE_WITH_LEADING_ZEROS.tar.gz -C ${output_dir_}/${cohort_entity_id}-calls/SAMPLE_$CURRENT_SAMPLE .
let CURRENT_SAMPLE=CURRENT_SAMPLE+1
done

rm -rf contig-ploidy-calls
>>>

runtime {
Expand Down

0 comments on commit c66bbbd

Please sign in to comment.