From dbe76116e2fa84e22740b139a1eab8217f130856 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 27 Apr 2020 09:46:48 +1000 Subject: octopus: parameterise max-genotypes and targets --- tools/octopus-call.nix | 12 ++++++++++++ tools/octopus-callSomatic.nix | 11 +++++++++++ 2 files changed, 23 insertions(+) (limited to 'tools') 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} ''; -- cgit v1.2.3