aboutsummaryrefslogtreecommitdiff
path: root/tools/snver-call.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tools/snver-call.nix')
-rw-r--r--tools/snver-call.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/snver-call.nix b/tools/snver-call.nix
index 5d80719..72562c7 100644
--- a/tools/snver-call.nix
+++ b/tools/snver-call.nix
@@ -10,9 +10,9 @@ with lib;
with types;
let
- config = pkgs.writeText "pool.txt" (concatMapStringsSep "\n" (x: "${x}\t${toString ploidy}\t1") inputs);
+ config = pkgs.writeText "pool.txt" (concatMapStringsSep "\n" (x: "${x}\t${toString ploidy}\t1") (attrValues inputs));
getref = f: matchFiletype "SNVer-call" { bam = {ref, ...}: ref; } f;
- refs = map getref inputs;
+ refs = mapAttrsToList (_: getref) inputs;
ref = head refs;
in
@@ -25,6 +25,10 @@ stage {
buildCommand = ''
SNVerPool -i / -c ${config} -r ${ref} -o snver
+ for f in *.vcf ; do
+ ${concatStringsSep "\n" (mapAttrsToList (x: y: "sed -i 's|//${y}|${x}|' $f") inputs)}
+ done
+
mkdir $out
cp snver.failed.log $log
ln -s $log $out/snver.failed.log