Skip to content
Snippets Groups Projects
Commit 75742e19 authored by Cats's avatar Cats
Browse files

adjust memory

parent b0d40e66
No related branches found
No related tags found
1 merge request!8Run time settings and additional adjustments
...@@ -65,7 +65,7 @@ task SampleConfig { ...@@ -65,7 +65,7 @@ task SampleConfig {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
mkdir -p . ${"$(dirname " + jsonOutputPath + ")"} ${"$(dirname " + tsvOutputPath + ")"} mkdir -p . ${"$(dirname " + jsonOutputPath + ")"} ${"$(dirname " + tsvOutputPath + ")"}
java -Xmx${true=""+memory false="3" defined(memory)}G -jar ${tool_jar} \ java -Xmx${true=""+memory false="4" defined(memory)}G -jar ${tool_jar} \
-i ${sep="-i " inputFiles} \ -i ${sep="-i " inputFiles} \
${"--sample " + sample} \ ${"--sample " + sample} \
${"--library " + library} \ ${"--library " + library} \
...@@ -82,7 +82,7 @@ task SampleConfig { ...@@ -82,7 +82,7 @@ task SampleConfig {
} }
runtime { runtime {
memory: ceil(select_first([memory, 3.0]) * select_first([memoryMultiplier, 2.0])) memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 2.0]))
} }
} }
......
...@@ -33,7 +33,7 @@ task BaseRecalibrator { ...@@ -33,7 +33,7 @@ task BaseRecalibrator {
} }
runtime { runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 2])) memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -50,10 +50,14 @@ task ApplyBQSR { ...@@ -50,10 +50,14 @@ task ApplyBQSR {
File ref_fasta_index File ref_fasta_index
Int? compression_level Int? compression_level
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} -Xms4G -jar ${gatk_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xms${true=memory false="4" defined(memory)}G -jar ${gatk_jar} \
ApplyBQSR \ ApplyBQSR \
--create-output-bam-md5 \ --create-output-bam-md5 \
--add-output-sam-program-record \ --add-output-sam-program-record \
...@@ -72,7 +76,7 @@ task ApplyBQSR { ...@@ -72,7 +76,7 @@ task ApplyBQSR {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -83,10 +87,13 @@ task GatherBqsrReports { ...@@ -83,10 +87,13 @@ task GatherBqsrReports {
Array[File] input_bqsr_reports Array[File] input_bqsr_reports
String output_report_filepath String output_report_filepath
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java -Xms3G -jar ${gatk_jar} \ java -Xms${true=memory false="3" defined(memory)}G -jar ${gatk_jar} \
GatherBQSRReports \ GatherBQSRReports \
-I ${sep=' -I ' input_bqsr_reports} \ -I ${sep=' -I ' input_bqsr_reports} \
-O ${output_report_filepath} -O ${output_report_filepath}
...@@ -97,7 +104,7 @@ task GatherBqsrReports { ...@@ -97,7 +104,7 @@ task GatherBqsrReports {
} }
runtime { runtime {
memory: 4 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -115,10 +122,14 @@ task HaplotypeCallerGvcf { ...@@ -115,10 +122,14 @@ task HaplotypeCallerGvcf {
Int? compression_level Int? compression_level
String gatk_jar String gatk_jar
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${gatk_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${gatk_jar} \
HaplotypeCaller \ HaplotypeCaller \
-R ${ref_fasta} \ -R ${ref_fasta} \
-O ${gvcf_basename}.vcf.gz \ -O ${gvcf_basename}.vcf.gz \
...@@ -134,7 +145,7 @@ task HaplotypeCallerGvcf { ...@@ -134,7 +145,7 @@ task HaplotypeCallerGvcf {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -156,12 +167,15 @@ task GenotypeGVCFs { ...@@ -156,12 +167,15 @@ task GenotypeGVCFs {
File dbsnp_vcf_index File dbsnp_vcf_index
Int? compression_level Int? compression_level
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${gatk_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${gatk_jar} \
GenotypeGVCFs \ GenotypeGVCFs \
-R ${ref_fasta} \ -R ${ref_fasta} \
-O ${output_basename + ".vcf.gz"} \ -O ${output_basename + ".vcf.gz"} \
...@@ -179,7 +193,7 @@ task GenotypeGVCFs { ...@@ -179,7 +193,7 @@ task GenotypeGVCFs {
} }
runtime{ runtime{
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -198,13 +212,16 @@ task CombineGVCFs { ...@@ -198,13 +212,16 @@ task CombineGVCFs {
File ref_dict File ref_dict
Int? compression_level Int? compression_level
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
if [ ${length(gvcf_files)} -gt 1 ]; then if [ ${length(gvcf_files)} -gt 1 ]; then
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${gatk_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${gatk_jar} \
CombineGVCFs \ CombineGVCFs \
-R ${ref_fasta} \ -R ${ref_fasta} \
-O ${output_basename + ".vcf.gz"} \ -O ${output_basename + ".vcf.gz"} \
...@@ -222,7 +239,7 @@ task CombineGVCFs { ...@@ -222,7 +239,7 @@ task CombineGVCFs {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -237,11 +254,13 @@ task SplitNCigarReads { ...@@ -237,11 +254,13 @@ task SplitNCigarReads {
String gatk_jar String gatk_jar
Array[File]+ intervals Array[File]+ intervals
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java -Xms4G -jar ${gatk_jar} \ java -Xms${true=memory false="4" defined(memory)}G -jar ${gatk_jar} \
-I ${input_bam} \ -I ${input_bam} \
-R ${ref_fasta} \ -R ${ref_fasta} \
-O ${output_bam} # might have to be -o depending on GATK version \ -O ${output_bam} # might have to be -o depending on GATK version \
...@@ -254,6 +273,6 @@ task SplitNCigarReads { ...@@ -254,6 +273,6 @@ task SplitNCigarReads {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -7,6 +7,8 @@ task HTSeqCount { ...@@ -7,6 +7,8 @@ task HTSeqCount {
String? order String? order
String? stranded String? stranded
Int? memory
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
...@@ -24,6 +26,6 @@ task HTSeqCount { ...@@ -24,6 +26,6 @@ task HTSeqCount {
} }
runtime { runtime {
memory: 3 memory: select_first([memory, 3])
} }
} }
\ No newline at end of file
...@@ -4,11 +4,14 @@ task ScatterIntervalList { ...@@ -4,11 +4,14 @@ task ScatterIntervalList {
Int scatter_count Int scatter_count
String picard_jar String picard_jar
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
mkdir scatter_list mkdir scatter_list
java -Xmx4G -jar ${picard_jar} \ java -Xmx${true=memory false="4" defined(memory)}G -jar ${picard_jar} \
IntervalListTools \ IntervalListTools \
SCATTER_COUNT=${scatter_count} \ SCATTER_COUNT=${scatter_count} \
SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \ SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \
...@@ -24,7 +27,7 @@ task ScatterIntervalList { ...@@ -24,7 +27,7 @@ task ScatterIntervalList {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -36,10 +39,14 @@ task GatherBamFiles { ...@@ -36,10 +39,14 @@ task GatherBamFiles {
Int? compression_level Int? compression_level
String picard_jar String picard_jar
Float? memory
Float? memoryMultiplier
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${picard_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${picard_jar} \
GatherBamFiles \ GatherBamFiles \
INPUT=${sep=' INPUT=' input_bams} \ INPUT=${sep=' INPUT=' input_bams} \
OUTPUT=${output_bam_path} \ OUTPUT=${output_bam_path} \
...@@ -54,7 +61,7 @@ task GatherBamFiles { ...@@ -54,7 +61,7 @@ task GatherBamFiles {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -67,6 +74,9 @@ task MarkDuplicates { ...@@ -67,6 +74,9 @@ task MarkDuplicates {
Int? compression_level Int? compression_level
String picard_jar String picard_jar
Float? memory
Float? memoryMultiplier
# The program default for READ_NAME_REGEX is appropriate in nearly every case. # The program default for READ_NAME_REGEX is appropriate in nearly every case.
# Sometimes we wish to supply "null" in order to turn off optical duplicate detection # Sometimes we wish to supply "null" in order to turn off optical duplicate detection
# This can be desirable if you don't mind the estimated library size being wrong and optical duplicate detection is taking >7 days and failing # This can be desirable if you don't mind the estimated library size being wrong and optical duplicate detection is taking >7 days and failing
...@@ -79,7 +89,8 @@ task MarkDuplicates { ...@@ -79,7 +89,8 @@ task MarkDuplicates {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
mkdir -p $(dirname ${output_bam_path}) mkdir -p $(dirname ${output_bam_path})
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${picard_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${picard_jar} \
MarkDuplicates \ MarkDuplicates \
INPUT=${sep=' INPUT=' input_bams} \ INPUT=${sep=' INPUT=' input_bams} \
OUTPUT=${output_bam_path} \ OUTPUT=${output_bam_path} \
...@@ -99,7 +110,7 @@ task MarkDuplicates { ...@@ -99,7 +110,7 @@ task MarkDuplicates {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
...@@ -112,12 +123,16 @@ task MergeVCFs { ...@@ -112,12 +123,16 @@ task MergeVCFs {
Int? compression_level Int? compression_level
String picard_jar String picard_jar
Float? memory
Float? memoryMultiplier
# Using MergeVcfs instead of GatherVcfs so we can create indices # Using MergeVcfs instead of GatherVcfs so we can create indices
# See https://github.com/broadinstitute/picard/issues/789 for relevant GatherVcfs ticket # See https://github.com/broadinstitute/picard/issues/789 for relevant GatherVcfs ticket
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} -Xmx4G -jar ${picard_jar} \ java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${true=memory false="4" defined(memory)}G -jar ${picard_jar} \
MergeVcfs \ MergeVcfs \
INPUT=${sep=' INPUT=' input_vcfs} \ INPUT=${sep=' INPUT=' input_vcfs} \
OUTPUT=${output_vcf_path} OUTPUT=${output_vcf_path}
...@@ -129,6 +144,6 @@ task MergeVCFs { ...@@ -129,6 +144,6 @@ task MergeVCFs {
} }
runtime { runtime {
memory: 6 memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
} }
} }
\ No newline at end of file
...@@ -13,6 +13,8 @@ task Star { ...@@ -13,6 +13,8 @@ task Star {
String? twopassMode String? twopassMode
Array[String]? outSAMattrRGline Array[String]? outSAMattrRGline
Float? memory
#TODO needs to be extended for all possible output extensions #TODO needs to be extended for all possible output extensions
Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"} Map[String, String] samOutputNames = {"BAM SortedByCoordinate": "sortedByCoord.out.bam"}
...@@ -37,7 +39,7 @@ task Star { ...@@ -37,7 +39,7 @@ task Star {
} }
runtime { runtime {
threads: select_first([runThreadN]) threads: select_first([runThreadN, 1])
memory: 10 memory: select_first([memory, 10])
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment