diff options
author | Justin Bedo <cu@cua0.org> | 2018-10-29 15:33:53 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-10-29 15:36:33 +1100 |
commit | e7cd661d1c5fb4135e3d436e151294e26aef9127 (patch) | |
tree | 71ef7647d15d57bc2db2cf8ec532da794fddb2fa /tools/gridss-collectGridssMetrics.nix | |
parent | 8fb986fd88705fc01be7145b04fa229092c1e69e (diff) |
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.
Diffstat (limited to 'tools/gridss-collectGridssMetrics.nix')
-rw-r--r-- | tools/gridss-collectGridssMetrics.nix | 32 |
1 files changed, 32 insertions, 0 deletions
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} + ''; +} |