btmartin721 / ClineHelpR

Detects Outliers and plots genomic clines from BGC output, and extends the plotting functionality of INTROGRESS to Correlate genomic clines and hybrid indices with Environmental Variables
GNU General Public License v3.0
16 stars 2 forks source link

Assessing the convergence of runs #32

Open lpittet92 opened 5 months ago

lpittet92 commented 5 months ago

Hello,

First of all, thank you for giving us the opportunity to run BGC so easily.

I am having some trouble understanding my results. I attached the log likelihood and hybrid index graphs that I obtained from two runs (100000 burn-in / 200000 MCMC iterations). I did it only as a test and want to add more runs and probably also more MCMC iterations.

Could you help me understand why my two runs give quite different log likelihood and hybrid index. It looks to me like the model found convergence inside each run but is not coherent between runs.

All the best,

Loïc ABH_hi_convergence.pdf ABH_LnL_convergence.pdf

tkchafin commented 5 months ago

I would suggest a longer run with a larger burn-in, and increase the thinning parameter (2nd MCMC in particular looks to have a lot of autocorrelation)

lpittet92 commented 5 months ago

That was fast !!

Thank you very much, I will give it a try and let you know how it goes :)

lpittet92 commented 4 months ago

Hello again,

I have been trying a lot of things since the last message... Now my runs converge. When I included all the populations of the hybrid zone, BGC identified only one population as hybrid (hybrid index of 0.5), and all the other populations as P1 (average 0.98 HI). So I ran it again with only the hybrid pop and I get the result attached. FWH_FINAL_all_hiXphi_alphaAndBeta-2.pdf

I am not sure if everything ran normally. Do you have any idea what is happening here ?

Thanks

lidanqi1990 commented 1 month ago

Hello again,

I have been trying a lot of things since the last message... Now my runs converge. When I included all the populations of the hybrid zone, BGC identified only one population as hybrid (hybrid index of 0.5), and all the other populations as P1 (average 0.98 HI). So I ran it again with only the hybrid pop and I get the result attached. FWH_FINAL_all_hiXphi_alphaAndBeta-2.pdf

I am not sure if everything ran normally. Do you have any idea what is happening here ?

Thanks

Hi, I have already run BGC and plot BGC results. Do you know how to get the outlier SNP position in each chromosome?

all the best, Danqi Li

lpittet92 commented 1 month ago

Hi,

Yes. The function "get_bgc_outliers()" generates a list of 3 data frames. You can display the data frames or export each data frame separately as csv or text files. Then you will be able to see the outliers.

Best,

Loïc

lidanqi1990 commented 1 month ago

Hi, Loïc Thanks for helping me out with this problem. I try to use "write.table" to export data frame, but it shows an error:

Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 222076, 49, 19

Can you help me how to export each data frame separately? Regard.

Best

Danqi Li