aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorl-d-s <distefano.l@wehi.edu.au>2019-05-30 13:14:19 +1000
committerl-d-s <distefano.l@wehi.edu.au>2019-05-30 13:14:19 +1000
commitae7f055db36fda71d28e58fd22ee6ffc25e01dee (patch)
tree03e98f7c3208f642fb325cb04503e065d623df70
parent867e68554307d45e102ba3267f5f469d02fc6a86 (diff)
parent1d83daa0794463ecfea4ea56fe6ef917fffcd7b0 (diff)
Merge branch 'add-picard' of mac2559:~/Projects/bionix
-rw-r--r--default.nix1
-rw-r--r--tools/picard-markDuplicates.nix26
-rw-r--r--tools/picard.nix7
3 files changed, 34 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 15b8d87..43a2332 100644
--- a/default.nix
+++ b/default.nix
@@ -27,6 +27,7 @@ let
mosdepth = callBionix ./tools/mosdepth.nix {};
mutect = callBionix ./tools/mutect.nix {};
minimap2 = callBionix ./tools/minimap2.nix {};
+ picard = callBionix ./tools/picard.nix {};
platypus = callBionix ./tools/platypus.nix {};
ref = callBionix ./lib/references.nix {};
samtools = callBionix ./tools/samtools.nix {};
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