From c3babc9eb65dc8c56d07ce8a6ee0d8c03bbd223e Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 9 Jan 2019 16:38:42 +1100 Subject: large refactor - use bionix.pkgs instead of nixpkgs - replace stdenv.mkDerivation with stage --- test.nix | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 test.nix (limited to 'test.nix') diff --git a/test.nix b/test.nix deleted file mode 100644 index 9851310..0000000 --- a/test.nix +++ /dev/null @@ -1,35 +0,0 @@ -{pkgs ? import {} -,bionix ? import {}}: - -with pkgs; -with lib; -with bionix; - -let - inherit (types) filetype tagFiletype; - - fetchLocal = path: stdenv.mkDerivation { - name = baseNameOf path; - buildCommand = "ln -s ${path} $out"; - }; - tagfq = path: tagFiletype (filetype.fq {}) (fetchLocal path); - tagfa = path: tagFiletype (filetype.fa {}) (fetchLocal path); - - ref = tagfa ./example/ref.fa; - alignWithRG = rg: bwa.align { inherit ref; flags = "-R'@RG\\tID:${rg}\\tSM:${rg}'";}; - - samples = [ {name = "mysample1"; files = {input1 = tagfq ./example/sample1-1.fq; input2 = tagfq ./example/sample1-2.fq;};} - {name = "mysample2"; files = {input1 = tagfq ./example/sample2-1.fq; input2 = tagfq ./example/sample2-1.fq;};} ]; - - alignments = map (i: samtools.sort {} (alignWithRG i.name i.files)) samples; - variants = platypus.call {} alignments; - -in stdenv.mkDerivation { - name = "myproject"; - buildCommand = '' - mkdir $out - ln -s ${variants} $out/platypus.vcf - mkdir $out/alignments - ${concatStringsSep "\n" (zipListsWith (s: a: "ln -s ${a} $out/alignments/${s.name}.bam") samples alignments)} - ''; -} -- cgit v1.2.3