Indices of events and bSFS dimensions #20
-
Hi Gertjan, I have a few agemo questions and thought it would be best to ask them here (in case they are useful to anyone else). I followed the example in the docs to set up the IM model and generate an expected bSFS. In setting up the model I defined indices for both the migration event and discrete population-split event.
My understanding is that these indices need to match how we set up the bSFS evaluator later.
The above seems to work as expected. However, I initially thought that I should write Why don't we include T in params given that we have specified an index for it above? T is instead specified using If I had set the split index as 3 and the migration index as 4, then would it be possible to set up the model, i.e. how would I specify the params? I tried a few different parameter combinations and I think that the returned bSFS has dimensions [hetA, hetB, fixed, hetAB], which differs from the representation that gIMble uses (at least back in my day) - [hetB, hetA, hetAB, fixed]. Is that correct? Many thanks and best wishes, Alex |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @A-J-F-Mackintosh, Now onto the issue of indices and parameters. I agree that this is currently a bit awkward. It should be possible though to set the split index to 3, and the migration index to 4. In the future, indices should be set automatically based on the order in which you insert them. I am still a bit on the fence as to what the best way would be to pass the parameter values once you have specified a model. Let me know if there are other things that are slightly annoying. I am hoping to polish off some of the rougher edges in the near future. |
Beta Was this translation helpful? Give feedback.
Hi @A-J-F-Mackintosh,
Yep, as always a couple of very good questions!
Firstly, the easiest question to answer. Yes, the default order of branch types is different from the order used in gimble. This is because in agemo all branch types are represented as a unique sequence of 0's and 1's. Their final order in the bSFS vector is determined by a simple sorting of those representations. This is not how we came up with the order in gimble.
However, you can specify your own order by providing a
branchtype_dict
that maps each branchtype to a unique integer index when making aBranchTypeCounter()
.Now onto the issue of indices and parameters. I agree that this is currently a bit awkward. It shoul…