From 5fc4c8fc0ce707c57204e57a2cd058c019bc8bd8 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Tue, 25 Jan 2022 12:04:05 +1100 Subject: add tabix indexing --- tools/samtools-tabix.nix | 22 ++++++++++++++++++++++ tools/samtools.nix | 1 + 2 files changed, 23 insertions(+) create mode 100644 tools/samtools-tabix.nix diff --git a/tools/samtools-tabix.nix b/tools/samtools-tabix.nix new file mode 100644 index 0000000..a493b9d --- /dev/null +++ b/tools/samtools-tabix.nix @@ -0,0 +1,22 @@ +{ bionix +, flags ? null +}: + +input: + +with bionix; +with lib; +with types; + +assert (matchFiletype "samtools-tabix" { bgz = _: true; } input); + +stage { + + name = "samtools-tabix"; + buildInputs = with pkgs; [ htslib ]; + buildCommand = '' + ln -s ${input} input.bgz + tabix input.bgz + cp input.bgz.tbi $out + ''; +} diff --git a/tools/samtools.nix b/tools/samtools.nix index 27f3f73..e0c45dd 100644 --- a/tools/samtools.nix +++ b/tools/samtools.nix @@ -12,4 +12,5 @@ with bionix; merge = callBionixE ./samtools-merge.nix; markdup = callBionixE ./samtools-markdup.nix; fixmate = callBionixE ./samtools-fixmate.nix; + tabix = callBionixE ./samtools-tabix.nix; } -- cgit v1.2.3