Functions to analyze Cell-ID's single-cell cytometry data in R, using a tidy and shiny framework.
rcell2
's functionality is split into four packages:
rcell2
package offers functions to load Cell-ID's output to data.frames, and image manipulation based on EBImage. rcell2.cellid
package. It offers functions to run CellID from R, and an rmarkdown template showcasing advanced functionality.rcell2.magick
package provides tools for single-cell image tiling, and graphic filtering apps. It also includes an rmarkdown template with examples and tutorials.rcell2.examples
package contains example images (used by the notebook templates in other packages) and notebooks where we've tested several analyis and classification methods.This package is very well tested in baker's yeast data, and R version 4+.
The typical pipeline:
rcell2.cellid
to segment images.rcell2.magick
to filter cells graphically with Shiny apps, make single-cell image strips, and advanced plots.The concept is straightforward: provide a defocused brightfield image to Cell-ID, and voila:
Segmentation of yeast cells in a single position.
The image is segmented, cells are identified and tracked over time, and features are computed from morphology and fluorescent signal distribution.
Time series images of one cell, showing different acquisition channels.
With Rcell2, you can load an analize the CellID results freely, using standard R packages.
Background corrected fluorescent signal concentration VS time, plotted with ggplot2.
These installation instructions correspond to the rcell2
package.
To get the full functionality of the rcell2 suite, also install:
Most of the dependencies are listed in the DESCRIPTION
file, and should install automatically.
We suggest installing the tidyverse
meta-package (and use it, you'll not regret it) and devtools
:
install.packages(c("tidyverse", "devtools"))
In addition, install EBImage
package (required to look at cells) by copying and running the following script:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("EBImage")
Install the packages using remotes
, directly from the GitHub repos:
# Install the remotes package if absent:
if(!require(remotes)) install.packages("remotes")
# rcell2 package
remotes::install_github("darksideoftheshmoo/rcell2")
# cellid package
remotes::install_github("darksideoftheshmoo/rcell2-cellid")
# shiny-magick package
remotes::install_github("darksideoftheshmoo/rcell2-magick")
Example data and analysis notebooks can be found in the examples package: rcell2.examples
.
This feature is available in the new rcell2.cellid
package.
foreach
.This feature is available in the new rcell2.magick
package.
magick
objects.magick
's functions to manipulate these images.The graphical filter in this app is general purpose (i.e. useful in standard cell cytometry), and the image-manipulation feature is tailored for data from fluorescence microscopy experiments.
We implemented the Hu moments
descriptors in R, and use them on masks generated by CellID. Note that the masks must be generated by the the CellID mask_mod
branch either by TSV output or by encoding CellIDs in the pixel intensities of boundary and/or interior points.
Use the rcell.cellid
package to generate the required input.
The kmeans algotrithm helps filter cells based on clustering of CellID's variables computed from morphological and fluorescence information.
Use k-means and check out images of cells in each cluster. Then, filter them easily by cluster number.
See: ?rcell2::kmeans_clustering
Example image datasets and analysis notebooks can be found in the rcell2 examples companion package: rcell2.examples
.
The extdata/testings
directory holds many rmarkdown notebooks, where we explore different analysis approaches to single cell images and cytometry: