Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restrict the number of migration #24

Closed
silvewheat opened this issue Nov 9, 2020 · 4 comments
Closed

restrict the number of migration #24

silvewheat opened this issue Nov 9, 2020 · 4 comments

Comments

@silvewheat
Copy link

Hi Ekaterina,

The GADMA is really helpful to infer the best model. But sometimes, I want to restrict the number of migration, and the time interval of the migration. Is there any why to do that?
For example, I have there population. And I want only one migration event. And It should be happend after the second split. And furthermore, It should happend between the second and the third population.
Is there anyway to do that (both the three condition or one of them)?

Best,

Yudong Cai

noscode added a commit that referenced this issue Nov 10, 2020
Add extension with migration masks to restrict migrations manually (issue #24). Fix some bugs for the resume option.
@noscode
Copy link
Collaborator

noscode commented Nov 10, 2020

Dear Yudong Cai,

Sorry for the late reply. Your request about restricting some migrations is not the first one so I decided to implement it in GADMA. I have update the repository and you need to download and install GADMA from GitHub manually in order to get the new update.

So to restrict migrations you should set option Migration masks in parameters file. It is the list of masks for migration matrices for every time interval where is migration (any time interval after first split). So each mask is 2x2 or 3x3 matrix with 0 and 1, if mask[i][j] is 0 then there is no migration from population j to population i. Still there is no option to make some migrations symmetrical and other asymmetrical - all of them are either symmetrical or otherwise. If Symmetrical migrations are set to True then Migration masks should contain symmetrical matrices of masks.

For your special case the option will be:

Migration masks: [ [[0, 0], [0, 0]], [[0, 0, 0], [0, 0, 1], [0, 1, 0]] ]

It is valid for any structure of (*, 1, 1). It allow to infer migrations from pop2 to pop3 and from pop3 to pop2 during time interval after second split.
Please let me know if it is working or not.

Best regards,
Ekaterina

@silvewheat
Copy link
Author

silvewheat commented Nov 10, 2020

Dear Ekaterina,

Many thanks for your quick response! I'll try this new option soon. And I will reply if it works.

Thanks,
Yudong Cai

@silvewheat
Copy link
Author

Dear Ekaterina,

The new option works as expected! Thank you very much!

Best,
Yudong Cai

@noscode
Copy link
Collaborator

noscode commented Nov 11, 2020

I am glad to hear it. You are welcome!

Ekaterina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants