This repository contains the source code and data for the manuscript "An update of the Pteridophyte Phylogeny Group classification for extant ferns and lycophytes: PPG II" (submitted).
The Pteridophyte Phylogeny Group (PPG) is an international collaborative effort to develop a comprehensive and phylogenetically-based classification of ferns and lycophytes. This repository contains all code and data needed to reproduce the manuscript describing PPG II, an updated classification building on PPG I (2016).
ppg2_ms.Qmd: Main manuscript file (Quarto format)fig_s1.qmd,table_s1.qmd: Supplementary materialsR/: R code for data processing and analysisfunctions.R: Custom functions for taxonomy processing, plotting, and phylogenetic tree manipulationpackages.R: Package dependencies
data/: Input data filescommenters.csv: List of GitHub users who commented on taxonomic proposalscompare_ppg_wf_2025-12-21.csv: Comparison between PPG II and World Fernsppg2_author_list.csv: List of manuscript authorsppg_comments.csv: Comments and notes for specific taxappg_issues.csv: Taxonomic proposals from GitHub Issues with voting outcomesppg_issues_type.csv: Categorization of taxonomic proposal types (split, lump, etc.)ppgi_taxonomy_original.csv: Original PPG I classification (2016)species_count_updates.csv: Manual corrections to species countstable_uncertainty.csv: Descriptions of uncertain phylogenetic nodesvoting_results.csv: Vote tallies and results for each taxonomic proposalwf_taxa_count.csv: Taxon counts from World Ferns database
tests/: Unit tests for data validation_targets.R: Main workflow orchestration using thetargetspackage_targets_pre.R: Pre-workflow for generating data files from raw data (not all raw data made public due to personally identifiable information)images/: Image files used in the manuscript (not figures produced by analysis)renv.lock: Package dependency specification for reproducibilityDockerfile: Docker image specification for containerized reproducibility.dockerignore: Files to exclude from Docker build context.github/workflows/: GitHub Actions workflowsdocker-build.yml: Automated Docker image building and publishing
This project uses the targets
package for reproducible workflow management. The workflow automatically:
- Downloads the latest PPG taxonomy from the PPG repository
- Fetches and processes taxonomic proposals from GitHub Issues
- Validates taxonomic changes against the previous classification
- Generates figures and tables
- Renders the manuscript
Once the workflow has successfully finished, the following files should be produced:
ppg2_ms.docx: Manuscript filefig_1.pdf: Figure 1fig_2.pdf: Figure 2fig_s1.pdf: Figure S1table_s1.pdf: Table S1
All R package dependencies are managed with renv and recorded in
renv.lock.
To reproduce the analysis and manuscript:
# Install renv if needed
install.packages("renv")
# Restore the package environment
renv::restore()- Run the workflow:
# Run the workflow
targets::tar_make()The manuscript and figures will be generated automatically by the workflow.
For improved reproducibility, you can use Docker to run the analysis in a containerized environment with all dependencies pre-installed:
# Clone the repository
git clone https://github.com/pteridogroup/ppg2-ms.git
cd ppg2-ms
# Pull the pre-built Docker image
docker pull joelnitta/ppg2-ms:latest
# Run the workflow (must be run from the repository directory)
# For Apple Silicon (M1/M2/M3) Macs, add --platform linux/amd64
docker run --rm -v $(pwd):/project joelnitta/ppg2-ms:latest
# Or run interactively
docker run --rm -it -v $(pwd):/project \
--entrypoint bash joelnitta/ppg2-ms:latest
# Then inside the container, start R:
# R
# The .Rprofile will automatically activate renvDocker Notes:
- The Docker command must be run from the cloned repository directory, as it mounts the current directory into the container.
- Apple Silicon (M1/M2/M3) Users: The image is built for
linux/amd64architecture. When Docker emulates x86_64 on Apple Silicon, Pandoc has extreme memory overhead (9+ GB spikes). You need to:- Increase Docker Desktop memory: Settings → Resources → Memory → set to at least 12-16 GB
- Add
--platform linux/amd64if you encounter "Function not implemented" errors:docker run --rm --platform linux/amd64 -v $(pwd):/project \ joelnitta/ppg2-ms:latest
The Docker image includes:
- R 4.5.0
- Quarto (pre-installed from rocker/verse base image)
- All R package dependencies from
renv.lock - Required system libraries
The Docker image is automatically built and pushed to Docker Hub via GitHub Actions whenever:
- Changes are pushed to
mainbranch that affectDockerfileorrenv.lock - A new release is published
- Manually triggered via GitHub Actions
Setup (one-time):
Add Docker Hub credentials as GitHub repository secrets:
- Go to Settings → Secrets and variables → Actions
- Add
DOCKER_USERNAME(your Docker Hub username) - Add
DOCKER_PASSWORD(your Docker Hub access token)
Manual build (if needed):
# Build locally
docker build -t joelnitta/ppg2-ms:latest .
# Push to Docker Hub (requires docker login)
docker push joelnitta/ppg2-ms:latestThis repository contains the manuscript code. For taxonomic proposals and discussions, please visit the main PPG repository.
The code in this repository is licensed under the MIT License. Please cite the published manuscript when using this work.
This is a collaborative work by the Pteridophyte Phylogeny Group. See the manuscript for the complete author list.
Citation information will be added upon publication.
For questions about the manuscript or code, please open an issue in this repository.