diff options
Diffstat (limited to 'tools/samtools-queryRegion.nix')
-rw-r--r-- | tools/samtools-queryRegion.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/samtools-queryRegion.nix b/tools/samtools-queryRegion.nix new file mode 100644 index 0000000..650e4f4 --- /dev/null +++ b/tools/samtools-queryRegion.nix @@ -0,0 +1,22 @@ +{ bionix +, flags ? null +, regions ? [] +}: + +input: + +with bionix; +with lib; +with types; + +assert (matchFiletype "samtools-queryRegion" { fa = _: true; } input); + +stage { + + name = "samtools-faidx"; + buildInputs = with pkgs; [ samtools ]; + buildCommand = '' + ln -s ${input} input.fasta + samtools faidx ${optionalString (flags != null) flags} input.fasta ${concatStringsSep " " regions} > $out + ''; +} |