dsilvestro / fossilbm Goto Github PK
View Code? Open in Web Editor NEWBayesian inference of trait evolution under a “fossilized” Brownian motion.
Home Page: https://academic.oup.com/sysbio/advance-article/doi/10.1093/sysbio/syy046/5040681
Bayesian inference of trait evolution under a “fossilized” Brownian motion.
Home Page: https://academic.oup.com/sysbio/advance-article/doi/10.1093/sysbio/syy046/5040681
Dear Professor:
Thank you very much for developing the FossilBM package, which has been of great help to my biogeographic research. However, there are some problems recently when using the script in github to run example data. I would like to ask you:
run_FBD.r
>fbm_obj <- read_and_transform_data(treefile, datafile, log_trait_data=10)
Warning messages:
1: In treedata(t, trait) :
The following tips were not found in 'data' and were dropped from 'phy':
Aotus_infulatus
Callicebus_coimbrai
Callicebus_nigrifrons
Chiropotes_israelita
Saguinus_graellsi
Saguinus_martinsi
Saguinus_melanoleucus
Saguinus_tripartitus
Sapajus_robustus
2: In treedata(t, trait) :
The following tips were not found in 'phy' and were dropped from 'data':
Aotus_brumbacki
Aotus_zonalis
Callicebus_discolor
Callicebus_medemi
Callicebus_ornatus
Callithrix_flaviceps
Cebus_aequatorialis
Chiropotes_albinasus
Lagothris_poeppigii
Lagothrix_flavicauda
Lagothrix_lugens
Leontopithecus_caissara
Mico_melanurus
Mico_nigriceps
Pithecia_aequatorialis
Pithecia_albicans
Saguinus_inustus
Saguinus_leucopus
Saimiri_vanzolinii
Sapajus_nigritus
So, I deleted the unmatched samples in platyrrhine_FBD.trees and platyrrhine_bodymass.txt so that the samples in both files were the same. Ultimately, this step was successful.
Then, drawing failed
>plot_time_varying_trend(fbm_obj, output_file, resfile="trends.pdf")
Error in plot.window(...) : need finite 'ylim' values
6. plot.window(...)
5. localWindow(xlim, ylim, log, asp, ...)
4. plot.default(time_axis, res[1, ], ylab = ylab, xlab = "Time", type = "n", ylim = c(min(res), max(res)), main = main)
3. plot(time_axis, res[1, ], ylab = ylab, xlab = "Time", type = "n", ylim = c(min(res), max(res)), main = main) at fossilBM_lib.R#1325
2. plot_res_trend(res, time_axis, ylab = "Change in expected phenotype (y_t)",
main = paste0("Partition ", i)) at fossilBM_lib.R#1369
Then I saved the file as platyrrhine_bodymass_img.rda (although there is no such command in the code) and tried extract_ancestral_state_time.R, but many problems occurred:
#setwd("/Volumes/DSILVESTRO/data/fossilizedBM/EMPIRICAL_ANALYSIS/FBM20170316/latitude/")
#setwd("/Volumes/DSILVESTRO 1/platy_log_files/bodymass")
setwd("/Users/danielesilvestro/Desktop/platy_log_files/bodymass")
setwd("/Users/danielesilvestro/Desktop/platy_log_files/latitude")
setwd("/Users/danielesilvestro/Desktop/platy_log_files/bodymass_nofoss")
setwd("/Users/danielesilvestro/Desktop/platy_log_files/latitude_nofoss")
[1] "platyrrhine_bodymass_img.rda"
Error: object 'tree' not found
I changed the phy=tree in the script to phy=fbm_obj$tree, but the error continued:
[1] "platyrrhine_bodymass_img.rda"
Error in sample.int(x, size, replace, prob) :
cannot take a sample larger than the population when 'replace = FALSE'
………………
According to the script and example data, it seems that it cannot run properly. Looking forward to your reply, thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.