Skip to content

Allow msprime.RateMap or equivalent to be used in pip installs #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hyanwong opened this issue Oct 25, 2022 · 8 comments
Open

Allow msprime.RateMap or equivalent to be used in pip installs #753

hyanwong opened this issue Oct 25, 2022 · 8 comments

Comments

@hyanwong
Copy link
Member

hyanwong commented Oct 25, 2022

In the CLI we use msprime.RateMap.read_hapmap to read in a HapMap-format file. But as @jeromekelleher says

We don't have binary wheels for msprime on Windows, and our install is therefore failing on pip (for the reasons that we don't have binary wheels on windows).

This is annoying because we aren't actually using the C parts of msprime, just the python implementation of RateMap (specifically, the msprime intervals.py file). We should reactivate "--recombination-map" in the CLI support somehow, e.g. by adding that file to the tsinfer repo, either as a copy or using submodules.

@hyanwong hyanwong changed the title Allow msprime.RateMap or equivalent to be use in pip Allow msprime.RateMap or equivalent to be used in pip installs Oct 25, 2022
@hyanwong
Copy link
Member Author

Any thoughts on the least bad option here @benjeffery ?

@benjeffery
Copy link
Member

If it's submodule vs copy, I'd go with copy.
Another option is to try to import msprime when it is needed and give a helpful error message asking to install it.
The ideal solution is to get windows wheels working for msprime...

@hyanwong
Copy link
Member Author

The ideal solution is to get windows wheels working for msprime...

if this is on the cards in the mid-future, that would be the best option.

@hyanwong
Copy link
Member Author

hyanwong commented Nov 9, 2022

We could perhaps put a copy of the intervals.py file in this repo as a short-term measure, and then remove it when msprime windows wheels are working, assuming that's planned for the new-to-mid term future?

@jeromekelleher
Copy link
Member

A better solution might be to move intervals.py into tskit. We will probably be dealing with these tedious issues for getting ratemaps into tskit for LS matching soon, so that might tip the scales.

@hyanwong
Copy link
Member Author

A better solution might be to move intervals.py into tskit. We will probably be dealing with these tedious issues for getting ratemaps into tskit for LS matching soon, so that might tip the scales.

Oh yes, it's a great point that we might need something like this for the HMM matching parameters in tskit. Are we happy enough with the intervals.py API to incorporate it into tskit as-is, or does it need work? I'm happy to open a PR to move it in.

FWIW @stsmall was looking to use the --recombination-map functionality in the tsinfer CLI.

@jeromekelleher
Copy link
Member

If it's a clean swap-in then yes, we should probably just move the code straight up into tskit.

We can leave the file in msprime until the tskit version is released, and then bump msprime's requirements.

@hyanwong
Copy link
Member Author

hyanwong commented Jan 20, 2023

We can now reactivate this because intervals.py is present (undocumented) in tskit 0.5.4. Do we want to do that now, or wait until it is documented. No hurry, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants