aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-03-22 10:15:10 +1100
committerJustin Bedo <cu@cua0.org>2019-03-22 10:15:10 +1100
commit9ad5160a25975c7457c002a0207820451302fc2d (patch)
tree2ff86470a15e6b0f425852133c4981344d712d78 /tools
parent72e2b9e39cfb6a78b6b94864d6acfebf7b371376 (diff)
cnvkit: add scatter plots
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;
}