blob: e7fbb58f8f6727130cff38317b09e6081f1ee572 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ bionix
, nixpkgs
, ref
, indexAttrs ? {}
, bamIndexAttrs ? {}
, flags ? null
}:
{normal, tumour}:
with nixpkgs;
with lib;
let
filename = path: last (splitString "/" path);
inputs = [ normal tumour ];
in stdenv.mkDerivation {
name = "strelka";
buildInputs = [ strelka ];
buildCommand = ''
ln -s ${ref} ref.fa
ln -s ${bionix.samtools.faidx indexAttrs ref} ref.fa.fai
${concatMapStringsSep "\n" (p: "ln -s ${p} ${filename p}.bam") inputs}
${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
./runWorkflow.py \
-m local \
-j $NIX_BUILD_CORES
cp -r results $out
'';
}
|