Ports enrich2 to python 3, fixes bugs#68
Merged
afrubin merged 10 commits intoFowlerLab:release-2.0.0from Dec 7, 2024
Merged
Conversation
Member
|
Thanks for this! We made an attempt at this early in Python3 and it was a lot of work, so we really appreciate the PR. We've been working on a replacement for Enrich2 but it won't fully replicate the old behavior and it's good to have an updated version for labs who want to reproduce old analysis. I've re-targeted the PR at a new branch for a release 2.0.0 and will run a few checks on my side before merging it and making a new release. |
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.
Due to python 2 deprecation and lack of arm64 builds on conda, enrich2 is increasingly difficult to use. This PR updates enrich2 to run on python 3.
Besides general 2to3 changes, the major change is byte handling. Some functions work on bytes, others on strings. This attempts to make them generally operate on bytes, however some functions apparently still return strings. This includes a test for those cases.
This PR also fixes several bugs, primarily with writing a raw counts CSV file. This was prone to printing NA values. This should work properly now (fixes #44). Default Illumina headers have changed as well, so this updates that regex (possibly fixes #39)
This was tested on the example dataset (barcoded variants read from bzipped fastqs) as well as some of our own datasets (tsvs of identifier counts) and should be working. The example dataset doesn't include expected results to benchmark against, however, so I can't confirm it is identical.