Skip to content

TheJacksonLaboratory/envisionR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envisionR

envisionR is an R package designed to facilitate the analysis of experimental data exported from the JAX Envision™ software. This package provides tools for data wrangling, quality control, visualization, and statistical analysis of high-throughput phenomics data.

Installation

You can install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("TheJacksonLaboratory/envisionR", build_vignettes = TRUE)

Usage

Loading the Package

library(envisionR)

Generating JAX Envision URLs

Create URLs to visualize specific moments of video flagged in an analysis:

safety_vidstart <- as.POSIXct("2024-06-15 09:00:00", tz = "US/Central")
envisionR::make_envision_url(org = 9, study = 237, cage = 1819, vidstart = safety_vidstart)

Data Wrangling and Quality Control

Import and clean your data using envisionR functions:

# Importing libraries
library(tidyverse)
library(janitor)
library(ggplot2)
library(here)
library(envisionR)

# Importing annotation data
metadata <- envisionR::envision_metadata(study_name = "Two Drug Study", tzone = "US/Central", lights_on = "06:00:00", lights_off = "18:00:00", study_url = "https://app.murine.net/org/9/study/237/")
annotation <- envisionR::read_annotation_csv("../data/annotation.csv", metadata = metadata)

Initial Data Visualization

Visualize your data with built-in plotting functions:

# Spaghetti plot
spaghetti_plot(activity_data = activity, metadata = metadata, yvar = "movement_mean_per_cage_cm_s_hour", occupancy_norm = TRUE) + ggokabeito::scale_color_okabe_ito(order = okabe_order)

Statistical Analysis

Perform statistical tests and visualize results:

# ANOVA
activity_4hr_post_dose_aov <- aov(baseline_subtract_postdose_0to4hr ~ group_name, data = activity_1min_summarize)
summary(activity_4hr_post_dose_aov)

# Dunnett's Test
library(DescTools)
DunnettTest(x = activity_1min_summarize %>% dplyr::pull(baseline_subtract_postdose_0to4hr), g = activity_1min_summarize %>% dplyr::pull(group_name), control = "Vehicle (0 mg/kg)")

Vignettes

Detailed walkthroughs and examples are available in the package vignettes. To view the vignettes, use:

browseVignettes("envisionR")

Contributing

We welcome contributions to the envisionR package. Please fork the repository and submit pull requests for any enhancements or bug fixes.

License

This package is licensed by The Jackson Laboratory under the GNU General Public License v3.0.

Copyright (C) 2025, The Jackson Laboratory.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Acknowledgements

This package was developed by Michael C. Saul, Computational Scientist at The Jackson Laboratory.

About

R library for analysis of datasets from the JAX Envision™ platform

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors