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
BinomialPoint has missing attributes #1153
Comments
Thanks for the message @hanbin973. I am unable to reproduce the bug with the current version, which is identical to the GitHub mkdir ~/tmp/test_bug
cd ~/tmp/test_bug
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install --no-cache fwdpy11 Making minor modifications to your code so that it is standalone: import fwdpy11
# recombination
# https://molpopgen.github.io/fwdpy11/short_vignettes/geneticmaps_vignette.html
# four regions (chrs) = 0,1,2,3
recregions = [
fwdpy11.BinomialPoint(position=10, probability=0.5),
fwdpy11.BinomialPoint(position=20, probability=0.5),
fwdpy11.BinomialPoint(position=30, probability=0.5)
]
# neutral variants
# https://molpopgen.github.io/fwdpy11/short_vignettes/neutralmuts_vignette.html
# simulate neutral variants bc to gettemporal frequencies
nregions = [
fwdpy11.Region(beg=0, end=4, weight=1)
]
nrate = 1e-4
pdict = {
"nregions": nregions,
"rates": (nrate, 0, None), # rates of neutral mut, selected mut, recomb
"recregions": recregions,
"demography": None,
"sregions": [],
"gvalue": [fwdpy11.Multiplicative(scaling=2)], # no selection?
"simlen": 1000
}
params = fwdpy11.ModelParams(**pdict) Everything runs just fine. The current version is:
Further,
I'm guessing you have an installation issue. Perhaps one of the alpha releases of the current version and not the latest version itself? One other point: The scaling argument to |
Thank you for the check. I've reinstalled the environment and still have the error. I've installed No error occurs until running
Everything is fine until I run the actual simulation. The initially reported error
occurs when running
I think there was a mistake on my side. The full code I was referring to in the original issue was actually 'the full code except for the fwdpy11.evolvets() command`. Sorry for this. |
I am now able to reproduce the issue. Your previous example was not complete, which is why I was unable to reproduce. In the future, please provide code that does reproduce bugs. It is really important for any project. You said that you code was complete except for Reproducible example: import fwdpy11
# recombination
# https://molpopgen.github.io/fwdpy11/short_vignettes/geneticmaps_vignette.html
# four regions (chrs) = 0,1,2,3
recregions = [
fwdpy11.BinomialPoint(position=10, probability=0.5),
fwdpy11.BinomialPoint(position=20, probability=0.5),
fwdpy11.BinomialPoint(position=30, probability=0.5)
]
# neutral variants
# https://molpopgen.github.io/fwdpy11/short_vignettes/neutralmuts_vignette.html
# simulate neutral variants bc to gettemporal frequencies
nregions = [
fwdpy11.Region(beg=0, end=4, weight=1)
]
nrate = 1e-4
pdict = {
"nregions": nregions,
"rates": (nrate, 0, None), # rates of neutral mut, selected mut, recomb
"recregions": recregions,
"demography": None,
"sregions": [],
"gvalue": [fwdpy11.Multiplicative(scaling=2)], # no selection?
"simlen": 1000
}
params = fwdpy11.ModelParams(**pdict)
pop = fwdpy11.DiploidPopulation(100, 40)
rng = fwdpy11.GSLrng(5)
fwdpy11.evolvets(rng, pop, params, 100) |
I'll get a fix out for this shortly. |
This may be held up by #1154. |
@hanbin973, I have a fix in #1155. Testing via GitHub takes a while, but I expect to merge soon and push a release. Pushing a release will trigger automatic builds and pushes to PyPi. bioconda will take longer and may need manual intervention from me. |
The new version is on PyPi now with pre-built packages for Linux and macOS/x86. macos/x86 is currently failing over on bioconda for unknown reasons. So that side of things will take a while. |
Hi, thank you for developing a great library.
I came up with the following error while using
BinomialPoint
forrecregion
.I ran
and got
The full code is
Unlike
PoissonInterval
,BinomialPoint
does not have an attributebeg
andend
which is causing the problem.The only page in the current documentation containing a code with
BinomialPoint
is this link. Copy-and-pasting the code here to executeevolvets
returns the same error above.The text was updated successfully, but these errors were encountered: