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

How to extract inferred branch lengths? #5

Open
leonkt opened this issue Dec 6, 2022 · 1 comment
Open

How to extract inferred branch lengths? #5

leonkt opened this issue Dec 6, 2022 · 1 comment
Labels

Comments

@leonkt
Copy link

leonkt commented Dec 6, 2022

I am using the following commands to generate the stan script, and run the stan script respectively:

phylostan build -s sample.stan -m JC69 -C 4 --estimate_rate --clock strict --coalescent constant
phylostan run -s sample.stan -m JC69 -C 4 --estimate_rate --clock strict --coalescent constant -i out.fasta -t sample_newick.newick -o sample -q meanfield

I would expect that there are branch lengths from the bottommost tree in sample.trees, as given below, but, there are none.

I've also tried looking in the file populated in the -o flag of the run command, labelled as VB samples below. I have fewer than 10 sequences, yet there are 10 nonzero branch lengths in the VB samples file, so I am not sure what to make of this. Is there another place that I can get inferred branch lengths? Or is there something I'm doing incorrectly?

Original data
VB samples
Script generated using build
Tree topology
sample.trees

@4ment
Copy link
Owner

4ment commented Dec 7, 2022

Hi @leonkt -- you can find the branch lengths in terms of expected number of substitutions per site in the sample.txt file. They are labelled blensUnscaled.1, blensUnscaled.2,...,blensUnscaled.10.
Since it is a time tree the branch lengths in samples.trees file should be in unit of time (e.g. years). I said should because there was bug and every branch length was equal to 0. It is fixed now so please use the latest version of phylostan.

@4ment 4ment added the bug label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants