KlausVigo / phangorn

Phylogenetic analysis in R
http://klausvigo.github.io/phangorn/
205 stars 38 forks source link

How can I access the probabilities using ancestral pml of entire sequence #132

Open xbonner13 opened 2 years ago

xbonner13 commented 2 years ago

Hello Klaus,

I would like to access the probability values for every site in my alignment. I cannot access the probabilities for every site within my alignment with the command

anc.ml = ancestral.pml(fit, "ml", return = "phyDat") or anc.ml = ancestral.pml(fit, "ml", return = "probs")

It appears when I reference one of the ancestral sequences as a result of the above command (return = "probs"), I only get the site pattern probabilities instead of all the probabilities.

anc.ml$62

I know this because my alignment has approximately 800 sites whereas I get around 190 sites, which is the same number as my site patterns. I also tried to directly output the probabilities to a file with the write.phyDat command but that has not worked for me. Thanks for the awesome program and I hope you can help me.

Cheers,

Xavier