Giter Site home page Giter Site logo

Estimating error around dates? about treepl HOT 8 CLOSED

burbrink avatar burbrink commented on August 11, 2024
Estimating error around dates?

from treepl.

Comments (8)

josephwb avatar josephwb commented on August 11, 2024

FWIW I believe the only route available at the moment is with the tree distribution. This typically involves bootstrap trees, because if you were doing Bayesian analyses you would be using BEAST in the first place! :bowtie:

from treepl.

burbrink avatar burbrink commented on August 11, 2024

Thanks! I figured that was the option.

I suppose I will loop it over the distributions of BS trees then. I guess I could get a Pp distribution on a fixed topology If had to (though for 732 taxa and over 400 loci is not optimal for something like that).

from treepl.

josephwb avatar josephwb commented on August 11, 2024

The tricky bit is to make sure that your constraints (i.e. MRCA statements) are placed consistently on the various trees (I'm sure you know this). In the past I had R code to analyze individual trees and write out individual treePL config files. This would, for example, get rid of redundant constraints. Not too difficult to do, but I can (try to!) find the code and put it in the repo if that would be useful.

from treepl.

burbrink avatar burbrink commented on August 11, 2024

That is for sure an issue.

However, the problem is that with a genomic dataset of this size, I am simply optimizing all of the genome data on the fixed species trees to generate branch lengths in terms of substitution probabilities. I can "easily" generate a distribution of substitution rates on this single species tree, but can't really do anything resembling relaxed phylogenetics. Perhaps this is tense phylogenetics?

from treepl.

josephwb avatar josephwb commented on August 11, 2024

Indeed: the past sure is tense.

Good that you don't have to worry about phylo conflict; will things much easier. Good luck!

from treepl.

burbrink avatar burbrink commented on August 11, 2024

Just a follow up. Say you have your bootstrapped trees (conforming to some species tree) in a folder that also includes your control file (control), the treePL executable, and this loop (treepl_loop.R) then just use this R script to run everything (provided that lambda is the same for each replicate):

x<-list.files()
x<-x[-grep("control",x)]
x<-x[-grep("treePL",x)]
x<-x[-grep("treepl_loop.R",x)]

for(i in 1:length(x)){
y<-readLines("control.txt")
y[1]<-paste("treefile =",x[i])
y[15]<-paste("outfile = outPL_",x[i],sep="")
write(y,"control.txt")
system("treePL control.txt",ignore.stdout = T)
print(i)
}

Co-authored with Marcelo Gehara

from treepl.

josephwb avatar josephwb commented on August 11, 2024

@burbrink That could be useful for running the analyses in parallel (but would require altering your R code from a for loop; not too difficult), but treePL handles multiple trees natively. So you could just do:

cat *.tre > all.trees # if the trees are in different files
treePL control_file # where control_file obviously mentions 'all.trees'

from treepl.

burbrink avatar burbrink commented on August 11, 2024

Good point, I could have just done that with an apply fxn and put in parallel. But this is running lightning fast already (with 8 threads).

I had no idea treePL handled these natively. Reinventing the wheel.

Well kids, that is a good loop for controlling stuff from R anyhow...

from treepl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.