fix: replace twobitreader with py2bit to support large genomes#107
Merged
alejandrogzi merged 2 commits intohillerlab:mainfrom Apr 4, 2026
Merged
Conversation
twobitreader only handles version-0 .2bit files. faToTwoBit -long produces version-1 (64-bit) .2bit files required for genomes larger than 4 GB (e.g. lungfish ~40 GB, salamander ~21 GB). This caused crashes during LASTZ jobs. py2bit supports both version-0 and version-1 .2bit files, fixing issue hillerlab#56. Changes: - standalone_scripts/run_lastz.py: import py2bit; use py2bit.open() and two_bit_conn.sequence() instead of TwoBitFile and dict-style access - pyproject.toml: twobitreader -> py2bit in dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, writer side) The previous commit fixed the reader (twobitreader → py2bit), but faToTwoBit was still writing version-0 (32-bit) .2bit files without -long, causing an index overflow abort on genomes with sequences larger than 4 GB. Adding -long to both faToTwoBit call sites in project_setup_procedures.py so it writes version-1 (64-bit) .2bit files that py2bit can then read. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
twobitreader only handles version-0 .2bit files. faToTwoBit -long produces version-1 (64-bit) .2bit files required for larger genomes (e.g., lungfish ~40 GB, salamander ~21 GB). This caused crashes during the partition step.
py2bit supports both version-0 and version-1 .2bit files, fixes #56.
I have tested this fix on my side with large input data, and it works well.