From e7cd661d1c5fb4135e3d436e151294e26aef9127 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 29 Oct 2018 15:33:53 +1100 Subject: Split gridss into constituents Wrap each individual command for GRIDSS so that bionix executed the pipeline rather than GRIDSS. This patch introduces a "call" function that executed the whole pipeline in bionix on an arbitrary BAM file. Resolves #10. --- tools/gridss-collectGridssMetrics.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tools/gridss-collectGridssMetrics.nix (limited to 'tools/gridss-collectGridssMetrics.nix') diff --git a/tools/gridss-collectGridssMetrics.nix b/tools/gridss-collectGridssMetrics.nix new file mode 100644 index 0000000..bb8d2e9 --- /dev/null +++ b/tools/gridss-collectGridssMetrics.nix @@ -0,0 +1,32 @@ +{ bionix +, nixpkgs +, thresholdCoverage ? 10000 +, flags ? 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"} \ + I=input.bam \ + O=$out \ + THRESHOLD_COVERAGE=${toString thresholdCoverage} + ''; +} -- cgit v1.2.3