From d05214694d6784fe39e34ebfbc45202c71917d44 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 3 Oct 2018 12:57:12 +1000 Subject: refactor reference location to lib --- default.nix | 2 +- lib/references.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ references.nix | 53 ----------------------------------------------------- 3 files changed, 54 insertions(+), 54 deletions(-) create mode 100755 lib/references.nix delete mode 100755 references.nix diff --git a/default.nix b/default.nix index 7ba7a1e..10d2249 100644 --- a/default.nix +++ b/default.nix @@ -10,10 +10,10 @@ let gridss = callBionix ./tools/gridss.nix; mosdepth = callBionix ./tools/mosdepth.nix; platypus = callBionix ./tools/platypus.nix; - ref = callBionix ./references.nix; samtools = callBionix ./tools/samtools.nix; strelka = callBionix ./tools/strelka.nix; qsub = nixpkgs.callPackage ./lib/qsub.nix {}; + ref = callBionix ./lib/references.nix; }); in bionix diff --git a/lib/references.nix b/lib/references.nix new file mode 100755 index 0000000..72c1243 --- /dev/null +++ b/lib/references.nix @@ -0,0 +1,53 @@ +{ bionix, nixpkgs }: + +with nixpkgs; + +rec { + grch38 = grch38-p12; + grch38-p12 = { + seq = stdenvNoCC.mkDerivation rec { + name = "seq-grch38.${version}"; + version = "p12"; + src = fetchurl { + url = "ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_28/GRCh38.p12.genome.fa.gz"; + sha256 = "0ji2ggpmgnbpwbhq8mirj6h3lyy02nl2rnz7n892iq5cqpsblh4z"; + }; + buildCommand = "gunzip < $src > $out"; + }; + blacklist = stdenvNoCC.mkDerivation { + name = "blacklist-grch38"; + src = fetchurl { + url = "http://mitra.stanford.edu/kundaje/akundaje/release/blacklists/hg38-human/hg38.blacklist.bed.gz"; + sha256 = "1lpnqq1mjidbdxj5i6x26rxa8x1rs8q3hlf0z1z49j3jsnkgffky"; + }; + buildCommand = "gunzip < $src > $out"; + }; + }; + + grcm38 = grcm38-p6; + grcm38-p6 = { + seq = stdenvNoCC.mkDerivation rec { + name = "seq-grch38.${version}"; + version = "p6"; + src = fetchurl { + url = "ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M19/GRCm38.${version}.genome.fa.gz"; + sha256 = "0ryiqab5bldpzawylsk2qpjxr2j701q03ww9jqyxhkimqpn9g3mr"; + }; + buildCommand = "gunzip < $src > $out"; + }; + }; + }; + + mm10 = mm10-p4; + mm10-p4 = { + seq = stdenvNoCC.mkDerivation rec { + name = "seq-mm10.${version}"; + version = "p4"; + src = fetchurl { + url = "ftp://hgdownload.soe.ucsc.edu/goldenPath/mm10/mm10Patch4/mm10Patch4.fa.gz"; + sha256 = "1660d6d05f3aa266c6053cfd1efef1747d9e854836917241d6f47cff7a55340c"; + }; + buildCommand = "gunzip < $src > $out"; + }; + }; +} diff --git a/references.nix b/references.nix deleted file mode 100755 index 72c1243..0000000 --- a/references.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ bionix, nixpkgs }: - -with nixpkgs; - -rec { - grch38 = grch38-p12; - grch38-p12 = { - seq = stdenvNoCC.mkDerivation rec { - name = "seq-grch38.${version}"; - version = "p12"; - src = fetchurl { - url = "ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_28/GRCh38.p12.genome.fa.gz"; - sha256 = "0ji2ggpmgnbpwbhq8mirj6h3lyy02nl2rnz7n892iq5cqpsblh4z"; - }; - buildCommand = "gunzip < $src > $out"; - }; - blacklist = stdenvNoCC.mkDerivation { - name = "blacklist-grch38"; - src = fetchurl { - url = "http://mitra.stanford.edu/kundaje/akundaje/release/blacklists/hg38-human/hg38.blacklist.bed.gz"; - sha256 = "1lpnqq1mjidbdxj5i6x26rxa8x1rs8q3hlf0z1z49j3jsnkgffky"; - }; - buildCommand = "gunzip < $src > $out"; - }; - }; - - grcm38 = grcm38-p6; - grcm38-p6 = { - seq = stdenvNoCC.mkDerivation rec { - name = "seq-grch38.${version}"; - version = "p6"; - src = fetchurl { - url = "ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M19/GRCm38.${version}.genome.fa.gz"; - sha256 = "0ryiqab5bldpzawylsk2qpjxr2j701q03ww9jqyxhkimqpn9g3mr"; - }; - buildCommand = "gunzip < $src > $out"; - }; - }; - }; - - mm10 = mm10-p4; - mm10-p4 = { - seq = stdenvNoCC.mkDerivation rec { - name = "seq-mm10.${version}"; - version = "p4"; - src = fetchurl { - url = "ftp://hgdownload.soe.ucsc.edu/goldenPath/mm10/mm10Patch4/mm10Patch4.fa.gz"; - sha256 = "1660d6d05f3aa266c6053cfd1efef1747d9e854836917241d6f47cff7a55340c"; - }; - buildCommand = "gunzip < $src > $out"; - }; - }; -} -- cgit v1.2.3