<img src="vignettes/imgs/cytoviewer_sticker.png" align="right" alt="" width="100" />
# cytoviewer
<!-- badges: start -->
[![docs](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/docs.yml/badge.svg)](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/docs.yml)
[![codecov](https://codecov.io/gh/BodenmillerGroup/cytoviewer/branch/devel/graph/badge.svg)](https://app.codecov.io/gh/BodenmillerGroup/cytoviewer/tree/devel)
<!-- badges: end -->
An interactive multi-channel image viewer for R.
This shiny application allows users to interactively visualize
multi-channel images and segmentation masks generated by imaging mass
cytometry and other highly multiplexed imaging techniques. The
`cytoviewer` package is divided into image-level (Composite and
Channels) and cell-level visualization (Masks). It allows users
to overlay individual images with segmentation masks, integrates well
with [SingleCellExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html) / [SpatialExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html)
and [CytoImageList](https://www.bioconductor.org/packages/release/bioc/html/cytomapper.html)
objects for metadata and image visualization and supports image downloads.
Read the **BMC Bioinformatics paper** here: [doi.org/10.1186/s12859-023-05546-z](doi.org/10.1186/s12859-023-05546-z)
## Check status
| Bioc branch | Checks |
|:------------------------------------------:|:--------------------------:|
| Release | [![build-checks-release](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/build-checks-release.yml/badge.svg?branch=devel)](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/build-checks-release.yml) |
| Devel | [![build-checks-devel](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/build-checks-devel.yml/badge.svg?branch=devel)](https://github.com/BodenmillerGroup/cytoviewer/actions/workflows/build-checks-devel.yml) |
## Requirements
The `cytoviewer` package requires R version \>= 4.0. It builds on data
objects and functions contained in the
[cytomapper](https://bioconductor.org/packages/release/bioc/html/cytomapper.html)
package.
## Installation
The `cytoviewer` package can be installed from `Bioconductor` via:
``` r
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("cytoviewer")
```
The development version of `cytoviewer` can be installed from Github
via:
``` r
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_github("BodenmillerGroup/cytoviewer")
```
To load the package in your R session, type the following:
``` r
library(cytoviewer)
```
## Basic usage
``` r
library(cytoviewer)
# Load example datasets
library(cytomapper)
data("pancreasImages")
data("pancreasMasks")
data("pancreasSCE")
# Use cytoviewer with images, masks and object
app <- cytoviewer(image = pancreasImages,
mask = pancreasMasks,
object = pancreasSCE,
img_id = "ImageNb",
cell_id = "CellNb")
if (interactive()) {
shiny::runApp(app)
}
```
For more detailed information on package usage and functionality,
please refer to [https://bodenmillergroup.github.io/cytoviewer/](https://bodenmillergroup.github.io/cytoviewer/).
## Contributing
For feature requests, please open an issue
[here](https://github.com/BodenmillerGroup/cytoviewer/issues).
Alternatively, feel free to fork the repository, add your changes and
issue a pull request.
## Citation
If you are using `cytoviewer` in your work, please cite the paper as:
```
Meyer, L., Eling, N., & Bodenmiller, B. (2024). cytoviewer: an R/Bioconductor package for interactive visualization
and exploration of highly multiplexed imaging data. BMC Bioinformatics, doi.org/10.1186/s12859-023-05546-z
```
## Authors
[Lasse Meyer](https://github.com/lassedochreden) lasse.meyer 'at' dqbm.uzh.ch
[Nils Eling](https://github.com/nilseling) nils.eling 'at' dqbm.uzh.ch