diff options
| -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-softClipsToSplitReads.nix | 4 | ||||
| -rw-r--r-- | tools/gridss-variants.nix | 5 | 
7 files changed, 15 insertions, 41 deletions
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-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} \ diff --git a/tools/gridss-variants.nix b/tools/gridss-variants.nix index a838da6..eb5957f 100644 --- a/tools/gridss-variants.nix +++ b/tools/gridss-variants.nix @@ -8,6 +8,7 @@  , softClipsToSplitReadsAttrs ? { flags = "REALIGN_ENTIRE_READ=true"; }  , flags ? null  , config ? null +, heapSize ? "4g"  }:  with nixpkgs; @@ -68,7 +69,7 @@ rec {      name = "gridss-identifyVariants";      buildInputs = [ jre samtools ];      buildCommand = mkLinks + '' -      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} \ @@ -91,7 +92,7 @@ rec {      buildInputs = [ jre ];      buildCommand = mkLinks + ''        ln -s ${identify} 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} \  | 
