diff options
author | Justin Bedo <cu@cua0.org> | 2019-08-15 14:27:06 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2019-08-15 14:27:06 +1000 |
commit | 3e037c4d706f5ac02c663a8d7f56703373785d29 (patch) | |
tree | a36051c85099dc0dfa46c60b7cedb97db5c554e6 /tools/snver-call.nix | |
parent | 2117e14fe6bcef6de715974b0e34a77429b4148a (diff) |
SNVer: init 0.5.3
Diffstat (limited to 'tools/snver-call.nix')
-rw-r--r-- | tools/snver-call.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/snver-call.nix b/tools/snver-call.nix new file mode 100644 index 0000000..645d151 --- /dev/null +++ b/tools/snver-call.nix @@ -0,0 +1,40 @@ +{ bionix +, flags ? null +, ploidy +}: + +inputs: + +with bionix; +with lib; +with types; + +let + config = pkgs.writeText "pool.txt" (concatMapStringsSep "\n" (x: "${x}\t${toString ploidy}\t1") inputs); + getref = f: matchFiletype "SNVer-call" { bam = {ref, ...}: ref; } f; + refs = map getref inputs; + ref = head refs; +in + +assert (length (unique refs) == 1); + +stage { + name = "SNVerPool"; + buildInputs = [ snver.app ]; + outputs = [ "out" "log" "raw" "filter" "indelfilter" "indelraw" ]; + buildCommand = '' + SNVerPool -i / -c ${config} -r ${ref} -o snver + + mkdir $out + cp snver.failed.log $log + ln -s $log $out/snver.failed.log + cp snver.filter.vcf $filter + ln -s $log $out/snver.filter.vcf + cp snver.indel.filter.vcf $indelfilter + ln -s $log $out/snver.indel.filter.vcf + cp snver.indel.raw.vcf $indelraw + ln -s $log $out/snver.indel.raw.vcf + cp snver.raw.vcf $raw + ln -s $log $out/snver.raw.vcf + ''; +} |