An R package that utilizes Shiny to provide a user interface for statistical analysis of two-dimensional confocal microscope images. Users can upload two images directly or a folder of images with the help of a user-generated csv file, edit their experimental design, create tables and graphs for analysis results, and generate a fully-formatted report of their experiment. For more information on BASIN, check out our documentation site. For tutorials on the BASIN workflow and running the application, check out the playlists on our YouTube channel.
A simplified version of BASIN is available through shinyApps at both https://basin.bicbioeng.org/ and http://bicbioeng.shinyapps.io/tryBASIN. This version only takes in 2 images, but the workflow is nearly identical to the complete version and serves as a gentle tutorial to most of BASIN's features. Note that for the full version of BASIN requires the user to download a csv containing the names of the images uploaded and assign 'control' and 'test' bioconditions manually, in addition to experiment number(s), which must be positive integers only.
Install the required R and Bioconductor packages using the following commands:
install.packages(c("purrr", "plyr", "shiny", "shinyBS", "shinyjs", "shinydashboard", "shinycssloaders", "shinythemes", "shinyWidgets", "DT", "stringi", "ggpubr", "tcltk", "autothresholdr"))
if (!requireNamespace("BiocManager", quietly = TRUE))
\
install.packages("BiocManager") #installs Bioconductor
\
BiocManager::install("EBImage") #installs EBImage
BASIN-ML leverages machine learning for improved cell segmentation. This module requires both Python and R, as well as an extremely specific Python environment setup in order to function properly. Reference to external documentation is required, although we have provided all necessary links below.
cd path\to\folder\...
conda env create -f full_environment.yml
- this will take a few minutespip install cellpose --upgrade
conda activate basin
python -m cellpose
python -m cellpose
in the Anaconda terminal. Note that any time you open a new Anaconda terminal, you will have to re-run the conda activate basin
command in order to activate your cellpose environment.Make sure you have the latest version of R and Rstudio installed on your computer (free and open-source, available online). Rstudio is an IDE for the R programming language, and all successive steps should be ran through the Rstudio terminal.
Install the required R and Bioconductor packages:
install.packages(c("purrr", "plyr", "shiny", "shinyBS", "shinyjs", "shinydashboard", "shinycssloaders", "shinythemes", "shinyWidgets", "DT", "stringi", "ggpubr", "tcltk", "autothresholdr"))
if (!requireNamespace("BiocManager", quietly = TRUE))
\
install.packages("BiocManager") #installs Bioconductor
\
BiocManager::install("EBImage") #installs EBImage
Install the reticulate, keras, and tensorflow packages in RStudio using
install.packages(c(“reticulate”, “keras”, “tensorflow”))
Test the ability for the packages to connect to the Python environment:
library(reticulate)
\
env <- conda_list()$name == "basin"
\
envPath <- conda_list()[env,]$python
\
envPath <- stringi::stri_replace(envPath,"",regex = "python.exe")
\
reticulate::use_condaenv(envPath, required=TRUE)
\
keras::use_condaenv(envPath, required=TRUE)
\
tensorflow::use_condaenv(envPath, required=TRUE)
Details on the features and functionality of BASIN can be found in the BASIN
vignette, which is accessible through the package itself. To install BASIN
in R, download the tarball file BASIN_0.99.0.tar.gz into your local machine
and use the command install.packages("path/to/BASIN")
, replacing the
"path/to/BASIN" with the location of the file. Once installed, load the
package using library(BASIN). The package vignette can be accessed using the
command browseVignettes("BASIN")
and will contain further instructions on
using the package.