diff options
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | default.nix | 1 | ||||
-rw-r--r-- | examples/call.nix | 8 | ||||
-rw-r--r-- | test-tnpair.nix | 3 | ||||
-rw-r--r-- | tools/platypus-callVariants.nix | 46 | ||||
-rw-r--r-- | tools/platypus.nix | 10 |
6 files changed, 10 insertions, 68 deletions
@@ -28,7 +28,7 @@ directory and viewing `result/OEBPS/index.html`. Several examples are available in `./examples/`. The main example is presented in `./examples/default.nix` and can be built using `nix build` in `./examples/`. This sample pipeline performs variant calling using -[`platypus`](https://github.com/andyrimmer/Platypus), alignment using +[`octopus`](https://github.com/luntergroup/octopus), alignment using [`bwa mem`](https://github.com/lh3/bwa), and preprocessing using [`samtools`](http://www.htslib.org/). @@ -37,10 +37,10 @@ this pipeline and the other examples. - The pipeline itself is specified in `examples/call.nix` and `examples/default.nix`. -- The BioNix wrapper to run `platypus` is in - `tools/platypus-callVariants.nix`. -- The Nix expression for the `platypus` software itself can be found in - [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/biology/platypus/default.nix). +- The BioNix wrapper to run `octopus` is in + `tools/octopus-call.nix`. +- The Nix expression for the `octopus` software itself can be found in + [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/oc/octopus-caller/package.nix). ## Constructing workflows diff --git a/default.nix b/default.nix index cec2b6b..21403a2 100644 --- a/default.nix +++ b/default.nix @@ -31,7 +31,6 @@ let mutect = callBionix ./tools/mutect.nix { }; minimap2 = callBionix ./tools/minimap2.nix { }; picard = callBionix ./tools/picard.nix { }; - platypus = callBionix ./tools/platypus.nix { }; ref = callBionix ./lib/references.nix { }; samtools = callBionix ./tools/samtools.nix { }; sambamba = callBionix ./tools/sambamba.nix { }; diff --git a/examples/call.nix b/examples/call.nix index 81a112e..7525835 100644 --- a/examples/call.nix +++ b/examples/call.nix @@ -1,7 +1,7 @@ # This is an example pipeline specification to do multi-sample variant calling -# with the Platypus variant caller. Each input is preprocessed by aligning +# with the Octopus 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. +# marking duplicates. Finally octopus is called over all samples. { bionix ? import <bionix> { } , inputs , ref ? bionix.ref.grch38.seq @@ -12,7 +12,7 @@ with lib; let preprocess = flip pipe [ - (bwa.align { inherit ref; }) + (bwa.align { inherit ref; RG = {SM = "sample"; ID = "sample";};}) (samtools.sort { nameSort = true; }) (samtools.fixmate { }) (samtools.sort { }) @@ -20,4 +20,4 @@ let ]; in -platypus.call { } (map preprocess inputs) +octopus.call { } (map preprocess inputs) diff --git a/test-tnpair.nix b/test-tnpair.nix index ac8d0bb..86496ac 100644 --- a/test-tnpair.nix +++ b/test-tnpair.nix @@ -58,7 +58,6 @@ with lib; let tumours = [alignments.tumour]; }; glvariants = strelka.call {} (builtins.attrValues alignments); - platypusVars = platypus.call {} (builtins.attrValues alignments); octopusVars = octopus.call {} (builtins.attrValues alignments); shards = map (x: nameSort (bwa.align {inherit ref;} x)) (shard.fastQPair 2 normal.files); }; @@ -94,7 +93,7 @@ with lib; let testNaming = linkOutputs { crai = samtools.index {} (samtools.view {outfmt = types.toCram;} tnpairResult.alignments.tumour); kallisto = kallisto.quant {inherit ref;} (attrValues tnpair.tumour.files); - facets = facets.callCNV {vcf = tnpairResult.platypusVars;} (with tnpairResult.alignments; [normal tumour]); + facets = facets.callCNV {vcf = tnpairResult.octopusVars;} (with tnpairResult.alignments; [normal tumour]); cnvkit = cnvkitResults.cnvs; "cnvkit.pdf" = cnvkitResults.plot; "octopus.vcf" = tnpairResult.octopusVars; diff --git a/tools/platypus-callVariants.nix b/tools/platypus-callVariants.nix deleted file mode 100644 index 3119006..0000000 --- a/tools/platypus-callVariants.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ bionix -, indexAttrs ? { } -, bamIndexAttrs ? { } -, flags ? null -}: - -inputs: - -with bionix; -with lib; -with types; - - -let - filename = path: last (splitString "/" path); - getref = matchFiletype "platypus-callVariants" { bam = { ref, ... }: ref; }; - refs = map getref inputs; - ref = head refs; -in - -assert (length (unique refs) == 1); - -stage { - name = "platypus"; - buildInputs = with pkgs; [ platypus ]; - buildCommand = '' - ln -s ${ref} ref.fa - ln -s ${bionix.samtools.faidx indexAttrs ref} ref.fa.fai - ${concatMapStringsSep "\n" (p: "ln -s ${p} ${filename p}.bam") inputs} - ${concatMapStringsSep "\n" (p: "ln -s ${bionix.samtools.index bamIndexAttrs p} ${filename p}.bai") inputs} - platypus callVariants \ - --nCPU=$NIX_BUILD_CORES \ - --refFile=ref.fa \ - ${optionalString (flags != null) flags} \ - -o $out \ - --bamFiles=${concatMapStringsSep "," (p: "${filename p}.bam") inputs} - - # Remove timestamps from output - sed -i '/^##fileDate/d' $out - - # Remove platypusOptions from output - sed -i '/^##platypusOptions/d' $out - ''; - passthru.filetype = filetype.vcf { inherit ref; }; - passthru.multicore = true; -} diff --git a/tools/platypus.nix b/tools/platypus.nix deleted file mode 100644 index 29e7e08..0000000 --- a/tools/platypus.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ bionix }: - -with bionix; - -{ - /* Call variants - Type: { ... } -> [bam] -> vcf - */ - call = callBionixE ./platypus-callVariants.nix; -} |