From 7611c8798f41427c5b48a3406d8bb9e0cde9786c Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Sat, 27 Jun 2020 14:35:30 +1000 Subject: octopus: write evidence bams to multioutput --- tools/octopus-call.nix | 3 +++ tools/octopus-callSomatic.nix | 3 +++ 2 files changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/octopus-call.nix b/tools/octopus-call.nix index 1688d88..f33d87c 100644 --- a/tools/octopus-call.nix +++ b/tools/octopus-call.nix @@ -28,6 +28,7 @@ assert (length (unique refs) == 1); stage { name = "octopus-call"; buildInputs = with pkgs; [ octopus-caller ]; + outputs = [ "out" "evidence" ]; buildCommand = '' ln -s ${ref} ref.fa ln -s ${samtools.faidx faidxAttrs ref} ref.fai @@ -35,7 +36,9 @@ stage { ln -s ${i} $(basename ${i}).bam ln -s ${samtools.index indexAttrs i} $(basename ${i}).bai '') inputs} + ${optionalString (length inputs > 1) "mkdir $evidence"} octopus -R ref.fa -I *.bam -o $out \ + --bamout $evidence \ --threads=$NIX_BUILD_CORES \ ${optionalString fast "--fast"} \ ${optionalString very-fast "--very-fast"} \ diff --git a/tools/octopus-callSomatic.nix b/tools/octopus-callSomatic.nix index 5c2ca90..d3e7f96 100644 --- a/tools/octopus-callSomatic.nix +++ b/tools/octopus-callSomatic.nix @@ -42,6 +42,7 @@ assert (length (unique refs) == 1); stage { name = "octopus-callSomatic"; buildInputs = with pkgs; [ octopus-caller samtools ]; + outputs = [ "out" "evidence" ]; buildCommand = '' ln -s ${ref} ref.fa ln -s ${samtools.faidx faidxAttrs ref} ref.fai @@ -50,7 +51,9 @@ stage { ln -s ${samtools.index indexAttrs i} $(basename ${i}).bai '') inputs} normal=$(samtools view -H ${normal} | awk -f ${smScript}) + mkdir $evidence octopus -R ref.fa -I *.bam -o $out \ + --bamout $evidence \ --threads=$NIX_BUILD_CORES \ ${optionalString fast "--fast"} \ ${optionalString very-fast "--very-fast"} \ -- cgit v1.2.3