soo-h / DASweepDetect

Detection and classification selective sweep use domain adaptive model
MIT License
8 stars 1 forks source link

how construct ./simu_config files from Relate reasults? #2

Closed Yuzhongzian closed 2 months ago

Yuzhongzian commented 4 months ago

Thank you for your software.I have some questions when I used this software.

In the first step, I tried to construct the file which is like the example file in ./simu_condig, but I don't understand how to set 'en' .I am not sure how to set 'en' as described in the example 'en t 0 Nt/Na'. The parameter 't' I calculate using Relate is increasing integers, while in the example, it is decimals, and Nt/Na is also a large number. I want to ask if this is an issue with my population. And this is the popsize.coal file below.

row1 group1 row2 0 500 694.748 965.349 1341.35 1863.8 2589.74 3598.43 5000 6947.48 9653.49 13413.5 18638 25897.4 35984.3 50000 69474.8 96534.9 134135 186380 258974 359843 500000 694748 965349 1.34135e+06 1.8638e+06 2.58974e+06 3.59843e+06 5e+06 5e+07 row3 0 0 0.00548889 0.000566733 5.27115e-09 3.20568e-06 1.08257e-05 8.11082e-06 7.32608e-06 5.15276e-06 1.02772e-05 1.16711e-05 1.15036e-05 1.30137e-05 7.88228e-06 7.88483e-06 7.85693e-06 6.26058e-06 7.55161e-06 7.6819e-06 8.48413e-06 6.95591e-06 5.98037e-06 8.03699e-06 7.94197e-06 7.82151e-06 3.16058e-06 2.29464e-05 -nan -nan -nan -nan -nan

Thank you!

soo-h commented 3 months ago

Thank you for using our software and for reaching out with your questions.

In the popsize.coal file, the values in row2 represent the number of generations t in the past. When setting up the simulation, this value should be scaled using t = t / (4*Na). The values in row3 represent the coalescence rate at t. You can determine Nt using 1 / (2 * coalescence rate). The value of Na should be the Nt corresponding to the smallest t.

In your example, since the first two coalescence rates are 0, you can use the third value as an approximation for Na, which is Na = 1 / (2 * 0.00548889) ≈ 91.1. The corresponding parameter t = Nt/(4*Na)= 694.748 / (4 * 91.1) ≈ 1.9. Therefore, the demographic should be set as follows:

-en 1.906 0 1
-en 2.649 0 9.684
...

I hope this helps! If you have any further questions, please feel free to reach out.

Best regards!

Yuzhongzian commented 2 months ago

Thank you for using our software and for reaching out with your questions.

In the popsize.coal file, the values in row2 represent the number of generations t in the past. When setting up the simulation, this value should be scaled using t = t / (4*Na). The values in row3 represent the coalescence rate at t. You can determine Nt using 1 / (2 * coalescence rate). The value of Na should be the Nt corresponding to the smallest t.

In your example, since the first two coalescence rates are 0, you can use the third value as an approximation for Na, which is Na = 1 / (2 * 0.00548889) ≈ 91.1. The corresponding parameter t = Nt/(4*Na)= 694.748 / (4 * 91.1) ≈ 1.9. Therefore, the demographic should be set as follows:

-en 1.906 0 1
-en 2.649 0 9.684
...

I hope this helps! If you have any further questions, please feel free to reach out.

Best regards!

Thank you very much for your response.