SunPengChuan / wgdi

WGDI: A user-friendly toolkit for evolutionary analyses of whole-genome duplications and ancestral karyotypes
https://wgdi.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
121 stars 22 forks source link

separate Gaussian Fitting for two or more peaks #14

Closed tinyfallen closed 3 years ago

tinyfallen commented 3 years ago

Dear teacher, After acquiring the correspondence block output file c.csv using -c module and then running the kspeaks module, I got the kp.png which showed two peaks. I would like to peaksfit a Ks density distribution which contained two peaks. So I tried to separate the area in peaksfit.conf to 0,1.2 and 1.2,2.5 to run the peaksfit module and I did obtain two sets of Gaussian Fitting parameter. However, these parameter seemed not to share a common Frequency (axis Y) scale comparing to the kp.png. How can I get multiple sets of Gaussian Fitting parameter which could share same layout in the kp.png? By the way, this is an inter-species ks distribution, I do not really understand what the two peaks mean respectively. I think the peak in ks≈0.1 represents the divergence event of these two species, am I right or not? And I have no idea about the first peak. MANY THANKS ! kp

SunPengChuan commented 3 years ago

There are related discussions in the comments section below this video. https://www.bilibili.com/video/BV195411P7L1/ .

tinyfallen commented 3 years ago

Thanks a lot !

SunPengChuan commented 3 years ago

In my opinion, the blocks generated by different events can be distinguished. Therefore, you can simply filter the blocks generated by an event based on homo, ks, and even delete inappropriate blocks by modifying the blockinfo.csv file. You can judge whether your processing is appropriate through the -bk parameter.

SunPengChuan commented 3 years ago

For ks peaks between different species, the first peak may be related to the divergence. Sometimes the recent polyploid events overlap with the divergence and merge into one. The ancient Ks peak should be related to the shared polyploid event.

tinyfallen commented 3 years ago

For ks peaks between different species, the first peak may be related to the divergence. Sometimes the recent polyploid events overlap with the divergence and merge into one. The ancient Ks peak should be related to the shared polyploid event.

I reviewed some related papers and tried to understand that the ks≈1.8 peak was the WGD event happened in their common ancestry and the ks≈0.1 peak was the divergence peak, which means the same as you said.

That helps a lot , best regards !