diff options
author | Justin Bedo <cu@cua0.org> | 2019-01-09 16:38:42 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2019-01-09 16:38:42 +1100 |
commit | c3babc9eb65dc8c56d07ce8a6ee0d8c03bbd223e (patch) | |
tree | f7d88ec21635664781c7c79fe0ea6f962ae38004 /test.nix | |
parent | 9fd618d0305d4927c8d86fc37238d1216e401967 (diff) |
large refactor
- use bionix.pkgs instead of nixpkgs
- replace stdenv.mkDerivation with stage
Diffstat (limited to 'test.nix')
-rw-r--r-- | test.nix | 35 |
1 files changed, 0 insertions, 35 deletions
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 <nixpkgs> {} -,bionix ? import <bionix> {}}: - -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)} - ''; -} |