neherlab / treetime

Maximum likelihood inference of time stamped phylogenies and ancestral reconstruction
MIT License
222 stars 55 forks source link

Tree is showing points in the future #145

Open Vatsalars opened 3 years ago

Vatsalars commented 3 years ago

Hi, I started using treetime recently and some of my trees look like this, while the others look fine. My sample size is 25 and here is an example code that I used. treetime --tree VREst18_clonalframe.labelled_tree.newick --aln VREst18.clonalframe.aln --dates vrest18_date.csv --reroot least-squares | tee logtimetree.txt VREST_18 looks fine but not VREST_17

Also, How does it calculate something as an outlier?

treetime issue.pptx

rneher commented 3 years ago

treetime has determined that three of your tips don't fit the molecular clock well enough and has discarded their dates. You should be able to force include them by passing the argument --clock-filter 0 to the command.

Vatsalars commented 3 years ago

Hi,

Thanks for your email. I tried running the script with "--clock-filter 0" flag. The tree looks fine when I add the flag, but the regression plot shows the root-date sometime in future. Also, for some of the files I cannot use the "--reroot least-squares" flag. I will have to run it with "--keep-root". Please let me know if there is a way to solve both these issues.

this is the code I used to create the two attached files: treetime --tree CD_ST1_clonalframe.labelled_tree.newick --aln CD_ST1.clonalframe.aln --dates CDst1.csv --keep-root --clock-filter 0 | tee logtimetree.txt

Thanks again, Vatsala


From: Richard Neher notifications@github.com Sent: Thursday, March 4, 2021 4:38 PM To: neherlab/treetime treetime@noreply.github.com Cc: Rangachar Srinivasa, Vatsala VAR35@pitt.edu; Author author@noreply.github.com Subject: Re: [neherlab/treetime] Tree is showing points in the future (#145)

treetime has determined that three of your tips don't fit the molecular clock well enough and has discarded their dates. You should be able to force include them by passing the argument --clock-filter 0 to the command.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fneherlab%2Ftreetime%2Fissues%2F145%23issuecomment-790962450&data=04%7C01%7Cvar35%40pitt.edu%7C8e5943eb29f9442fff4508d8df55ce59%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637504906929505685%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cQurRzPaCqVxIZBuT%2FBlxLM4nmvKXPp4gIcTNDISQO4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAS4O75ZP5QWUZQQG3YXICXLTB74UDANCNFSM4XZD5PWQ&data=04%7C01%7Cvar35%40pitt.edu%7C8e5943eb29f9442fff4508d8df55ce59%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637504906929515644%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xRereo2J6o7aBCDxkxmuq%2BIJWq2a6f5TJQrnDXOLKwc%3D&reserved=0.

rneher commented 3 years ago

The data you have has very faint temporal signal and there are some outliers that don't really fit the molecular clock. Appropriate rooting in this case is almost always going to be the midpoint. What exact error are you running into when using --reroot least-squares?