diff options
author | Justin Bedo <cu@cua0.org> | 2022-01-25 12:04:05 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2022-01-25 12:04:05 +1100 |
commit | 5fc4c8fc0ce707c57204e57a2cd058c019bc8bd8 (patch) | |
tree | 9943a6526ff28b2af832d7e30852d2840219ef96 | |
parent | 173e7a758569796a91120379853b94f35dcc4a81 (diff) |
add tabix indexing
-rw-r--r-- | tools/samtools-tabix.nix | 22 | ||||
-rw-r--r-- | tools/samtools.nix | 1 |
2 files changed, 23 insertions, 0 deletions
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; } |