diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gridss-annotateVariants.nix | 5 | ||||
-rw-r--r-- | tools/gridss-assemble.nix | 4 | ||||
-rw-r--r-- | tools/gridss-callVariants.nix | 3 | ||||
-rw-r--r-- | tools/gridss-collectGridssMetrics.nix | 34 | ||||
-rw-r--r-- | tools/gridss-collectMetrics.nix | 3 | ||||
-rw-r--r-- | tools/gridss-computeSamTags.nix | 3 | ||||
-rw-r--r-- | tools/gridss-identifyVariants.nix | 4 | ||||
-rw-r--r-- | tools/gridss-softClipsToSplitReads.nix | 4 |
8 files changed, 19 insertions, 41 deletions
diff --git a/tools/gridss-annotateVariants.nix b/tools/gridss-annotateVariants.nix index 3560f77..e0a6f0f 100644 --- a/tools/gridss-annotateVariants.nix +++ b/tools/gridss-annotateVariants.nix @@ -9,6 +9,8 @@ , identifyVariantsAttrs ? {} , flags ? null , config ? null +, heapSize ? "4g" + }: with nixpkgs; @@ -55,6 +57,7 @@ stdenv.mkDerivation rec { name = "gridss-identifyVariants"; buildInputs = [ jre ]; buildCommand = '' + TMPDIR=$(pwd) ln -s ${ref} ref.fa ln -s ${bionix.samtools.faidx faidxAttrs ref} ref.fa.fai for f in ${bionix.bwa.index bwaIndexAttrs ref}/*; do @@ -65,7 +68,7 @@ stdenv.mkDerivation rec { ${concatMapStringsSep "\n" (linkInput collectMetrics collectMetricsAttrs) inputs} ${linkInput collectMetrics collectMetricsAttrs assembly} ln -s ${identifyVariants identifyVariantsAttrs inputs} input.vcf - java -Xmx4g -Dsamjdk.create_index=true \ + java -Xmx${heapSize} -Dsamjdk.create_index=true \ -cp ${jar} gridss.AnnotateVariants \ REFERENCE_SEQUENCE=ref.fa \ ${concatMapStringsSep " " (i: "INPUT='${i}'") inputs} \ diff --git a/tools/gridss-assemble.nix b/tools/gridss-assemble.nix index a8124e0..f57bc12 100644 --- a/tools/gridss-assemble.nix +++ b/tools/gridss-assemble.nix @@ -6,6 +6,7 @@ , collectMetricsAttrs ? {} , flags ? null , config ? null +, heapSize ? "31g" }: with nixpkgs; @@ -39,13 +40,14 @@ stdenv.mkDerivation rec { name = "gridss-assemble"; buildInputs = [ jre bwa ]; buildCommand = '' + TMPDIR=$(pwd) ln -s ${ref} ref.fa ln -s ${bionix.samtools.faidx faidxAttrs ref} ref.fa.fai for f in ${bionix.bwa.index bwaIndexAttrs ref}/*; do ln -s $f done ${concatMapStringsSep "\n" linkInput inputs} - java -Xmx31g -Dsamjdk.create_index=true \ + java -Xmx${heapSize} -Dsamjdk.create_index=true \ -cp ${bionix.gridss.jar} gridss.AssembleBreakends \ REFERENCE_SEQUENCE=ref.fa \ ${concatMapStringsSep " " (i: "INPUT='${i}'") inputs} \ diff --git a/tools/gridss-callVariants.nix b/tools/gridss-callVariants.nix index 48f7cb2..d55db23 100644 --- a/tools/gridss-callVariants.nix +++ b/tools/gridss-callVariants.nix @@ -5,6 +5,7 @@ , faidxAttrs ? {} , flags ? null , config ? null +, heapSize ? "31g" }: with nixpkgs; @@ -31,7 +32,7 @@ stdenv.mkDerivation rec { ln -s $f done mkdir $out - java -ea -Xmx31g \ + java -ea -Xmx${heapSize} \ -Dreference_fasta="ref.fa" \ -Dsamjdk.create_index=true \ -Dsamjdk.use_async_io_read_samtools=true \ diff --git a/tools/gridss-collectGridssMetrics.nix b/tools/gridss-collectGridssMetrics.nix deleted file mode 100644 index 91e04c7..0000000 --- a/tools/gridss-collectGridssMetrics.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ bionix -, nixpkgs -, thresholdCoverage ? 10000 -, flags ? null -, config ? null -}: - -with nixpkgs; -with lib; -with bionix.types; - -input: - -let - ref = matchFiletype "gridss-collectGridssMetrics" { bam = x: x.ref; } input; - sorted = matchFileSorting "gridss-collectGridssMetrics" { name = _: true; } input; -in - - -stdenv.mkDerivation rec { - name = "gridss-collectGridssMetrics"; - buildInputs = [ jre ]; - buildCommand = '' - mkdir $out - ln -s ${input} input.bam - java -Xmx1G -cp ${bionix.gridss.jar} \ - gridss.analysis.CollectGridssMetrics \ - ${optionalString sorted "ASSUME_SORTED=true"} \ - ${optionalString (config != null) ("OPTIONS_FILE=" + bionix.gridss.gridssConfig config)} \ - I=input.bam \ - O=$out \ - THRESHOLD_COVERAGE=${toString thresholdCoverage} - ''; -} diff --git a/tools/gridss-collectMetrics.nix b/tools/gridss-collectMetrics.nix index b68aeb1..17e3c46 100644 --- a/tools/gridss-collectMetrics.nix +++ b/tools/gridss-collectMetrics.nix @@ -3,6 +3,7 @@ , thresholdCoverage ? 10000 , flags ? null , config ? null +, heapSize ? "1G" }: with nixpkgs; @@ -21,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ jre R ]; buildCommand = '' mkdir $out - java -Xmx1G -cp ${bionix.gridss.jar} \ + java -Xmx${heapSize} -cp ${bionix.gridss.jar} \ gridss.analysis.CollectGridssMetrics \ ${optionalString (config != null) ("OPTIONS_FILE=" + bionix.gridss.gridssConfig config)} \ I=${input}\ diff --git a/tools/gridss-computeSamTags.nix b/tools/gridss-computeSamTags.nix index 9267809..c462461 100644 --- a/tools/gridss-computeSamTags.nix +++ b/tools/gridss-computeSamTags.nix @@ -5,6 +5,7 @@ , faidxAttrs ? {} , flags ? null , config ? null +, heapSize ? "1G" }: with nixpkgs; @@ -29,7 +30,7 @@ stdenv.mkDerivation rec { for f in ${bionix.bwa.index bwaIndexAttrs ref}/*; do ln -s $f done - java -Xmx1G \ + java -Xmx${heapSize} \ -Dsamjdk.create_index=false \ -cp ${bionix.gridss.jar} gridss.ComputeSamTags \ REFERENCE_SEQUENCE=ref.fa \ diff --git a/tools/gridss-identifyVariants.nix b/tools/gridss-identifyVariants.nix index 23a9d85..f484ed0 100644 --- a/tools/gridss-identifyVariants.nix +++ b/tools/gridss-identifyVariants.nix @@ -8,6 +8,8 @@ , softClipsToSplitReadsAttrs ? {} , flags ? null , config ? null +, heapSize ? "4g" + }: with nixpkgs; @@ -63,7 +65,7 @@ stdenv.mkDerivation rec { ${linkSV assembly} ${concatMapStringsSep "\n" (linkInput collectMetrics collectMetricsAttrs) inputs} ${linkInput collectMetrics collectMetricsAttrs assembly} - java -Xmx4g -Dsamjdk.create_index=true \ + java -Xmx${heapSize} -Dsamjdk.create_index=true \ -cp ${jar} gridss.IdentifyVariants \ REFERENCE_SEQUENCE=ref.fa \ ${concatMapStringsSep " " (i: "INPUT='${i}'") inputs} \ diff --git a/tools/gridss-softClipsToSplitReads.nix b/tools/gridss-softClipsToSplitReads.nix index c23168f..c5d8062 100644 --- a/tools/gridss-softClipsToSplitReads.nix +++ b/tools/gridss-softClipsToSplitReads.nix @@ -5,6 +5,8 @@ , alignerStreaming ? false , flags ? null , config ? null +, heapSize ? "2G" + }: with nixpkgs; @@ -26,7 +28,7 @@ stdenv.mkDerivation rec { for f in ${bionix.bwa.index bwaIndexAttrs ref}/*; do ln -s $f done - java -Xmx2G -Dsamjdk.create_index=false \ + java -Xmx${heapSize} -Dsamjdk.create_index=false \ -cp ${bionix.gridss.jar} gridss.SoftClipsToSplitReads \ REFERENCE_SEQUENCE=ref.fa \ I=${input} \ |