LinguiphyR is a package that provides an R Shiny app that enables parsimony-based linguistic phylogenetic analysis. You can upload a dataset of linguistic characters to the app, run a search to find optimal trees, and analyze the trees using a variety of tools and visualizations.
If you have not installed R and RStudio, please follow the instructions at https://posit.co/download/rstudio-desktop/.
Step 1: Install LinguiphyR
The latest version can be installed from Github in R Studio. You must first install ggtree
from BiocManager
.:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("ggtree")
install.packages("remotes")
remotes::install_github("marccanby/linguiphyr")
The same command may be called to upgrade the package.
Step 2: Install PAUP*
Tree estimation is performed using PAUP*, which must be installed separately:
For Mac:
Click on paup4a168_osx.gz
, which will download a zipped file. Unzip it, and rename the resulting paup4a168_osx
file to paup
.
Move this file to a new directory (e.g. ~/Documents/paup/
) on your computer.
Navigate to this directory, and run chmod a+x paup
to enable executable permissions on the file.
paup
executable in Finder and select Open
to avoid the warning about the software being from an unidentified developer when you later try to call it from the LinguiphyR app.To make this binary available to R, run the following command in R:
Sys.setenv(PATH = paste("~/Documents/paup/:", Sys.getenv("PATH"), sep=""))
Replace ~/Documents/paup/
with the directory where you put the PAUP* binary.
This will only make the binary available for your current R session. If you want to make it permanently available, you can add this line to your R profile file,
which is typically located at ~/.Rprofile
or ~/.Rprofile.site
.
For Windows:
paup4-setup.msi
, follow the directions to install it.Once the software is installed, you can run LinguiphyR with the following commands:
library(linguiphyr)
run_app()
As can be seen in the figure below, you can analyze linguistic datasets simply by interacting with the user interface (UI), which describes the app's various features.
You can run an example tree search and analysis using the ringe_screened_dataset.csv
file contained in the data
folder.
This file contains a dataset in the format expected by LinguiphyR.
The dataset is the screened version of the Indo-European dataset published in Ringe et al., 2002.
Follow these steps:
ringe_screened_dataset.csv
on the "Data Upload" page. After doing so, you can see various statistics about the dataset.If you have any questions or feedback regarding LinguiPhyR, or encounter a bug, please create an issue, or send an email to marc.canby@gmail.com!
We also welcome code contributions from the community. Please adhere to the following guidelines: