aboutsummaryrefslogtreecommitdiff
path: root/tools/bowtie-index.nix
blob: 46079953a31f799998662637da28324325b5c48a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ bionix
, flags ? null
, seed ? 42
}:

ref:

with bionix;
with lib;
with types;

assert (matchFiletype "bowtie-index" { fa = _: true; } ref);

stage {
  name = "bowtie-index";
  buildInputs = with pkgs; [ bowtie2 ];
  buildCommand = ''
    mkdir $out
    bowtie2-build --seed ${toString seed} --threads $NIX_BUILD_CORES ${optionalString (flags != null) flags} ${ref} $out/ref
  '';
  passthru.multicore = true;
}