aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-03-06 11:43:19 +1100
committerJustin Bedo <cu@cua0.org>2019-03-06 11:43:19 +1100
commita86ef4eda927c47791dc0c25852c13ea622f809b (patch)
treee4604cde726ee8d078bb4f62f331ac0f1c256360 /tools
parente81641608ffd0b08b8da0d1bf0546bc92d3b4088 (diff)
draft API docs for BWA and strelka
Diffstat (limited to 'tools')
-rw-r--r--tools/bwa.nix13
-rw-r--r--tools/strelka.nix27
2 files changed, 35 insertions, 5 deletions
diff --git a/tools/bwa.nix b/tools/bwa.nix
index d0ab5ee..03735d1 100644
--- a/tools/bwa.nix
+++ b/tools/bwa.nix
@@ -2,7 +2,16 @@
with bionix;
-{
- align = callBionixE ./bwa-mem.nix;
+rec {
+ /* Align read against a reference: defaults to bwa-mem */
+ align = bwa-mem;
+
+ /* Align reads against a reference using bwa-mem
+ Type: bwa-mem :: {ref = fasta, bamOutput = bool, ...} -> {input1, input2} -> bam/sam
+ */
+ bwa-mem = callBionixE ./bwa-mem.nix;
+ /* Creates an reference index for BWA
+ Type: {...} -> fasta -> BWA index
+ */
index = callBionixE ./bwa-index.nix;
}
diff --git a/tools/strelka.nix b/tools/strelka.nix
index 9a8f1aa..1cf8961 100644
--- a/tools/strelka.nix
+++ b/tools/strelka.nix
@@ -4,21 +4,42 @@ with bionix;
with types;
{
+ /* Calls somatic variants
+ Type: callSomatic :: {...} -> {tumour, normal} -> somatic results
+ */
callSomatic = callBionixE ./strelka-callSomatic.nix;
+ /* Calls variants
+ Type: call :: {...} -> [input] -> results
+ */
call = callBionixE ./strelka-call.nix;
- variants = drv: stage {
+ /* Extract VCF file from results
+ Type: variants :: results -> vcf
+ */
+ variants =
+ # result of call
+ drv: stage {
name = "strelka-call-variants";
buildCommand = ''
ln -s ${drv}/variants/variants.vcf.gz $out
'';
passthru.filetype = filetype.gz (filetype.vcf {ref=ref;});
};
- indels = drv: stage {
+ /* Extract indels from somatic results
+ Type: indels :: somatic results -> vcf
+ */
+ indels =
+ # result of callSomatic
+ drv: stage {
name = "strelka-callVariants-indels";
buildCommand = "ln -s ${drv}/variants/somatic.indels.vcf.gz $out";
passthru.filetype = filetype.gz (filetype.vcf {ref = ref;});
};
- snvs = drv: stage {
+ /* Extract SNVs from somatic results
+ Type: snvs :: somatic results -> vcf
+ */
+ snvs =
+ # result of callSomatic
+ drv: stage {
name = "strelka-callVariants-snvs";
buildCommand = "ln -s ${drv}/variants/somatic.snvs.vcf.gz $out";
passthru.filetype = filetype.gz (filetype.vcf {ref = ref;});