aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/picard-markDuplicates.nix26
-rw-r--r--tools/picard.nix7
2 files changed, 33 insertions, 0 deletions
diff --git a/tools/picard-markDuplicates.nix b/tools/picard-markDuplicates.nix
new file mode 100644
index 0000000..aff1e32
--- /dev/null
+++ b/tools/picard-markDuplicates.nix
@@ -0,0 +1,26 @@
+{ bionix
+, flags ? null
+} :
+
+inputBam :
+
+with bionix;
+with lib;
+with types;
+
+assert (matchFiletype "picard-markDuplicates" { bam = _: true; } input);
+assert (matchFileSorting "picard-markDuplicates" { coord = _: true; } input);
+
+stage {
+ name = "picard-markDuplicates";
+ buildInputs = with pkgs;
+ [ picard-tools ];
+ outputs = [ "out" "metrics" ];
+ buildCommand = ''
+ picard MarkDuplicates \
+ I=${inputBam} \
+ O=$out \
+ M=$metrics \
+ ${optionalString (flags != null) flags}
+ '';
+} \ No newline at end of file
diff --git a/tools/picard.nix b/tools/picard.nix
new file mode 100644
index 0000000..551995f
--- /dev/null
+++ b/tools/picard.nix
@@ -0,0 +1,7 @@
+{ bionix }:
+
+with bionix;
+
+{
+ markDuplicates = callBionixE ./picard-markDuplicates.nix;
+} \ No newline at end of file