Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge github.com:cboettig/treeBASE

  • Loading branch information...
commit db30c95d7ec68bb34aec69748b53cd8296e6413d 2 parents 70d39bd + 46dfacf
@sckott sckott authored
View
2  DESCRIPTION
@@ -1,4 +1,4 @@
-Package: treebase
+Package: rtreebase
Type: Package
Title: TreeBASE interface
Version: 0.0-2
View
0  demos/examples.R → demo/examples.R
File renamed without changes
View
62 demo/furnariidae.R
@@ -0,0 +1,62 @@
+
+## Log in lab notebook for Reproducible Research
+require(socialR)
+script <- "furnariidae.R" # Must specify the script name!
+gitaddr <- gitcommit(script) # Must commmit at start and store id.
+
+
+
+
+
+require(rtreebase)
+search_treebase("Derryberry", "author")[[1]] -> tree
+metadata(tree$S.id)
+plot(tree)
+
+
+# Other such trees
+#others <- search_treebase("furnariidae", by="taxon")
+
+
+# birth-death study
+require(laser)
+require(TreePar)
+
+tt <- branching.times(tree)
+
+models <- list(pb = pureBirth(tt),
+ bdfit = bd(tt),
+ y2r = yule2rate(tt), # yule model with single shift pt
+ ddl = DDL(tt), # linear, diversity-dependent
+ ddx = DDX(tt), #exponential diversity-dendent
+ sv = fitSPVAR(tt), # vary speciation in time
+ ev = fitEXVAR(tt), # vary extinction in time
+ bv = fitBOTHVAR(tt)# vary both
+ )
+
+aics <- sapply(models, function(x) x$aic)
+models[which.min(aics)]
+
+
+names <- sapply(tree$tip.label, function(input) gsub("_", " ", input))
+#others <- lapply(names, function(n) search_treebase(paste('"', n, '"', sep=""), by="taxon", exact=TRUE))
+
+
+richness=data.frame(tree$tip.label, rep(1, tree$Nnode+1))
+out <- runMedusa(tree, richness=richness )
+
+save(list=ls(), file="furnariidae.Rdat")
+
+png("medusa.png")
+summaryMedusa(tree, richness, out)
+dev.off()
+upload("age.png", script=script, gitaddr=gitaddr)
+
+
+
+
+
+
+
+
+
View
7 demos/long_examples.R → demo/long_examples.R
@@ -52,3 +52,10 @@ write.nexus(tree, file="ref.nex")
system("./raxmlHPC -f e -t ref.nex -m GTRGAMMA -s ref.nex -n output.nex")
+## add MEDUSA and TreePar examples
+
+
+
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.