Python 3.14/NumPy 2.0+ compatibility fixes#409
Open
YourePrettyGood wants to merge 3 commits into
Open
Conversation
…etadata parsing for NumPy 2.0+, allowed dinf-plot gan to work when model parameter truths are not provided, removed FeatureCollection dunder attribute assignment to make compatible with Python 3.14, fixed dinf-plot and dinf-tabulate usage names for docs, and adjusted example model scripts to fix skipping chr22 and missing name for named argument of `dinf.get_samples_from_1kgp_metadata()`.
…mes populations are found in contiguous blocks of VCF columns. This relies on the `BagOfVcf.sample_index_map` attribute added in ecc1551
…tures in 7.4+](https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function), and updated test of 1000 Genomes sample metadata parsing to account for interleaved sample blocks.
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Fixes as described in #408 generally making dinf compatible with Python 3.14 and NumPy 2.0+, plus a couple usage/documentation fixes. Also included a small fix for subsampling of individuals, as the original code assumed samples from the same population were found in contiguous blocks of columns in the VCF, and never interleaved with each other. Instead, now we store a map from sample ID to CyVcf2 sample index and convert the
samplesdict into asample_indicesdict, and use subsamples of the resulting lists to extract the appropriate population-specific genotype matrices. The test and example metadata fordinf.get_samples_from_1kgp_metadata()have been updated accordingly to check for interleaved population blocks.In the process of running the tests, I ended up having to adjust the pytest config as well to account for the deprecation of marking pytest fixtures in 7.4+. I'm no Python guru, so hopefully didn't break anything there.