Open mandresapata opened 1 year ago
Hi,
Tracts works with a driver script -- so you would run, for the two-population example,
python ASW_tractlength.py
, which will import tracts load the data, and run the inference.
So to change the data source, demographic model, etc, you would need to edit this driver file.
Note that this process can be confusing, as I wrote this code before having thought much about user interface. We are in the process of improving this interface so that things are easier. In the meantime, feel free to keep asking questions!
Hi thank you very much for your answer! I could run the examples as you mentioned (python ASW_tractlength.py), and also it works when I edited this file.
Just one additional question. I have noticed that there are two example files one "ASW_tractlength.py" and the "ASW_tractlength_fix.py" -being the last one that produces the 5 outputs per experiment (_pred/_dat/etc. for 1 pulse and for 2 pulses of migration).
So to infer the migration between two populations, I should first run the first script ASW_tractlength.py to get the migrations and likelihoods (this does not produce the outputs, but gives the migration matrix and likelihoods), and then use those values as fixed values in the ASW_tractlength_fix.py (this is producing the outputs)?
Thank you very much!
You can run either -- the difference between the two is in the optimization strategy. the "_fix" refers to the fact that this script only looks for models that have the correct ancestry proportions in the end. It tends to run faster. I don't recall them giving different outputs, but the number of free parameters is different between models. the pp model has two fixed parameters, whereas the pp_fix model has only one since the ancestry proportions are constrained by the observed proportions.
Thank you very much, this is really helpful. Just curious, if there is a script or way to this plot of the ancestry proportion over time? (the plot with generations and ancestry proportions below the tracts analysis in some of the figures from your papers).
[image: Screen Shot 2023-05-03 at 12.13.04 PM.png]
On Wed, May 3, 2023 at 6:18 AM Simon Gravel @.***> wrote:
You can run either -- the difference between the two is in the optimization strategy. the "_fix" refers to the fact that this script only looks for models that have the correct ancestry proportions in the end. It tends to run faster. I don't recall them giving different outputs, but the number of free parameters is different between models. the pp model has two fixed parameters, whereas the pp_fix model has only one since the ancestry proportions are constrained by the observed proportions.
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/sgravel/tracts/issues/27*issuecomment-1533017479__;Iw!!IKRxdwAv5BmarQ!YpRDOtvTqxeH1PWeLOGnKycB_q5s2CegwPzAYTpjaUzslWCg1o9BqihTl7Ig9-pS5yK6yMWE-uQs-K-HbpysFQ$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AQDHXASWRBZBIB22KBFXLFDXEJLKJANCNFSM6AAAAAAXQMGVCQ__;!!IKRxdwAv5BmarQ!YpRDOtvTqxeH1PWeLOGnKycB_q5s2CegwPzAYTpjaUzslWCg1o9BqihTl7Ig9-pS5yK6yMWE-uQs-K-eHoWpmw$ . You are receiving this because you authored the thread.Message ID: @.***>
Hello, This is a basic question about how to run tracts. However, I am a little confused about how to run this by using the example files. Has tracts a command line interface or options (e.g., python tracts.py --input-file or something)? or do I need to modify some of the examples to run my desired model?
I wan to infer migration based on the ancestry tracts that I have inferred from RFMIX, so it is a very basic model for a Latin American population (e.g., PEL Peruvians from Lima from 1000Genomes), in which I want to know at what time European, African and Native American ancestries meet back in time (migration starting back in time), but it is not clear to me how run tracts in python? please, could you help with this by let me know how to run the examples?