aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/cnvkit-scatter.nix17
-rw-r--r--tools/cnvkit.nix5
2 files changed, 22 insertions, 0 deletions
diff --git a/tools/cnvkit-scatter.nix b/tools/cnvkit-scatter.nix
new file mode 100644
index 0000000..f9dc7f6
--- /dev/null
+++ b/tools/cnvkit-scatter.nix
@@ -0,0 +1,17 @@
+{bionix
+,flags ? null}:
+
+input:
+
+with bionix;
+with lib;
+with types;
+
+stage {
+ name = "cnvkit-scatter";
+ buildInputs = [ cnvkit.app ];
+ buildCommand = ''
+ cnvkit.py scatter -s ${input}/*.cn{s,r} -o plot.pdf
+ cp plot.pdf $out
+ '';
+}
diff --git a/tools/cnvkit.nix b/tools/cnvkit.nix
index 2259bec..73f4329 100644
--- a/tools/cnvkit.nix
+++ b/tools/cnvkit.nix
@@ -9,4 +9,9 @@ with bionix;
Type: callCNV :: {targets :: target file, annotations :: annotation file, ...} -> {normals :: [bam], tumours :: [bam]} -> CNVs
*/
callCNV = callBionixE ./cnvkit-batch.nix;
+
+ /* Scatter plot from CNV calls
+ Type: scatterPlot :: {} -> CNVs -> PDF
+ */
+ scatterPlot = callBionixE ./cnvkit-scatter.nix;
}