aboutsummaryrefslogtreecommitdiff
path: root/tools/strelka-callSomatic.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-01-16 11:14:00 +1100
committerJustin Bedo <cu@cua0.org>2019-01-16 15:29:14 +1100
commitd9223958d2d83a936719694db63c4777a8dde274 (patch)
tree5cd44c1f1b61f607cf2aa8948f0ed7f0d978e2b1 /tools/strelka-callSomatic.nix
parent2bf74101a862d0417ccda2bafe55e0d2616d1e1a (diff)
strelka: split out vcfs
Diffstat (limited to 'tools/strelka-callSomatic.nix')
-rw-r--r--tools/strelka-callSomatic.nix34
1 files changed, 24 insertions, 10 deletions
diff --git a/tools/strelka-callSomatic.nix b/tools/strelka-callSomatic.nix
index 8505302..888e589 100644
--- a/tools/strelka-callSomatic.nix
+++ b/tools/strelka-callSomatic.nix
@@ -12,18 +12,20 @@ with types;
let
filename = path: last (splitString "/" path);
- getref = f: matchFiletype "strelka-call" { bam = x: x.ref; } f;
+ getref = f: matchFiletype "strelka-callSomatic" { bam = x: x.ref; } f;
inputs = [ normal tumour ];
refs = map getref inputs;
ref = head refs;
+ drv = bionix.strelka.callSomatic {inherit indexAttrs bamIndexAttrs flags;} {inherit normal tumour;};
+
in
assert (length (unique refs) == 1);
stage {
- name = "strelka";
- buildInputs = with pkgs; [ strelka ];
+ name = "strelka-callSomatic";
+ buildInputs = with pkgs; [ strelka gzip ];
buildCommand = ''
ln -s ${ref} ref.fa
ln -s ${bionix.samtools.faidx indexAttrs ref} ref.fa.fai
@@ -31,15 +33,27 @@ stage {
${concatMapStringsSep "\n" (p: "ln -s ${bionix.samtools.index bamIndexAttrs p} ${filename p}.bai") inputs}
configureStrelkaSomaticWorkflow.py \
- --normalBam ${filename normal}.bam \
- --tumourBam ${filename tumour}.bam \
- --ref ref.fa \
- --runDir $TMPDIR
+ --normalBam ${filename normal}.bam \
+ --tumourBam ${filename tumour}.bam \
+ --ref ref.fa \
+ --runDir $TMPDIR
./runWorkflow.py \
- -m local \
- -j $NIX_BUILD_CORES
+ -m local \
+ -j $NIX_BUILD_CORES
cp -r results $out
- '';
+ '';
+ passthru = {
+ indels = stage {
+ name = "strelka-callVariants-indels";
+ buildCommand = "ln -s ${drv}/variants/somatic.indels.vcf.gz $out";
+ passthru.filetype = filetype.gz (filetype.vcf {ref = ref;});
+ };
+ snvs = stage {
+ name = "strelka-callVariants-snvs";
+ buildCommand = "ln -s ${drv}/variants/somatic.snvs.vcf.gz $out";
+ passthru.filetype = filetype.gz (filetype.vcf {ref = ref;});
+ };
+ };
}