Skip to content

Data and R scripts that allows to fully reproduce the analysis presented in the manuscript entitled "There and Back to the Present: An Evolutionary Tale on Biological Diversity"

Notifications You must be signed in to change notification settings

GabrielNakamura/Data_MS-mcfly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcfly logo

There and back to the present: a model-based framework to estimate phylogenetically constrained alpha diversity gradients

DOI:10.1101/2021.12.11.472171

DOI

Authors

Leandro Duarte, Gabriel Nakamura, Vanderlei Debastiani, Renan Maestri, Maria João Veloso da Costa Ramos Pereira, Marcus Cianciaruso, José Alexandre F. Diniz-Filho

Repository overview

This repository contains data and R scripts that allows to reproduce the analyses presented in the manuscript entitled “There and back to the present: a model-based framework to estimate phylogenetically constrained alpha diversity gradients”, in which we introduce an individual-based simulation approach coupled with Approximate Bayesian Computation (ABC) that allows to parameterize adaptation rates of species niche positions along the evolution of a monophyletic lineage, as well as the intensity of dispersal limitation between local assemblages potentially connected by dispersal (metacommunity). The analytic tool was implemented in an R package called mcfly. A preprint version of this work can be found here.

Obs -The preprint does not correspond to the most updated version of the study.

If you want to use this repository you can clone or download to your computer machine using the following code:

To clone using github from command line:

git clone https://github.com/GabrielNakamura/Data_MS-mcfly your_repo_title

To download using R:

download.file(url = "https://github.com/GabrielNakamura/Data_MS-mcfly/archive/main.zip", destfile = "Data_MS-mcfly.zip")

Repository structure

The script and data are organized in folders containing files that are described in the next section.

R folder

The R folder contains all the scripts needed to read data and libraries and running the analysis contained in the manuscript.

  • read_data_libraries.R reads and proccess data before running the analysis for the real communities (Phyllostomidae communities)

  • Phyllostomidae.R perform mcfly analysis using data from Phylostomidae communities accordingly to the parameters passed to mcflyfunction

  • RunSimTest_mcfly.R contains an R function used to perform the simulations used in this study

  • SimulatedData_mcfly.R calls RunSimTest_mcfly.R function to run the simulation using five degrees of dispersal parameter (w)

data folder

The data folder contains all data necessary to run the analysis with empirical communities (using Phylostomidae communities).

  • comm_phyllostomidae_final.txt is a community matrix with species in the columns and assemblages in the rows

  • tree_phyllostomidae_final.tre is a newick file containing the phylogenetic tree

  • grid_data.txt is a txt file containing coordinates (coords.x1 and coords.x2) and environmental variables used in the analysis of Phylostomidae dataset

    • Elevation - elevation in meters
    • Elev_range - elevation range in meters
    • Temp - mean annual temperature in Celcius
    • Temp_Seas - temperature seasonality as coefficient of variation in temperature for a year
    • Prec - mean anual preciptation in mm
    • Prec_Seas - precipitation seasonality as coefficient of variation in precipitation for a year

figs folder

This folder contains all Figures presented in the manuscript. All the Figures were made using DataGraph software, however all data needed to construct the same figures can be obtained by running the analysis.

Additional software

As an additional tool we developed the R package mcfly. The latest development version of the package can be downloaded using:

devtools::install_github(repo = "GabrielNakamura/mcfly", ref = "master")

Important: All analyses described in the preprint was done using previous versions of mcfly

Additionaly to R, DataGraph software was used to produce all the Figures present in the manuscript. Files used in additional software can be found in DataGraph folder.

Getting help

If you find a problem or a bug, please open an Issue at GitHub with a minimal reproducible example.

About

Data and R scripts that allows to fully reproduce the analysis presented in the manuscript entitled "There and Back to the Present: An Evolutionary Tale on Biological Diversity"

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages