From 98672cb1bba7221c5c8ecc363243cb47fcd13f47 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 26 Sep 2018 10:53:53 +1000 Subject: refactor, add mosdepth, and fixes for bwa --- test-tnpair.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test-tnpair.nix') 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 {}}: - -with pkgs; +with (import {}); +with (import {}); 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 { -- cgit v1.2.3