aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}
'';