Computerized osteometric sorting application built with R/Shiny and Julia. OsteoSort uses statistical methods to compare skeletal measurements against reference populations, aiding in the reassociation of commingled remains.
Key Features:
- Pair-matching — statistical comparison of bilateral skeletal elements
- Articulation — assessment of joint congruence between adjacent bones
- Osteometric sorting by regression — size-based reassociation using OLS regression
- Interactive Plotly visualizations with CSV export
- PostgreSQL-backed reference populations (ARDS)
| Layer | Technology |
|---|---|
| Frontend | R/Shiny UI |
| Backend (statistical) | R + Julia (compiled shared library) |
| Database | PostgreSQL (ARDS) |
| Deployment | Docker (two-stage build) |
| Julia compilation | PackageCompiler.jl (create_library) |
- Docker
- A running PostgreSQL instance with the ARDS osteometry schema
- A
.envfile insideOsteoSort/with database credentials:DB_HOST=<host> DB_PORT=<port> DB_USER=<user> DB_PASS=<password> DB_NAME=<database>
git clone https://github.com/dpaa-gov/OsteoSort
cd OsteoSort
docker build -t osteosort .
docker run --restart=on-failure:10 --name=osteosort -d -p 4001:3838 osteosort
docker network connect app_bridge osteosort The app will be available at http://localhost:4001/OsteoSort.
- R 4.x with packages listed in Dependencies
- Julia 1.11+ (for building the shared library)
- GCC (for building the C shim)
- PostgreSQL client library (
libpq-devon Debian/Ubuntu) .envfile inOsteoSort/with DB credentials (see Prerequisites)
# Build libosj.so
julia --project=OSJ build/create_library.jl
# Build C shim
gcc -shared -fPIC -o build/r_osj_shim.so build/r_osj_shim.c \
-L dist/libosj/lib -losj -Wl,-rpath,$(pwd)/dist/libosj/libLD_LIBRARY_PATH=dist/libosj/lib:dist/libosj/lib/julia Rscript start_dev.RThe app will open at http://127.0.0.1:4001.
OsteoSort/
├── Dockerfile # Two-stage: builder compiles .so, runtime is lean
├── start_dev.R # Local dev server launcher
├── shiny-server.conf
├── OsteoSort/ # Shiny application
│ ├── server.r # Server entry point (loads osj.r, calls osj_load())
│ ├── ui.r # UI entry point
│ ├── R/ # Analytical R functions
│ │ ├── osj.r # Shared library interface (dyn.load + wrappers)
│ │ ├── ttest.r # T-test analysis (calls osj_ttest)
│ │ └── reg.test.r # Regression analysis (calls osj_regsl)
│ ├── server/ # Server modules (reference, single, files, etc.)
│ ├── ui/ # UI modules
│ ├── extdata/ # Config files (articulation_config, etc.)
│ └── www/ # Static assets (CSS, JS, images)
├── OSJ/ # Julia analytical package
│ ├── Project.toml
│ └── src/
│ ├── OSJ.jl # Module definition
│ └── c_api.jl # @ccallable wrappers for R .C() interface
├── build/ # Build scripts
│ ├── create_library.jl # PackageCompiler library build
│ ├── library_precompile.jl
│ └── r_osj_shim.c # C shim for init_julia ABI bridging
└── dist/ # Build output (gitignored)
└── libosj/
└── lib/libosj.so
| Package | Purpose |
|---|---|
| shiny | Web framework |
| htmltools | HTML generation |
| DT | Interactive data tables |
| dplyr | Data manipulation |
| shinyalert | Alert dialogs |
| DBI | Database interface |
| RPostgres | PostgreSQL driver |
| dotenv | Environment variable loading |
| plotly | Interactive plots |
| Package | Purpose |
|---|---|
| Statistics | Statistical functions |
| Optim | Optimization |
| Rmath | R math distributions |
| GLM | Generalized linear models |
- Alex Moore — UI styling suggestions and design inspiration
Lynch, J.J. 2026 OsteoSort. Computerized Osteometric Sorting. Version 1.5.0. Defense POW/MIA Accounting Agency, Offutt AFB, NE.
- User beta testing
- Replace
.envfile with injected environment variables
GNU General Public License v2.0
