aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2020-04-27 09:46:48 +1000
committerJustin Bedo <cu@cua0.org>2020-04-27 09:46:48 +1000
commitdbe76116e2fa84e22740b139a1eab8217f130856 (patch)
tree2faf21043ce646471a6fda6aad3c1ebb11439427 /tools
parent98501e58830a93b531a1a5a172d666e66e6b4a6a (diff)
octopus: parameterise max-genotypes and targets
Diffstat (limited to 'tools')
-rw-r--r--tools/octopus-call.nix12
-rw-r--r--tools/octopus-callSomatic.nix11
2 files changed, 23 insertions, 0 deletions
diff --git a/tools/octopus-call.nix b/tools/octopus-call.nix
index 57dd71f..ca0677e 100644
--- a/tools/octopus-call.nix
+++ b/tools/octopus-call.nix
@@ -1,8 +1,15 @@
{ bionix
+, fast ? false
+, very-fast ? false
+, max-genotypes ? null
+, targets ? null
, faidxAttrs ? {}
, indexAttrs ? {}
, flags ? ""}:
+assert !fast || !very-fast;
+assert max-genotypes == null || max-genotypes > 0;
+
with bionix;
with lib;
with types;
@@ -30,6 +37,11 @@ stage {
'') inputs}
octopus -R ref.fa -I *.bam -o $out \
--threads=$NIX_BUILD_CORES \
+ ${optionalString fast "--fast"} \
+ ${optionalString very-fast "--very-fast"} \
+ ${optionalString (max-genotypes != null) "--max-genotypes ${toString max-genotypes}"} \
+ ${optionalString (targets != null) (if builtins.typeOf targets == "list" then "-T ${concatStringsSep "," targets}" else "-t ${targets}")} \
+ -N $normal \
${flags}
'';
passthru.filetype = filetype.vcf {ref = ref;};
diff --git a/tools/octopus-callSomatic.nix b/tools/octopus-callSomatic.nix
index e1c7ce6..5c2ca90 100644
--- a/tools/octopus-callSomatic.nix
+++ b/tools/octopus-callSomatic.nix
@@ -1,8 +1,15 @@
{ bionix
+, fast ? false
+, very-fast ? false
+, max-genotypes ? null
+, targets ? null
, faidxAttrs ? {}
, indexAttrs ? {}
, flags ? ""}:
+assert !fast || !very-fast;
+assert max-genotypes == null || max-genotypes > 0;
+
with bionix;
with lib;
with types;
@@ -45,6 +52,10 @@ stage {
normal=$(samtools view -H ${normal} | awk -f ${smScript})
octopus -R ref.fa -I *.bam -o $out \
--threads=$NIX_BUILD_CORES \
+ ${optionalString fast "--fast"} \
+ ${optionalString very-fast "--very-fast"} \
+ ${optionalString (max-genotypes != null) "--max-genotypes ${toString max-genotypes}"} \
+ ${optionalString (targets != null) (if builtins.typeOf targets == "list" then "-T ${concatStringsSep "," targets}" else "-t ${targets}")} \
-N $normal \
${flags}
'';