Coder Social home page Coder Social logo

Comments (4)

dportik avatar dportik commented on August 19, 2024

You are correct, this was supposed to include T2 rather than T1. This mistake has been fixed in the updated code. Thanks for taking the time to read through the models carefully enough to catch this issue!

from dadi_pipeline.

dportik avatar dportik commented on August 19, 2024

@hemstrow I just wanted to follow up on this and report that there were other issues I found with the original island model set, including mis-assigned and nonsense parameters. These models were incorrectly specified in addition to the issue you raised.

I discussed some better approaches to these models with Ryan (threads here and here). Afterwards, I completely re-wrote the original island model set. I released the revised island models as part of dadi_pipeline v3.1.1 in December 2019.

I'm not sure if you have seen these updates, but wanted to make you aware of them. If you plan to use the revised island models, please let me know if you find any other issues or discrepancies. These resources are a work in progress, and I always appreciate the feedback.

Thanks!

from dadi_pipeline.

xuefenfei712 avatar xuefenfei712 commented on August 19, 2024

Dear dportik

To continue this question, I want to build 1D model that my population experienced first bottleneck and then a founder effect, I draft the code, while it shows error:
code:
def three_epoch_founder(params, ns, pts):
"""
params = (nuB,nuF,nuFd,TB,TF,TFe)
ns = (n1,)

nuB: Ratio of bottleneck population size to ancient pop size
nuF: Ratio of contemporary to ancient pop size ##Ratio of founder to ancient
nuFd: Ratio of contemporary to founder
TB: Length of bottleneck (in units of 2*Na generations)
TF: Time since bottleneck recovery (in units of 2*Na generations)
TFe: Time of founder effect
n1: Number of samples in resulting Spectrum
pts: Number of grid points to use in integration.
"""
nuB,nuF,nuFd,TB,TF,TFe = params

xx = Numerics.default_grid(pts)
phi = PhiManip.phi_1D(xx)

phi = Integration.one_pop(phi, xx, TB, nuB)
phi = Integration.one_pop(phi, xx, TF, nuF)
nuFd_func = lambda t: nuF * (nuFd/nuF)**(t/TFe)
phi = Integration.one_pop(phi, xx, TFe, nuFd=nuFd_func)
fs = Spectrum.from_phi(phi, ns, (xx,))
return fs

three_epoch_founder.param_names = ['nuB', 'nuF','nuFd', 'TB', 'TF', 'TFe']

Looking forward for your reply, thankyou
Best
Xue

from dadi_pipeline.

dportik avatar dportik commented on August 19, 2024

Hi @xuefenfei712 ,
For questions related to model specification (and not the pipeline workflow), please post on the dadi user group:
https://groups.google.com/g/dadi-user

from dadi_pipeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.