diff options
author | Justin Bedo <cu@cua0.org> | 2024-11-12 15:50:42 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2024-11-12 15:50:42 +1100 |
commit | 58fa67ffd09d3bdfe72bef7c873ef94190dc6708 (patch) | |
tree | 9e382c5b1da76540d6b1ca2d9a053f52042e3579 /tools | |
parent | 00d758934e7d5827e01585887a36913a326535ea (diff) |
Diffstat (limited to 'tools')
-rw-r--r-- | tools/platypus-callVariants.nix | 46 | ||||
-rw-r--r-- | tools/platypus.nix | 10 |
2 files changed, 0 insertions, 56 deletions
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; -} |