diff options
author | Justin Bedo <cu@cua0.org> | 2022-08-23 18:36:28 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2022-08-23 18:36:28 +1000 |
commit | 5107449eeb29963b98cb5b6ded6418d930590c23 (patch) | |
tree | 2d9b3ba549a0ff79999ee7045230963c90d162d2 | |
parent | 2d7a2b001936a8a047118af0f99a9cbfd38d258a (diff) |
last: update for latest version
-rw-r--r-- | tools/last-align.nix | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/tools/last-align.nix b/tools/last-align.nix index b326877..fbc0914 100644 --- a/tools/last-align.nix +++ b/tools/last-align.nix @@ -1,6 +1,7 @@ { bionix , ref , flags ? null +, trainFlags ? null , indexAttrs ? { } }: @@ -13,28 +14,24 @@ with lib; with types; let - fa = f: matchFiletype "last-ref" { fa = _: f; } f; fq = f: matchFiletype "last-input" { fq = _: f; } f; - fqfa = f: matchFiletype "last-input" { fq = _: f; fa = _: f; } f; - Q = matchFiletype "last-input" { fq = _: 1; fa = _: 0; }; - parallel = matchFiletype "last-input" { fq = _: "parallel-fastq"; fa = _: "parallel-fasta"; }; - in stage { name = "last-align"; buildInputs = with pkgs; [ last ]; buildCommand = '' - ${if (input2 != null) then "fastq-interleave ${fq input1} ${fq input2}" else "cat ${fa input1}"} | \ - ${parallel input1} -j $NIX_BUILD_CORES \ - lastal -Q${toString (Q input1)} \ - ${optionalString (input2 != null) "-i1"} \ + last-train -P $NIX_BUILD_CORES \ + ${optionalString (trainFlags != null) flags} \ + ${bionix.lastal.index indexAttrs ref}/index \ + ${fq input1} ${optionalString (input2 != null) (fq input2)}\ + > train + lastal -P $NIX_BUILD_CORES \ ${optionalString (flags != null) flags} \ ${bionix.lastal.index indexAttrs ref}/index \ + -p train \ + ${fq input1} ${optionalString (input2 != null) (fq input2)}\ > tmp - '' + (if input2 == null then '' cp tmp $out - '' else '' - last-pair-probs tmp > $out - ''); + ''; passthru.multicore = true; } |