aboutsummaryrefslogtreecommitdiff
path: root/examples/ex-tnpair/tnpair.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-04-30 09:47:49 +1000
committerJustin Bedo <cu@cua0.org>2019-04-30 09:47:49 +1000
commita1d18efc18772a233aa759b622c3a9960824f109 (patch)
treec8e4028b4b634cfe7002c79539563256894e0d48 /examples/ex-tnpair/tnpair.nix
parente9b908b0cdc22a7b43301e63a23c7911aa371721 (diff)
cleanup examples and stray files
Diffstat (limited to 'examples/ex-tnpair/tnpair.nix')
-rw-r--r--examples/ex-tnpair/tnpair.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/ex-tnpair/tnpair.nix b/examples/ex-tnpair/tnpair.nix
new file mode 100644
index 0000000..2939db4
--- /dev/null
+++ b/examples/ex-tnpair/tnpair.nix
@@ -0,0 +1,26 @@
+# This is an example tumour-normal calling pipeline using strelka
+{ bionix ? import <bionix> {}
+, normal
+, tumour
+, ref
+}:
+
+with bionix;
+with lib;
+
+let
+ input = mapAttrs (_: fetchFastQGZ);
+
+ preprocess = pipe [
+ input
+ (bwa.align { ref = fetchFastA ref; })
+ (samtools.fixmate {})
+ (samtools.sort {})
+ (samtools.markdup {})
+ ];
+
+in linkDrv [
+ (ln (strelka.call {} {normal = preprocess normal; tumour = preprocess tumour;}) "strelka")
+ (ln (preprocess normal) "normal.bam")
+ (ln (preprocess tumour) "tumour.bam")
+]