Skip to content
Data set and R code for running stochastic character mapping to reconstruct the evolution of air-breathing and amphibious behaviour in fishes.
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ABF_full mac.R
Data Set 1.xlsx
PFC_short_classification.csv
README.md
counts_bpp_LS.txt
counts_bpp_Organ.txt
mcc.nexus
times_bpp_LS.txt
times_bpp_Organ.txt

README.md

Evolution-of-air-breathing

Data set and R code for running stochastic character mapping to reconstruct the evolution of air-breathing and amphibious behaviour in fishes.

Before running the scripts, you should do the following

  1. Make an new folder that will be the working directory and specify its path here setwd("/Users/christiandamsgaard/Dropbox/Projects/Air-breathing review_full/")

  2. Download, unzip and paste "Complete “all-taxon assembled” chronograms" and "PFC_short_classification.csv" from "https://fishtreeoflife.org/downloads/" into the working directory. To save time, you can further download the maximum clade credibility tree "mcc.nexus", and outputs from sections 1 and 3 called "times_bpp_Organ.txt","counts_bpp_Organ.txt","times_bpp_LS.txt","counts_bpp_LS.txt"

  3. Download and paste "Data Set 1.xlsx" into the working directory.

  4. Within the working directory folder make a folder called "Figures".

  5. Install the packages specified under ## LOAD PACKAGES ## using the "Tools" --> "Install Packages..." option.

To prepare running the model, first run the lines from the sections #### LOAD PACKAGES, COLOR SCHEMES, FUNCTIONS, IMPORT TREES, IMPORT DATA #### From there, you can run modelling within section 1-2 on air-breathing evolution or section 3-4 on amphibious evolution. Sections 1-2 and sections 3-4 are followed by lines that code the figures. Sections 1-2 and sections 3-4 each take up ~ 10GB ram, so if your computer has < 16GB memory, consider running Sections 1-2, plot the associated data, and shut down R to clear the memory. Then re-open R, and run sections 3-4, plot the associated data.

You can’t perform that action at this time.