aboutsummaryrefslogtreecommitdiff
path: root/examples/call.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-12-19 16:46:19 +1100
committerJustin Bedo <cu@cua0.org>2018-12-19 16:46:19 +1100
commit5e508d19fb2927574229df09b64c3fbfc2b752eb (patch)
tree6af14e192521cb3cd127d51dc1f502d3700d241d /examples/call.nix
parenta458b2813b2b0749e801098fe8aa03d8444141a6 (diff)
examples: added example tumour-normal calling pipeline script
Diffstat (limited to 'examples/call.nix')
-rw-r--r--examples/call.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/call.nix b/examples/call.nix
new file mode 100644
index 0000000..c9be673
--- /dev/null
+++ b/examples/call.nix
@@ -0,0 +1,19 @@
+# This is an example pipeline specification to do multi-sample variant calling
+# with the Platypus variant caller. Each input is preprocessed by aligning
+# against a reference genome (defaults to GRCH38), fixing mate information, and
+# marking duplicates. Finally platypus is called over all samples.
+{bionix ? import <bionix> {}
+,nixpkgs ? import <nixpkgs> {}
+,inputs
+,ref ? null}:
+
+with bionix;
+
+let
+ preprocess = f:
+ samtools.markdup {}
+ (samtools.sort {}
+ (samtools.fixmate {}
+ (bwa.align {ref = if ref == null then bionix.ref.grch38.seq else ref;} f)));
+
+ in platypus.call {} (map preprocess inputs)