diff options
author | Justin Bedo <cu@cua0.org> | 2020-11-18 07:44:19 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2020-11-18 07:44:19 +1100 |
commit | 233b915bd2bfe8abe302874f7b7467ad39048a2c (patch) | |
tree | 3903a204a0b5569a8c4478b229ece0658ada06b2 /examples | |
parent | eede5717879062ef0cebde2a5718725e7afd17ca (diff) |
rewrite cluster example to usse overlay
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ex-tnpair/cluster.nix | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/examples/ex-tnpair/cluster.nix b/examples/ex-tnpair/cluster.nix index d7537b2..8d54995 100644 --- a/examples/ex-tnpair/cluster.nix +++ b/examples/ex-tnpair/cluster.nix @@ -1,25 +1,30 @@ -{ bionix ? import <bionix> { }, tmpDir ? null }: +{ tmpDir ? null }: let - bionix' = (bionix."${if tmpDir == null then "slurm" else "qsub"}" { - ppn = 24; - mem = 7; - walltime = "3:00:00"; - } // bionix.lib.optionalAttrs (tmpDir != null) { inherit tmpDir; }).extend - (self: super: - with self; { - minimap2.align = def super.minimap2.align { - mem = 15; - walltime = "16:00:00"; - }; - samtools = super.samtools // (with super.samtools; { - markdup = def markdup { walltime = "12:00:00"; }; - fixmate = def fixmate { walltime = "10:00:00"; }; - sort = def sort { - mem = 27; - flags = "-m 1G"; - }; - }); - }); + bionix = import <bionix> { + overlays = [ + (_: super: + super."${if tmpDir == null then "slurm" else "qsub"}" { + ppn = 24; + mem = 7; + walltime = "3:00:00"; + } // super.lib.optionalAttrs (tmpDir != null) { inherit tmpDir; }) -in import ./. { bionix = bionix'; } + (self: super: + with super; { + minimap2.align = def minimap2.align { + mem = 15; + walltime = "16:00:00"; + }; + samtools = with samtools; { + markdup = def markdup { walltime = "12:00:00"; }; + fixmate = def fixmate { walltime = "10:00:00"; }; + sort = def sort { + mem = 27; + flags = "-m 1G"; + }; + }; + }) + ]; + }; +in import ./. { inherit bionix; } |