aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-10-29 15:32:38 +1100
committerJustin Bedo <cu@cua0.org>2018-10-29 15:32:38 +1100
commit7f11fb044b6e08c53f53a1a0d0d6519fba1ccce3 (patch)
treef946a26f67f1503ee330908bbcb776537a3aeb33 /tools
parent3ad53248deca12bda8351f187f322fd9bf6351a1 (diff)
init: samtools-markdup
Diffstat (limited to 'tools')
-rw-r--r--tools/samtools-markdup.nix22
-rw-r--r--tools/samtools.nix1
2 files changed, 23 insertions, 0 deletions
diff --git a/tools/samtools-markdup.nix b/tools/samtools-markdup.nix
new file mode 100644
index 0000000..73094f2
--- /dev/null
+++ b/tools/samtools-markdup.nix
@@ -0,0 +1,22 @@
+{ bionix
+, nixpkgs
+, flags ? null
+}:
+
+input:
+
+with nixpkgs;
+with lib;
+with bionix.types;
+
+assert (matchFiletype "samtools-markdup" { bam = _: true; } input);
+assert (matchFileSorting "samtools-markdup" { coord = _: true; } input);
+
+stdenv.mkDerivation {
+ name = "samtools-markdup";
+ buildInputs = [ samtools ];
+ buildCommand = ''
+ samtools markdup ${optionalString (flags != null) flags} ${input} $out
+ '';
+ passthru.filetype = input.filetype;
+}
diff --git a/tools/samtools.nix b/tools/samtools.nix
index e26d996..62414df 100644
--- a/tools/samtools.nix
+++ b/tools/samtools.nix
@@ -10,5 +10,6 @@ with bionix;
dict = callBionix ./samtools-dict.nix;
sort = callBionix ./samtools-sort.nix;
merge = callBionix ./samtools-merge.nix;
+ markdup = callBionix ./samtools-markdup.nix;
fixmate = callBionix ./samtools-fixmate.nix;
}