diff options
author | Justin Bedo <cu@cua0.org> | 2021-09-21 14:15:31 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2021-09-21 14:15:31 +1000 |
commit | 7c46b53f316d43aad3bf7cb6891c5eb05b996de5 (patch) | |
tree | 2a77c938ed9cf8d1723f73521e566d7e17a2ac3c /tools/gridss-computeSamTags.nix | |
parent | 1ff1c9cf0bcc95a6555d1217598f55b7b9eae866 (diff) |
gridss: specify cores for all multithreaded phases
Diffstat (limited to 'tools/gridss-computeSamTags.nix')
-rw-r--r-- | tools/gridss-computeSamTags.nix | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/tools/gridss-computeSamTags.nix b/tools/gridss-computeSamTags.nix index a2e1f8b..de44478 100644 --- a/tools/gridss-computeSamTags.nix +++ b/tools/gridss-computeSamTags.nix @@ -1,10 +1,5 @@ -{ bionix -, bwaIndexAttrs ? {} -, faidxAttrs ? {} -, flags ? null -, config ? null -, heapSize ? "1G" -}: +{ bionix, bwaIndexAttrs ? { }, faidxAttrs ? { }, flags ? null, config ? null +, heapSize ? "1G" }: with bionix; with lib; @@ -15,9 +10,8 @@ input: let ref = matchFiletype "gridss-computeSamTags" { bam = x: x.ref; } input; sorted = matchFileSorting "gridss-computeSamTags" { name = _: true; } input; -in -assert(sorted); +in assert (sorted); stage rec { name = "gridss-computeSamTags"; @@ -30,15 +24,20 @@ stage rec { done java -Xmx${heapSize} \ -Dsamjdk.create_index=false \ - -cp ${bionix.gridss.jar} gridss.ComputeSamTags \ + -cp ${bionix.gridss.jar} gridss.ComputeSamTags \ VERBOSITY=WARNING \ - REFERENCE_SEQUENCE=ref.fa \ - WORKING_DIR=$TMP_DIR \ - TMP_DIR=$TMP_DIR \ - ${optionalString (config != null) ("OPTIONS_FILE=" + bionix.gridss.gridssConfig config)} \ - I=${input} \ - O=$out \ + WORKER_THREADS=$NIX_BUILD_CORES \ + REFERENCE_SEQUENCE=ref.fa \ + WORKING_DIR=$TMP_DIR \ + TMP_DIR=$TMP_DIR \ + ${ + optionalString (config != null) + ("OPTIONS_FILE=" + bionix.gridss.gridssConfig config) + } \ + I=${input} \ + O=$out \ AS=true ''; passthru.filetype = input.filetype; + passthru.multicore = true; } |