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

change memory settings

parent 09f9e67f
No related branches found
No related tags found
1 merge request!8Run time settings and additional adjustments
......@@ -35,11 +35,12 @@ task ScatterRegions {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p ${outputDirPath}
java -Xmx${select_first([memory, 2])}G -jar ${tool_jar} \
java -Xmx${mem}G -jar ${tool_jar} \
-R ${ref_fasta} \
-o ${outputDirPath} \
${"-s " + scatterSize} \
......@@ -51,7 +52,7 @@ task ScatterRegions {
}
runtime {
memory: ceil(select_first([memory, 2.0]) * select_first([memoryMultiplier, 2.0]))
memory: ceil(mem * select_first([memoryMultiplier, 2.0]))
}
}
......@@ -68,11 +69,12 @@ task SampleConfig {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p . ${"$(dirname " + jsonOutputPath + ")"} ${"$(dirname " + tsvOutputPath + ")"}
java -Xmx${select_first([memory, 4])}G -jar ${tool_jar} \
java -Xmx${mem}G -jar ${tool_jar} \
-i ${sep="-i " inputFiles} \
${"--sample " + sample} \
${"--library " + library} \
......@@ -89,7 +91,7 @@ task SampleConfig {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 2.0]))
memory: ceil(mem * select_first([memoryMultiplier, 2.0]))
}
}
......@@ -104,11 +106,12 @@ task BaseCounter {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 12.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p ${outputDir}
java -Xmx${select_first([memory, 12])}G -jar ${tool_jar} \
java -Xmx${mem}G -jar ${tool_jar} \
-b ${bam} \
-r ${refFlat} \
-o ${outputDir} \
......@@ -153,6 +156,6 @@ task BaseCounter {
}
runtime {
memory: ceil(select_first([memory, 12.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -66,11 +66,11 @@ task extractAdapters {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e
mkdir -p ${outputDir}
java -Xmx${select_first([memory, 4])}G -jar ${extractAdaptersFastqcJar} \
java -Xmx${mem}G -jar ${extractAdaptersFastqcJar} \
--inputFile ${inputFile} \
${"--adapterOutputFile " + adapterOutputFilePath } \
${"--contamsOutputFile " + contamsOutputFilePath } \
......@@ -89,7 +89,7 @@ task extractAdapters {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 2.5]))
memory: ceil(mem * select_first([memoryMultiplier, 2.5]))
}
}
......
......@@ -15,10 +15,11 @@ task BaseRecalibrator {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java -Xms${select_first([memory, 4])}G -jar ${gatk_jar} \
java -Xms${mem}G -jar ${gatk_jar} \
BaseRecalibrator \
-R ${ref_fasta} \
-I ${input_bam} \
......@@ -33,7 +34,7 @@ task BaseRecalibrator {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -53,11 +54,12 @@ task ApplyBQSR {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xms${select_first([memory, 4])}G -jar ${gatk_jar} \
-Xms${mem}G -jar ${gatk_jar} \
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
......@@ -76,7 +78,7 @@ task ApplyBQSR {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -90,10 +92,11 @@ task GatherBqsrReports {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java -Xms${select_first([memory, 4])}G -jar ${gatk_jar} \
java -Xms${mem}G -jar ${gatk_jar} \
GatherBQSRReports \
-I ${sep=' -I ' input_bqsr_reports} \
-O ${output_report_filepath}
......@@ -104,7 +107,7 @@ task GatherBqsrReports {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -125,11 +128,12 @@ task HaplotypeCallerGvcf {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${gatk_jar} \
-Xmx${mem}G -jar ${gatk_jar} \
HaplotypeCaller \
-R ${ref_fasta} \
-O ${gvcf_basename}.vcf.gz \
......@@ -145,7 +149,7 @@ task HaplotypeCallerGvcf {
}
runtime {
memory: ceil(select_first([memory, 4]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -170,12 +174,13 @@ task GenotypeGVCFs {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${gatk_jar} \
-Xmx${mem}G -jar ${gatk_jar} \
GenotypeGVCFs \
-R ${ref_fasta} \
-O ${output_basename + ".vcf.gz"} \
......@@ -193,7 +198,7 @@ task GenotypeGVCFs {
}
runtime{
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -215,13 +220,14 @@ task CombineGVCFs {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
if [ ${length(gvcf_files)} -gt 1 ]; then
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${gatk_jar} \
-Xmx${mem}G -jar ${gatk_jar} \
CombineGVCFs \
-R ${ref_fasta} \
-O ${output_basename + ".vcf.gz"} \
......@@ -239,7 +245,7 @@ task CombineGVCFs {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -257,10 +263,11 @@ task SplitNCigarReads {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java -Xms${select_first([memory, 4])}G -jar ${gatk_jar} \
java -Xms${mem}G -jar ${gatk_jar} \
-I ${input_bam} \
-R ${ref_fasta} \
-O ${output_bam} # might have to be -o depending on GATK version \
......@@ -273,6 +280,6 @@ task SplitNCigarReads {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -7,11 +7,12 @@ task ScatterIntervalList {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
mkdir scatter_list
java -Xmx${select_first([memory, 4])}G -jar ${picard_jar} \
java -Xmx${mem}G -jar ${picard_jar} \
IntervalListTools \
SCATTER_COUNT=${scatter_count} \
SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \
......@@ -27,7 +28,7 @@ task ScatterIntervalList {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -42,11 +43,12 @@ task GatherBamFiles {
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${picard_jar} \
-Xmx${mem}G -jar ${picard_jar} \
GatherBamFiles \
INPUT=${sep=' INPUT=' input_bams} \
OUTPUT=${output_bam_path} \
......@@ -61,7 +63,7 @@ task GatherBamFiles {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -85,12 +87,13 @@ task MarkDuplicates {
# Task is assuming query-sorted input so that the Secondary and Supplementary reads get marked correctly
# This works because the output of BWA is query-grouped and therefore, so is the output of MergeBamAlignment.
# While query-grouped isn't actually query-sorted, it's good enough for MarkDuplicates with ASSUME_SORT_ORDER="queryname"
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
mkdir -p $(dirname ${output_bam_path})
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${picard_jar} \
-Xmx${mem}G -jar ${picard_jar} \
MarkDuplicates \
INPUT=${sep=' INPUT=' input_bams} \
OUTPUT=${output_bam_path} \
......@@ -110,7 +113,7 @@ task MarkDuplicates {
}
runtime {
memory: ceil(select_first([memory, 8.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
......@@ -128,11 +131,12 @@ task MergeVCFs {
# Using MergeVcfs instead of GatherVcfs so we can create indices
# See https://github.com/broadinstitute/picard/issues/789 for relevant GatherVcfs ticket
Int mem = ceil(select_first([memory, 4.0]))
command {
set -e -o pipefail
${preCommand}
java ${"-Dsamjdk.compression_level=" + compression_level} \
-Xmx${select_first([memory, 4])}G -jar ${picard_jar} \
-Xmx${mem}G -jar ${picard_jar} \
MergeVcfs \
INPUT=${sep=' INPUT=' input_vcfs} \
OUTPUT=${output_vcf_path}
......@@ -144,6 +148,6 @@ task MergeVCFs {
}
runtime {
memory: ceil(select_first([memory, 4.0]) * select_first([memoryMultiplier, 1.5]))
memory: ceil(mem * select_first([memoryMultiplier, 1.5]))
}
}
\ 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