This repository contains source code associated with the manuscript:
How important are functional and developmental constraints on phenotypic evolution? An empirical test with the stomatal anatomy of flowering plants. The American Naturalist. 201(6): 794-812.
Christopher D. Muir designed the study, compiled data, analyzed data, and wrote the manuscript with input from all authors.
These authors contributed data:
- Miquel Àngel Conesa
- Jeroni Galmés
- Varsha S. Pathare
- Patricia Rivera
- Rosana López Rodríguez
- Teresa Terrazas
- Dongliang Xiong
This repository has the following file folders:
alignments: output (sequence alignments and partitions) from PyPHLAWD for tree inference using RAxMLfigures: figures generated from R codeobjects: saved objects generated from R codeprocessed-data: processed data generated from R codems: manuscript input (e.g.ms.Rmdandstomata-independence.bib) and output (e.g.ms.pdf) filesr: R scripts for all data processing and analysisraxml: output from tree inference using RAxMLtemplate: manuscript style files
To run code and render manuscript:
- R version >4.1.0 and RStudio
- LaTeX: you can install the full version or try tinytex
- GNU Make: In terminal, you can just type
make paperto render the manuscript. You can also use it to re-run all scripts.
Before running scripts, you'll need to install the following R packages:
source("r/install-packages.R")
To fit brms model, set up cmdstanr.
To infer phylogenies in RAxML using code in script raxml/run-raxml.sh, you will need to follow instructions to install raxmlHPC-PTHREADS-SSE3 here: RAxML
Not recommended: To get sequence clusters and alignments using PyPHLAWD, you will need to follow directions to set up PyPHLAWD, blast, and download the GenBank plant and fungal sequence data base. Scripts for this are not in this repository because they require a bunch of dependencies to work and the database is too large. However, the output is deposited here for inspection.
- Download or clone this repository to your machine.
git clone [email protected]:cdmuir/stomatal-independence.git
- Open
stomatal-independence.Rprojin RStudio
At minimum, you will need R version 4.0 or greater installed on your machine. Install additional packages by running r/install-packages.R.
Open ms/ms.Rmd and knit using RStudio.
You can also run the following code from the R console:
rmarkdown::render(
input = "ms/ms.Rmd",
output_dir = "ms"
)
or use make
make paper
You can re-run all analyses, figures, etc. using GNU make. Type make --version in a terminal/shell to see if it is already installed.
# Clear out previously saved output
make cleanall
# This will take a long time to run
make