z0on / AFS-analysis-with-moments

Standalone python scripts to do pairwise AFS analysis for population differentiation using Moments (http://www.genetics.org/content/early/2017/05/08/genetics.117.200493)
6 stars 4 forks source link

Help to explaining demography #9

Open quangsang52sh opened 6 months ago

quangsang52sh commented 6 months ago

Hi Developer! I am running the pipeline and come to the end of the analysis. This is the result that I sent the links below Name.winboots.IMscns_plots.pdf IMscns_426349_28_45.pdf IMscns

The winning model is IMscns. The problem here is How can I know the exact year for time ago ? You can see 44935742 in x-axis and should it be divided by 1000 (thousand years) or 5000 (5 years in thounsand) or some number or not divide anything? How can I figure out the effective population size from demography? Because I just saw the blue color and can not know how to calculate Ne for each population

Parameter for running IMscns [nu1,nu2,T1,T2,p_misid] :

Population: AKF, BKF
Projection: 28,45
Mutation rate: 2e-8
Thousand Year: 0.005
Params [4.320e+00, 1.219e-03, 1.946e+00, 2.301e-03, 2.752e-03]

Thank you in advance! Tsang

z0on commented 6 months ago

Hi Tsang -

Your time axis on those plots is supposed to be calibrated in thousands of years, but your setting for mutation rate seems too low. It should be the mutation rate per base per generation multiplied by the length of genotyped sequence.

You seem to be feeding a folded spectrum into an unfolded model… Please do the opposite - take unfolded spectrum, but use folded models (with prefix fold_ - they hav a folding step inside them), otherwise some parameters don't make sense (p_misid)

I also see that you winning model is the one with no split - basically it says that your two populations are in fact the same population that you sampled twice.

Misha

On Apr 25, 2024, at 4:41 AM, tsang @.***> wrote:

Hi Developer! I am running the pipeline and come to the end of the analysis. This is the result that I sent the links below Name.winboots.IMscns_plots.pdf https://github.com/z0on/AFS-analysis-with-moments/files/15107264/Name.winboots.IMscns_plots.pdf IMscns_426349_28_45.pdf https://github.com/z0on/AFS-analysis-with-moments/files/15107268/IMscns_426349_28_45.pdf IMscns.jpg (view on web) https://github.com/z0on/AFS-analysis-with-moments/assets/51614765/fff121f8-60be-41b1-950e-0b0852bdd7bf The winning model is IMscns. The problem here is How can I know the exact year for time ago ? You can see 44935742 in x-axis and should it be divided by 1000 (thousand years) or 5000 (5 years in thounsand) or some number or not divide anything? How can I figure out the effective population size from demography? Because I just saw the blue color and can not know how to calculate Ne for each population

Parameter for running IMscns [nu1,nu2,T1,T2,p_misid] :

Population: AKF, BKF Projection: 28,45 Mutation rate: 2e-8 Thousand Year: 0.005 Params [4.320e+00, 1.219e-03, 1.946e+00, 2.301e-03, 2.752e-03] Thank you in advance! Tsang

— Reply to this email directly, view it on GitHub https://github.com/z0on/AFS-analysis-with-moments/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZUHGFBVFANHR266V7UHN3Y7DFSZAVCNFSM6AAAAABGYQMB2GVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DGMJUGI2DSOA. You are receiving this because you are subscribed to this thread.

quangsang52sh commented 6 months ago

Hi Misha! Thank you for explaining the model, the mutation rate that I calculate is based on the reference genome in each 1kb and not per base like you said, so that reason it is too low. Now I understand and figure out the new mutation rate then running again. By the way, I will change the script into a folded model in the next running.

Thank you so much! Tsang