Skip to content

R tools for analyzing cytometry data from microscopy images, based on R-Shiny ImageMagick.

License

Notifications You must be signed in to change notification settings

darksideoftheshmoo/rcell2-magick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rcell2.magick - Magick and Shiny tools for cytometry from microscopy data

This package provides:

  • magick-based functions to prepare tiled images of single cells, over imaging channels and time frames.
  • Shiny apps to filter and annotate cytometry datasets graphically, with live image previews of the cells.

rcell2's full functionality is split into four packages:

  • The main rcell2 package offers functions to load Cell-ID's output to data.frames, and image manipulation based on EBImage. A development version of this package is available in the rcell.dev branch.
  • Cell-ID, the image segmentation software, has been wrapped in the rcell.cellid package. It offers functions to run CellID from R, and an rmarkdown template showcasing advanced functionality.
  • The cell tiling and graphic filtering apps, built on R-Shiny and magick, are available in the rcell.magick package.
  • The rcell2.examples package contains notebooks on general usage, and on several classification and analysis methods.

This package suite is very well tested in baker's yeast data, and R version 4+.

Main functions

Brief description of what the package does, and how to use it.

Usage examples

An Rmd notebook with minimal and detailed usage examples is available.

It is included as an Rmarkdown template, and can also be opened in Rstudio with a convenience function:

get_workflow_template_magick()

This will either copy or download and open a Rmarkdown notebook, with usage examples and brief explanations.

Magick functions

The magick functions display single cell images from microscopy datasets. See:

  • rcell2.magick::magickCell(): main image tile generator.
  • rcell2.magick::cellStrip() and rcell2.magick::cellStrips(): multichannel image strips of single cells (example below).
  • rcell2.magick::square_tile(): square image tile of single cells (example below).
  • rcell2.magick::cellSpread() and rcell2.magick::cellSpreadPlot(): square tile or ggplot object, showing samples images of cells, 2D-binned over custom variables.

analisis_Far1_arresto-lavado-ucid20254_PRE_a502060358b

Cell strip.

image

Spread plot.

Shiny apps

  • rcell2.magick::shinyCell(): An R-Shiny app will help users filter data graphically, with live image previews. This app is general purpose (i.e. useful in standard cell cytometry).
  • rcell2.magick::tagCell(): app to "tag" single cells in the dataset with user defined options.
  • rcell2.magick::plotApp(): a small app to filter a dataframe graphically.

image

shinyCell

image

tagCell

Installation

R Dependencies

Most of the dependencies are listed in the DESCRIPTION file, and should install automatically.

In a Mac OS computer, the binary magick package may fail to annotate images, with the following error message:

Error: rsession-arm64: NonconformingDrawingPrimitiveDefinition `text' @ error/draw.c/RenderMVGContent/4456

To fix this, re-install the magick package "from source". This requires the ImageMagick library to be installed in your system, as described below.

System dependencies

Install imagemagick on your system; this is required by R's magick package. All the major operating systems are supported by ImageMagick. See: https://imagemagick.org/script/download.php

macOS

To install ImageMagick in macOS you will need to:

More information at: https://imagemagick.org/script/download.php

Linux

For Ubuntu and Arch Linux these commands may come in handy:

# Aptitude
sudo apt install imagemagick libmagick++-dev

# Pacman
sudo pacman -S imagemagick

Installing the package

Install the package using remotes. This will fetch the latest version directly from its GitHub repository:

remotes::install_github("darksideoftheshmoo/rcell2-magick")

'Automating' comes from the roots 'auto-' meaning 'self-', and 'mating', meaning 'screwing'.

About

R tools for analyzing cytometry data from microscopy images, based on R-Shiny ImageMagick.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages