Ports enrich2 to python 3, fixes bugs #68
Merged
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.