diff options
author | Justin Bedo <cu@cua0.org> | 2018-09-26 10:53:53 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-09-26 10:53:53 +1000 |
commit | 98672cb1bba7221c5c8ecc363243cb47fcd13f47 (patch) | |
tree | c5c73fc08323a8350a0ba80aae7a7232fed19171 /test-tnpair.nix | |
parent | 45af0256cf75fa28e75b6cf6874df0c48aac38cf (diff) |
refactor, add mosdepth, and fixes for bwa
Diffstat (limited to 'test-tnpair.nix')
-rw-r--r-- | test-tnpair.nix | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test-tnpair.nix b/test-tnpair.nix index b3a41cb..31570ee 100644 --- a/test-tnpair.nix +++ b/test-tnpair.nix @@ -1,23 +1,21 @@ -{pkgs ? import <nixpkgs> {}}: - -with pkgs; +with (import <nixpkgs> {}); +with (import <bionix> {}); with lib; let ref = ./example/ref.fa; - alignWithRG = rg: callPackage ./tools/bwa.nix { inherit ref; flags = "-R'@RG\\tID:${rg}\\tSM:${rg}'";}; - sort = callPackage ./tools/samtools-sort.nix { }; - callVariants = callPackage ./tools/strelka.nix { inherit ref; }; + alignWithRG = rg: bwa.align { inherit ref; flags = "-R'@RG\\tID:${rg}\\tSM:${rg}'";}; + sort = samtools.sort { }; + callVariants = strelka.call { inherit ref; }; tnpair = { tumour = {name = "mysample1"; files = {input1 = ./example/sample1-1.fq; input2 = ./example/sample1-2.fq;};}; - normal = {name = "mysample2"; files = {input1 = ./example/sample2-1.fq; input2 = ./example/sample2-1.fq;};};}; + normal = {name = "mysample2"; files = {input1 = ./example/sample2-1.fq; input2 = ./example/sample2-1.fq;};};}; processPair = { tumour, normal }: rec { alignments = mapAttrs (_: x: sort (alignWithRG x.name x.files)) { inherit normal tumour; }; variants = callVariants alignments; }; - #results = map processPair tnpairs; tnpairResult = processPair tnpair; testNaming = stdenv.mkDerivation { |