AliSim with site-specific frequency profiles

37 views
Skip to first unread message

gree...@gmail.com

unread,
Mar 27, 2024, 11:33:13 AM3/27/24
to IQ-TREE
Hello!

I would like to simulate a dataset with site-specific frequency profiles (which are in a .sitefreq file). I tried to use -fs my_file.sitefreq but it doesn't work. And if I include SSF when I call the model (for instance, -m Poisson+G4+SSF), it gives the following error:

[Alignment Simulator] Executing

ERROR: Binomial sampling can only be used with PoMo.



Do you know how I can resolve this?

Thank you very much!

Mattia

Sishuo Wang

unread,
Apr 4, 2024, 10:47:49 PM4/4/24
to IQ-TREE
Dear Mattia,

I am unsure if there's a more direct way but if that has not been implemented, the following way, which is not smart, might help.

one way to do it is:
1. for each site, create a model in the format of nexus where the exchangeability matrix is the one you are going to use, say LG, and the equl freq vector is the site-specific freq obtained from .sitefreq [put it at the last line in the nexus file (see PAML's "dat/.dat")]
2. use "-mdef model.nex -m model"  to import the model
3. iterate the above for each site
one thing you might want to be careful about is that by giving a new Freq the exchangeability matrix R=(r_ij) need to be normalized but i think iqtree will automatically adjust it for you so hopefully no need to worry.

an alternative way is to use
iqtree -m LG+F{F{0.123119/0.019475/0.019852/0.018583/0.018711/0.017275/0.018723/0.050388/0.016402/0.119697/0.161399/0.012776/0.035838/0.057019/0.030913/0.043472/0.049935/0.012600/0.039929/0.133894}

(remember to replace the freq w/ your site freq and do the same for each site)

kindly note that I have tested neither of the above but my gut feeling is that they both work, although not in a very easy way. thx!

best,
sishuo

Mattia Giacomelli

unread,
Apr 10, 2024, 10:00:40 AM4/10/24
to iqt...@googlegroups.com
Dear Sishuo,

thank you very much for your reply. So, if I understood correctly, you mean to create a model file as follows, with the (let's say) LG exchangeability matrix and the freq vector for each site:

Screenshot 2024-04-10 at 15.47.56.png

What do you mean with "3. iterate the above for each site"?
How can I specify that new defined custom models (site_1,site_n) need to be used one for each site?

Thank you very much!

Mattia


--
You received this message because you are subscribed to the Google Groups "IQ-TREE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iqtree+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iqtree/6412a38e-922e-449c-bfe5-ec10e95b1599n%40googlegroups.com.
image.png

Sishuo Wang

unread,
Apr 11, 2024, 9:49:21 PM4/11/24
to IQ-TREE
Dear Mattia,

That's exactly what i meant for strategy 1. To be clearer, you might want to use the pmsf matrix for alisim to create an alignment of say 10 aa (or the min # of sites allowed in alisim) for each site and sample exactly one site from each simulated alignment. So if you originally have 50 sites, then you end up with 50*10 simulated sites with the above strategy and randomly choose exactly one site from each site-specific profile matrix-generated alignment, which will give you a 50-aa alignment. i am unsure if you can get it by merging the all matrices into a single nexus file though, and if not, strategy 2 might be easier I think.

best,
sishuo

Sishuo Wang

unread,
Apr 12, 2024, 4:14:39 AM4/12/24
to IQ-TREE
Dear Mattia,

You are right at poinitng out that the word "iterative" used in my 1st reply is incorrect. I meant "repeating" the same operation for each site. Thanks much!

best,
sishuo

Reply all
Reply to author
Forward
0 new messages