aboutsummaryrefslogtreecommitdiff
path: root/tools/bowtie-index.nix
blob: 4554ad1df324f011c40a4345077131f45f5af87f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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
  '';
}