aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorl-d-s <distefano.l@wehi.edu.au>2018-11-13 09:10:23 +1100
committerl-d-s <distefano.l@wehi.edu.au>2018-11-13 09:10:23 +1100
commit2c92dd5c6425c67a18ab07eba7f15c07dbd4614a (patch)
tree46be9656b500e38bd4aa47066ce8296a127dd5bf /lib
parent886af7beaaa98ac32db88a7453d917409cf11ae8 (diff)
parent4574deb8e1649eaf63df424585d11645c7cfa7dd (diff)
Merge branch 'master' of https://github.com/PapenfussLab/bionix
Diffstat (limited to 'lib')
-rwxr-xr-xlib/references.nix22
-rw-r--r--lib/types.nix3
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/references.nix b/lib/references.nix
index 498cfd9..bdeefa6 100755
--- a/lib/references.nix
+++ b/lib/references.nix
@@ -46,6 +46,28 @@ rec {
'';
passthru.filetype = filetype.vcf { ref = seq; };
};
+ ensembl = {
+ cdna = stdenvNoCC.mkDerivation rec {
+ name = "ensembl-grch38-cdna-${version}";
+ version = "94";
+ src = fetchurl {
+ url = "ftp://ftp.ensembl.org/pub/release-${version}/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh38.cdna.all.fa.gz";
+ sha256 = "1fc5d6p2wlwsm49wnmxmm3byjx5jvr6z9fpzrq7v7fpb086adl0h";
+ };
+ buildCommand = "gunzip < $src > $out";
+ passthru.filetype = filetype.fa {};
+ };
+ ncrna = stdenvNoCC.mkDerivation rec {
+ name = "ensembl-grch38-ncrna-${version}";
+ version = "94";
+ src = fetchurl {
+ url = "ftp://ftp.ensembl.org/pub/release-${version}/fasta/homo_sapiens/ncrna/Homo_sapiens.GRCh38.ncrna.fa.gz";
+ sha256 = "1cpasykwriila52nqgvw6d3mjyh6d9qi613hvhn4h1dxkqzgnjff";
+ };
+ buildCommand = "gunzip < $src > $out";
+ passthru.filetype = filetype.fa {};
+ };
+ };
};
grcm38 = grcm38-p6;
diff --git a/lib/types.nix b/lib/types.nix
index 4dbc6ff..ef9b1b7 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -21,7 +21,8 @@ let
in
rec {
- matchFiletype = sym: y: x: if x ? filetype then match x.filetype (defError (idft sym) y filetype) else abort "unknown filetype for ${sym}";
+ matchFiletype = sym: y: x: if x ? filetype then matchFiletype' sym y x.filetype else abort "unknown filetype for ${sym}";
+ matchFiletype' = sym: y: x: match x (defError (idft sym) y filetype);
filetype = make-type "filetype" {
fa = {};
fq = {};