Repository navigation
star/genomegenerate: round genomeSAindexNbases down, as STAR requires - #13464
Merged
Merged
Conversation
The STAR manual says that for small genomes --genomeSAindexNbases must be scaled down to min(14, log2(GenomeLength)/2 - 1). STAR warns when the value is larger than log2(GenomeLength)/2 - 1 and recommends int(log2(GenomeLength)/2 - 1). The module rounded log2(GenomeLength)/2 - 1 to the nearest integer, so whenever the fraction was 0.5 or more it chose one more than the limit: 7 instead of 6 for the 40 kb test genome, 13 instead of 12 for a 140 Mb genome. STAR then warned that the index may cause a seg-fault at the mapping step. Round down instead. Generated by Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danilomonge
force-pushed
the
star-genomegenerate-saindexnbases-floor
branch
from
October 26, 2026 21:52
7707495 to
a6f93fe
Compare
danilomonge
marked this pull request as ready for review
October 26, 2026 22:07
SPPearce
approved these changes
Oct 27, 2026
danilomonge
added a commit
that referenced
this pull request
Oct 27, 2026
Resolve the conflict with #13464 on the NUM_BASES line by keeping both changes: gawk gets $args3, and the computed genomeSAindexNbases is rounded down with int(). Generated by Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
ext.argsdoes not set--genomeSAindexNbases,star/genomegeneratecomputes it from the genome length. The STAR manual says that for small genomes the value must be scaled down tomin(14, log2(GenomeLength)/2 - 1)(parametersDefault). STAR warns when the value is larger thanlog2(GenomeLength)/2 - 1and recommendsint(log2(GenomeLength)/2 - 1)(Genome_genomeGenerate.cpp). The module roundedlog2(GenomeLength)/2 - 1to the nearest integer (printf "%.0f"), so whenever the fraction was 0.5 or more it chose one more than the limit:log2(L)/2 - 1genome.fasta)With 7, STAR 2.7.11b logs
--genomeSAindexNbases 7 is too large for the genome size=40001, which may cause seg-fault at the mapping step. Re-run genome generation with recommended --genomeSAindexNbases 6. This PR rounds down withint(), so the module uses the value STAR recommends and the warning is gone. Genomes above about 1 Gb (capped at 14) and runs that set--genomeSAindexNbasesinext.argsare not affected.The snapshots do not change. The
star/genomegeneratesnapshot records the index file names and the versions, and thestar/starsolooutputs, the only other CPU test that uses the computed value, have the same md5 sums with 6 as with 7. The other tests that build an index with this module set--genomeSAindexNbases 9in their configs.#13453 also edits this
gawkline (it adds$args3), so whichever of the two PRs is merged second needs a one-line merge.Generated by Claude Opus 5.5
PR checklist
topic: versions- See version_topicslabelnf-core modules test <MODULE> --profile docker(at a6f93fe, on linux/amd64 with nf-test 0.9.5 and Nextflow 26.04.0:nf-test test --profile=+docker --cionstar/genomegenerateand onstar/align,star/starsolo,arriba/arriba,arriba/visualisationandfastq_align_star, whose tests use it: 26 of 26 passed against the snapshots;nf-core modules lint star/genomegenerate: 0 failed)nf-core modules test <MODULE> --profile singularity(not run locally; CI runs it)nf-core modules test <MODULE> --profile conda(not run locally; CI runs it)