Skip to content

Repository files navigation

ShinyNeurons

A Shiny app for mammalian brain cell-count scaling by phylogenetic generalized least squares (PGLS). Pick an X and a Y variable (any region × measure — mass, neurons, non-neuronal cells, densities), optionally restrict/colour by taxonomic Order, and predict Y from an entered X. The footer cites the exact data sources behind the current view.

App: [shinyapps.io link here]

What's in this folder

The app (everything it needs at runtime):

File Role
app.R the Shiny application
cellcounts_wide.csv compiled cell-count data, one row per species
cellcounts_long.csv same data in long form with a Source column (for the per-view citations)
species.nwk phylogeny (Newick)
species_order.csv Species → Order/Family lookup (for the Order filter)

data-prep/ — how the tree & orders were made (not needed to run the app):

setup.R (regenerates species.nwk + species_order.csv from published sources), the source inputs (base_tree.nex, the VertLife tree-pruner-*.zip, the Upham taxonomy Data_S1_*.zip, species_list_vertlife.txt), the diagnostic tree plots, and TREE_README.md (full provenance + all citations with DOIs).

build_tree.R and make_species_order.R at the top level are deprecated stubs (the two scripts are now combined in data-prep/setup.R) — safe to delete, along with .DS_Store / .Rhistory / .Rproj.user.

Run it locally

shiny::runApp()        # from this folder

Needs: shiny, ggplot2, caper (pulls in ape), dplyr.

Publish to shinyapps.io

rsconnect::deployApp(".")

.rscignore keeps the bundle minimal — only app.R + the four data files are uploaded; data-prep/ and the big source zips are not.

Rebuild the tree / orders (optional, reproducible)

  1. Put the inputs in data-prep/ (a VertLife tree-pruner-*.zip from https://vertlife.org/phylosubsets/ using species_list_vertlife.txt, and the Upham taxonomy Data_S1_*.zip from Dryad https://doi.org/10.5061/dryad.tb03d03).
  2. Open data-prep/setup.R, set the working directory to data-prep/, and run it. It writes species.nwk + species_order.csv back here and the tree plots in data-prep/.

Sources (short)

Phylogeny & taxonomy: Upham, Esselstyn & Jetz (2019), PLOS Biology 17:e3000494 (https://doi.org/10.1371/journal.pbio.3000494). Cell-count data compiled by A. de Sousa from Herculano-Houzel et al. 2015/2020, Avelino-de-Souza et al. 2025, Dos Santos et al. 2017/2020, Jardim-Messeder et al. 2017, Kverková et al. 2018, Burish et al. 2010. Full citations with DOIs and per-graft references: data-prep/TREE_README.md. The app footer also lists, per view, the exact sources behind the plotted variables.

Data-quality guard

A brain region can't outweigh the whole brain, so for sub-region mass variables the app drops any species whose region mass exceeds whole-brain mass and reports the count (a safety net against source-unit errors). Subspecies in the data are represented by their species-level tip and averaged there.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages