├── .Rbuildignore ├── .github ├── .gitignore └── workflows │ ├── build-checks-devel.yml │ ├── build-checks-release.yml │ └── docs.yml ├── .gitignore ├── DESCRIPTION ├── NAMESPACE ├── NEWS ├── R ├── AllClasses.R ├── AllGenerics.R ├── CytoImageList-class.R ├── CytoImageList-utils.R ├── CytoImageList.R ├── compImage.R ├── cytomapperShiny.R ├── data.R ├── loadImages.R ├── measureObjects.R ├── namespace.R ├── plotCells.R ├── plotPixels.R ├── plotting-param.R ├── plotting-utils.R ├── server-utils.R ├── shiny-server.R ├── shiny-ui.R ├── subsetting-utils.R ├── validityChecks.R └── validityChecksShiny.R ├── README.md ├── _pkgdown.yml ├── data ├── pancreasImages.RData ├── pancreasMasks.RData └── pancreasSCE.RData ├── inst ├── CITATION ├── extdata │ ├── E34_imc.tiff │ ├── E34_mask.tiff │ ├── G01_imc.tiff │ ├── G01_mask.tiff │ ├── J02_imc.tiff │ └── J02_mask.tiff └── scripts │ ├── 1_LoadPancreasData.Rmd │ ├── 2_LoadPancreasImages.Rmd │ ├── 3_GenerateToyData.Rmd │ └── README.md ├── man ├── CytoImageList-manipulation.Rd ├── CytoImageList-naming.Rd ├── CytoImageList-subsetting.Rd ├── CytoImageList.Rd ├── compImage.Rd ├── cytomapperShiny.Rd ├── loadImages.Rd ├── measureObjects.Rd ├── pancreasImages.Rd ├── pancreasMasks.Rd ├── pancreasSCE.Rd ├── plotCells.Rd ├── plotPixels.Rd └── plotting-param.Rd ├── tests ├── testthat.R └── testthat │ ├── _snaps │ ├── shiny_ui.md │ ├── shiny_ui.new.md │ └── shiny_ui_ondisk.md │ ├── apps │ ├── images_app │ │ ├── app.R │ │ └── tests │ │ │ ├── shinytest.R │ │ │ └── shinytest │ │ │ ├── complex_assay_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── complex_assay_change.R │ │ │ ├── complex_gating-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ ├── 004.png │ │ │ ├── 005.json │ │ │ ├── 005.png │ │ │ ├── 006.json │ │ │ ├── 006.png │ │ │ ├── 007.json │ │ │ ├── 007.png │ │ │ ├── 008.json │ │ │ └── 008.png │ │ │ ├── complex_gating.R │ │ │ ├── complex_plot_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── complex_plot_change.R │ │ │ ├── complex_sample_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ ├── 004.png │ │ │ ├── 005.json │ │ │ ├── 005.png │ │ │ ├── 006.json │ │ │ ├── 006.png │ │ │ ├── 007.json │ │ │ ├── 007.png │ │ │ ├── 008.json │ │ │ ├── 008.png │ │ │ ├── 009.json │ │ │ └── 009.png │ │ │ ├── complex_sample_change.R │ │ │ ├── contrasts_set-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ └── 003.png │ │ │ ├── contrasts_set.R │ │ │ ├── marker_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ └── 002.png │ │ │ ├── marker_select.R │ │ │ ├── simple_assay_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ ├── 004.png │ │ │ ├── 005.json │ │ │ └── 005.png │ │ │ ├── simple_assay_change.R │ │ │ ├── simple_gating-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ └── 002.png │ │ │ ├── simple_gating.R │ │ │ ├── simple_plot_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── simple_plot_change.R │ │ │ ├── simple_sample_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ └── 003.png │ │ │ ├── simple_sample_select.R │ │ │ ├── tab_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ └── 003.png │ │ │ └── tab_select.R │ ├── images_app_ondisk │ │ ├── app.R │ │ └── tests │ │ │ ├── shinytest.R │ │ │ └── shinytest │ │ │ ├── complex_assay_change.R │ │ │ ├── complex_gating.R │ │ │ ├── complex_plot_change.R │ │ │ ├── complex_sample_change.R │ │ │ ├── contrasts_set.R │ │ │ ├── marker_select.R │ │ │ ├── simple_assay_change.R │ │ │ ├── simple_gating.R │ │ │ ├── simple_plot_change.R │ │ │ ├── simple_sample_select.R │ │ │ └── tab_select.R │ ├── masks_app │ │ ├── app.R │ │ └── tests │ │ │ ├── shinytest.R │ │ │ └── shinytest │ │ │ ├── complex_assay_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── complex_assay_change.R │ │ │ ├── complex_gating-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ ├── 004.png │ │ │ ├── 005.json │ │ │ ├── 005.png │ │ │ ├── 006.json │ │ │ ├── 006.png │ │ │ ├── 007.json │ │ │ └── 007.png │ │ │ ├── complex_gating.R │ │ │ ├── complex_plot_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── complex_plot_change.R │ │ │ ├── complex_sample_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ ├── 004.png │ │ │ ├── 005.json │ │ │ ├── 005.png │ │ │ ├── 006.json │ │ │ ├── 006.png │ │ │ ├── 007.json │ │ │ ├── 007.png │ │ │ ├── 008.json │ │ │ ├── 008.png │ │ │ ├── 009.json │ │ │ └── 009.png │ │ │ ├── complex_sample_change.R │ │ │ ├── marker_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ └── 002.png │ │ │ ├── marker_select.R │ │ │ ├── simple_assay_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── simple_assay_change.R │ │ │ ├── simple_gating-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ └── 002.png │ │ │ ├── simple_gating.R │ │ │ ├── simple_plot_change-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ ├── 003.png │ │ │ ├── 004.json │ │ │ └── 004.png │ │ │ ├── simple_plot_change.R │ │ │ ├── simple_sample_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ └── 003.png │ │ │ ├── simple_sample_select.R │ │ │ ├── tab_select-expected │ │ │ ├── 001.json │ │ │ ├── 001.png │ │ │ ├── 002.json │ │ │ ├── 002.png │ │ │ ├── 003.json │ │ │ └── 003.png │ │ │ └── tab_select.R │ ├── masks_app_ondisk │ │ ├── app.R │ │ └── tests │ │ │ ├── shinytest.R │ │ │ └── shinytest │ │ │ ├── complex_assay_change.R │ │ │ ├── complex_gating.R │ │ │ ├── complex_plot_change.R │ │ │ ├── complex_sample_change.R │ │ │ ├── marker_select.R │ │ │ ├── simple_assay_change.R │ │ │ ├── simple_gating.R │ │ │ ├── simple_plot_change.R │ │ │ ├── simple_sample_select.R │ │ │ └── tab_select.R │ └── sce_app │ │ ├── app.R │ │ └── tests │ │ ├── shinytest.R │ │ └── shinytest │ │ ├── assay_selection-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ └── 006.png │ │ ├── assay_selection.R │ │ ├── download-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ └── 002.png │ │ ├── download.R │ │ ├── gating_1-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ ├── 007.png │ │ ├── 008.json │ │ ├── 008.png │ │ ├── 009.json │ │ ├── 009.png │ │ ├── 010.json │ │ ├── 010.png │ │ ├── 011.json │ │ ├── 011.png │ │ ├── 012.json │ │ ├── 012.png │ │ ├── 013.json │ │ ├── 013.png │ │ ├── 014.json │ │ ├── 014.png │ │ ├── 015.json │ │ ├── 015.png │ │ ├── 016.json │ │ ├── 016.png │ │ ├── 017.json │ │ ├── 017.png │ │ ├── 018.json │ │ ├── 018.png │ │ ├── 019.json │ │ ├── 019.png │ │ ├── 020.json │ │ ├── 020.png │ │ ├── 021.json │ │ ├── 021.png │ │ ├── 022.json │ │ ├── 022.png │ │ ├── 023.json │ │ ├── 023.png │ │ ├── 024.json │ │ ├── 024.png │ │ ├── 025.json │ │ ├── 025.png │ │ ├── 026.json │ │ ├── 026.png │ │ ├── 027.json │ │ ├── 027.png │ │ ├── 028.json │ │ ├── 028.png │ │ ├── 029.json │ │ └── 029.png │ │ ├── gating_1.R │ │ ├── gating_assay_change-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ └── 004.png │ │ ├── gating_assay_change.R │ │ ├── gating_marker_change-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ └── 004.png │ │ ├── gating_marker_change.R │ │ ├── gating_plot_reset-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ └── 004.png │ │ ├── gating_plot_reset.R │ │ ├── gating_sample_change-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ └── 007.png │ │ ├── gating_sample_change.R │ │ ├── help-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ └── 003.png │ │ ├── help.R │ │ ├── image_tab_selection-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ └── 006.png │ │ ├── image_tab_selection.R │ │ ├── marker_selection-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ └── 007.png │ │ ├── marker_selection.R │ │ ├── next_prev_sample_change-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ └── 007.png │ │ ├── next_prev_sample_change.R │ │ ├── sample_selection-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ ├── 007.png │ │ ├── 008.json │ │ └── 008.png │ │ ├── sample_selection.R │ │ ├── side_panel-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ └── 006.png │ │ ├── side_panel.R │ │ ├── tab_reset-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ ├── 003.png │ │ ├── 004.json │ │ ├── 004.png │ │ ├── 005.json │ │ ├── 005.png │ │ ├── 006.json │ │ ├── 006.png │ │ ├── 007.json │ │ ├── 007.png │ │ ├── 008.json │ │ └── 008.png │ │ ├── tab_reset.R │ │ ├── tab_reset_gate_clear-expected │ │ ├── 001.json │ │ ├── 001.png │ │ ├── 002.json │ │ ├── 002.png │ │ ├── 003.json │ │ └── 003.png │ │ └── tab_reset_gate_clear.R │ ├── test_CytoImageList-manipulation.R │ ├── test_CytoImageList-manipulation_ondisk.R │ ├── test_CytoImageList-naming.R │ ├── test_CytoImageList-naming_ondisk.R │ ├── test_CytoImageList-subsetting.R │ ├── test_CytoImageList-subsetting_ondisk.R │ ├── test_CytoImageList.R │ ├── test_CytoImageList_ondisk.R │ ├── test_compImage.R │ ├── test_loadImages.R │ ├── test_loadImages_ondisk.R │ ├── test_measureObjects.R │ ├── test_measureObjects_ondisk.R │ ├── test_plotCells.R │ ├── test_plotCells_ondisk.R │ ├── test_plotPixels.R │ ├── test_plotPixels_ondisk.R │ ├── test_plotting-param-validity.R │ ├── test_plotting-param-validity_ondisk.R │ ├── test_plotting-param.R │ ├── test_plotting-param_ondisk.R │ ├── test_plotting-utils.R │ ├── test_plotting-utils_ondisk.R │ ├── test_shiny_functions.R │ ├── test_shiny_reactive.R │ ├── test_shiny_reactive_ondisk.R │ ├── test_shiny_snapshots.R │ ├── test_shiny_ui.R │ ├── test_shiny_ui_ondisk.R │ ├── test_validity.R │ ├── test_validity_ondisk.R │ └── testthat-problems.rds └── vignettes ├── cytomapper.Rmd ├── cytomapper_ondisk.Rmd ├── cytomapper_sticker.png └── library.bib /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^doc$ 2 | ^.*\.Rproj$ 3 | ^\.Rproj\.user$ 4 | ^_pkgdown\.yml$ 5 | ^docs$ 6 | ^pkgdown$ 7 | ^\.github$ 8 | ^inst/extdata/pancreas_images.rds$ 9 | ^inst/extdata/pancreas_masks.rds$ 10 | ^inst/extdata/pancreas_sce.rds$ 11 | -------------------------------------------------------------------------------- /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /.github/workflows/build-checks-devel.yml: -------------------------------------------------------------------------------- 1 | name: build-checks-devel 2 | 3 | on: 4 | push: 5 | branches: [ devel ] 6 | pull_request: 7 | branches: [ devel ] 8 | 9 | jobs: 10 | R-CMD-check: 11 | runs-on: ubuntu-latest 12 | container: rocker/r-ver:devel 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - name: Query dependencies 18 | run: | 19 | install.packages('remotes') 20 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 21 | shell: Rscript {0} 22 | 23 | - name: Install system requirements 24 | run: | 25 | apt-get update 26 | apt-get install -y --no-install-recommends apt-utils 27 | apt-get install -y --no-install-recommends libharfbuzz-dev libfribidi-dev zlib1g-dev libfftw3-dev libxml2-dev libpng-dev libtiff-dev libfontconfig1-dev libcurl4-gnutls-dev libcairo2-dev libssl-dev libxt-dev curl libgdal-dev libproj-dev pandoc libmagick++-dev bzip2 28 | apt-get clean 29 | rm -rf /var/lib/apt/ilists/* 30 | 31 | - name: Install dependencies 32 | run: | 33 | install.packages("BiocManager") 34 | install.packages("svglite") 35 | BiocManager::install(version = "devel", update = TRUE, ask = FALSE, force = TRUE) 36 | remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpu = 2L) 37 | shell: Rscript {0} 38 | 39 | - name: Find PhantomJS path 40 | id: phantomjs 41 | run: | 42 | echo "::set-output name=path::$(Rscript -e 'cat(shinytest:::phantom_paths()[[1]])')" 43 | - name: Cache PhantomJS 44 | uses: actions/cache@v4 45 | with: 46 | path: ${{ steps.phantomjs.outputs.path }} 47 | key: ${{ matrix.config.os }}-phantomjs 48 | restore-keys: ${{ matrix.config.os }}-phantomjs 49 | - name: Install PhantomJS 50 | run: > 51 | Rscript 52 | -e "if (!shinytest::dependenciesInstalled()) shinytest::installDependencies()" 53 | 54 | - name: Check 55 | run: | 56 | install.packages("rcmdcheck") 57 | rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") 58 | shell: Rscript {0} 59 | 60 | - name: BiocCheck 61 | run: | 62 | BiocManager::install("BiocCheck") 63 | BiocCheck::BiocCheck(".") 64 | shell: Rscript {0} 65 | 66 | - name: Session info 67 | run: | 68 | options(width = 100) 69 | pkgs <- installed.packages()[, "Package"] 70 | sessioninfo::session_info(pkgs, include_base = TRUE) 71 | shell: Rscript {0} 72 | -------------------------------------------------------------------------------- /.github/workflows/build-checks-release.yml: -------------------------------------------------------------------------------- 1 | name: build-checks-release 2 | 3 | on: 4 | push: 5 | branches: [ devel ] 6 | pull_request: 7 | branches: [ devel ] 8 | 9 | jobs: 10 | R-CMD-check: 11 | runs-on: ubuntu-latest 12 | container: rocker/r-ver:latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - name: Query dependencies 18 | run: | 19 | install.packages('remotes') 20 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 21 | shell: Rscript {0} 22 | 23 | - name: Install system requirements 24 | run: | 25 | apt-get update 26 | apt-get install -y --no-install-recommends apt-utils 27 | apt-get install -y --no-install-recommends zlib1g-dev libfftw3-dev libxml2-dev libxt-dev curl libproj-dev libgdal-dev pandoc libmagick++-dev bzip2 28 | apt-get clean 29 | rm -rf /var/lib/apt/ilists/* 30 | 31 | - name: Install dependencies 32 | run: | 33 | install.packages("BiocManager") 34 | remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpu = 2L) 35 | BiocManager::install("matrixStats", force = TRUE) 36 | shell: Rscript {0} 37 | 38 | - name: Find PhantomJS path 39 | id: phantomjs 40 | run: | 41 | echo "::set-output name=path::$(Rscript -e 'cat(shinytest:::phantom_paths()[[1]])')" 42 | - name: Cache PhantomJS 43 | uses: actions/cache@v4 44 | with: 45 | path: ${{ steps.phantomjs.outputs.path }} 46 | key: ${{ matrix.config.os }}-phantomjs 47 | restore-keys: ${{ matrix.config.os }}-phantomjs 48 | - name: Install PhantomJS 49 | run: > 50 | Rscript 51 | -e "if (!shinytest::dependenciesInstalled()) shinytest::installDependencies()" 52 | 53 | - name: Check 54 | run: | 55 | install.packages("rcmdcheck") 56 | rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") 57 | shell: Rscript {0} 58 | 59 | - name: BiocCheck 60 | run: | 61 | BiocManager::install("BiocCheck") 62 | BiocCheck::BiocCheck(".") 63 | shell: Rscript {0} 64 | 65 | - name: Test coverage 66 | run: | 67 | remotes::install_cran(c("covr")) 68 | covr::codecov(token = "${{secrets.CODECOV_TOKEN}}") 69 | shell: Rscript {0} 70 | 71 | - name: Session info 72 | run: | 73 | options(width = 100) 74 | pkgs <- installed.packages()[, "Package"] 75 | sessioninfo::session_info(pkgs, include_base = TRUE) 76 | shell: Rscript {0} 77 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: devel 4 | 5 | name: docs 6 | 7 | jobs: 8 | pkgdown: 9 | runs-on: macOS-latest 10 | env: 11 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 12 | steps: 13 | - uses: actions/checkout@v4 14 | 15 | - uses: r-lib/actions/setup-r@v2 16 | 17 | - uses: r-lib/actions/setup-pandoc@v2 18 | 19 | - name: Query dependencies 20 | run: | 21 | install.packages('remotes') 22 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 23 | writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") 24 | shell: Rscript {0} 25 | 26 | - name: Cache R packages 27 | uses: actions/cache@v4 28 | with: 29 | path: ${{ env.R_LIBS_USER }} 30 | key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} 31 | restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- 32 | 33 | - name: Install system dependencies 34 | run: | 35 | brew install harfbuzz fribidi cairo xquartz imagemagick gdal pkg-config proj 36 | 37 | - name: Install dependencies 38 | run: | 39 | remotes::install_deps(dependencies = TRUE) 40 | install.packages("pkgdown") 41 | shell: Rscript {0} 42 | 43 | - name: Install package 44 | run: R CMD INSTALL . 45 | 46 | - name: Deploy package 47 | run: | 48 | git config --local user.email "actions@github.com" 49 | git config --local user.name "GitHub Actions" 50 | Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | ._.DS_Store 3 | .Rproj.user 4 | .Rhistory 5 | .RData 6 | .Ruserdata 7 | .zip 8 | *.html 9 | *.Rapp.history 10 | *._.DS_Store 11 | cytomapper.Rproj 12 | 13 | # Datasets generated by the "LoadPancreasData.Rmd" and "LoadPancreasImages.Rmd" scripts 14 | inst/extdata/pancreas_images.rds 15 | inst/extdata/pancreas_masks.rds 16 | inst/extdata/pancreas_sce.rds 17 | 18 | inst/scripts/pancreas_images.rds 19 | inst/scripts/pancreas_masks.rds 20 | inst/scripts/pancreas_sce.rds 21 | 22 | # Temporary files downloaded by the "LoadPancreasData.Rmd" and "LoadPancreasImages.Rmd" scripts 23 | inst/extdata/CellSubset.csv 24 | inst/extdata/All_Image.csv 25 | inst/extdata/CellTypes.csv 26 | inst/extdata/Donors.csv 27 | inst/extdata/Panel.csv 28 | inst/extdata/ChannelMass.csv 29 | inst/extdata/*_full_clean.tiff 30 | inst/extdata/*_full_mask.tiff 31 | 32 | inst/scripts/CellSubset.csv 33 | inst/scripts/All_Image.csv 34 | inst/scripts/CellTypes.csv 35 | inst/scripts/Donors.csv 36 | inst/scripts/Panel.csv 37 | inst/scripts/ChannelMass.csv 38 | inst/scripts/*_full_clean.tiff 39 | inst/scripts/*_full_mask.tiff 40 | *.DS_Store 41 | docs 42 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: cytomapper 2 | Version: 1.21.0 3 | Title: Visualization of highly multiplexed imaging data in R 4 | Description: 5 | Highly multiplexed imaging acquires the single-cell expression of 6 | selected proteins in a spatially-resolved fashion. These measurements can be 7 | visualised across multiple length-scales. First, pixel-level intensities 8 | represent the spatial distributions of feature expression with highest 9 | resolution. Second, after segmentation, expression values or cell-level 10 | metadata (e.g. cell-type information) can be visualised on segmented cell 11 | areas. This package contains functions for the visualisation of multiplexed 12 | read-outs and cell-level information obtained by multiplexed imaging 13 | technologies. The main functions of this package allow 1. the visualisation of 14 | pixel-level information across multiple channels, 2. the display of 15 | cell-level information (expression and/or metadata) on segmentation masks 16 | and 3. gating and visualisation of single cells. 17 | Authors@R: 18 | c(person("Nils", "Eling", role = c("aut"), 19 | email = "nils.eling@dqbm.uzh.ch", 20 | comment = c(ORCID = "0000-0002-4711-1176")), 21 | person("Nicolas", "Damond", role = c("aut"), 22 | email = "nicolas.damond@dqbm.uzh.ch", 23 | comment = c(ORCID = "0000-0003-3027-8989")), 24 | person("Tobias", "Hoch", role = c("ctb")), 25 | person("Lasse", "Meyer", role = c("cre", "ctb"), 26 | email = "lasse.meyer@dqbm.uzh.ch", 27 | comment = c(ORCID = "0000-0002-1660-1199"))) 28 | License: GPL (>= 2) 29 | Depends: 30 | R (>= 4.0), 31 | EBImage, 32 | SingleCellExperiment, 33 | methods 34 | Imports: 35 | SpatialExperiment, 36 | S4Vectors, 37 | BiocParallel, 38 | HDF5Array, 39 | DelayedArray, 40 | RColorBrewer, 41 | viridis, 42 | utils, 43 | SummarizedExperiment, 44 | tools, 45 | graphics, 46 | raster, 47 | grDevices, 48 | stats, 49 | ggplot2, 50 | ggbeeswarm, 51 | svgPanZoom, 52 | svglite, 53 | shiny, 54 | shinydashboard, 55 | matrixStats, 56 | rhdf5, 57 | nnls 58 | Suggests: 59 | BiocStyle, 60 | knitr, 61 | rmarkdown, 62 | markdown, 63 | cowplot, 64 | testthat, 65 | shinytest 66 | biocViews: ImmunoOncology, Software, SingleCell, OneChannel, TwoChannel, MultipleComparison, Normalization, DataImport 67 | VignetteBuilder: knitr 68 | URL: https://github.com/BodenmillerGroup/cytomapper 69 | BugReports: https://github.com/BodenmillerGroup/cytomapper/issues 70 | RoxygenNote: 7.3.1 71 | Encoding: UTF-8 72 | -------------------------------------------------------------------------------- /R/AllClasses.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------- 2 | # The Image_OR_DelayedArray class 3 | # ------------------------------------------------------------------------- 4 | 5 | #' @importClassesFrom HDF5Array HDF5Array 6 | #' @importClassesFrom DelayedArray DelayedArray 7 | #' @importFrom EBImage Image 8 | setClassUnion("Image_OR_DelayedArray", c("Image", "DelayedArray", "HDF5Array")) 9 | -------------------------------------------------------------------------------- /R/AllGenerics.R: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | # Generic functions for the CytoImageList and Image classes 3 | #------------------------------------------------------------------------------ 4 | 5 | #' @export 6 | setGeneric("channelNames", 7 | function(x) standardGeneric("channelNames")) 8 | 9 | #' @export 10 | setGeneric("channelNames<-", 11 | function(x, value) standardGeneric("channelNames<-")) 12 | 13 | #' @export 14 | setGeneric("getImages", 15 | function(x, i) standardGeneric("getImages")) 16 | 17 | #' @export 18 | setGeneric("setImages<-", 19 | function(x, i, value) standardGeneric("setImages<-")) 20 | 21 | #' @export 22 | setGeneric("getChannels", 23 | function(x, i) standardGeneric("getChannels")) 24 | 25 | #' @export 26 | setGeneric("setChannels<-", 27 | function(x, i, value) standardGeneric("setChannels<-")) 28 | 29 | #' @export 30 | setGeneric("scaleImages", 31 | function(object, value) standardGeneric("scaleImages")) 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /R/CytoImageList-class.R: -------------------------------------------------------------------------------- 1 | #' @export 2 | #' @rdname CytoImageList 3 | #' @importFrom utils packageVersion 4 | #' @importFrom S4Vectors setValidity2 5 | #' @importClassesFrom S4Vectors SimpleList 6 | setClass( 7 | Class = "CytoImageList", 8 | package = "cytomapper", 9 | slots = c(int_metadata="list"), 10 | contains = "SimpleList", 11 | prototype = prototype( 12 | int_metadata = list( 13 | version = utils::packageVersion("cytomapper")), 14 | elementType = "Image_OR_DelayedArray" 15 | ) 16 | ) 17 | 18 | # Validity checks 19 | #' @importFrom S4Vectors setValidity2 20 | #' @importFrom EBImage colorMode 21 | S4Vectors:::setValidity2(Class = "CytoImageList", .ImageList_validity) 22 | 23 | .ImageList_validity <- function(object) { 24 | 25 | msg <- NULL 26 | 27 | # Check if all images have the same number of channels 28 | dims <- unlist(lapply(object, function(x){ 29 | dim(x)[3] 30 | })) 31 | 32 | if (length(unique(dims)) > 1L) { 33 | msg <- c(msg, "The images contain different number of channels.\n") 34 | } 35 | 36 | # Check if all channels have the same names 37 | if (length(dim(object[[1]])) == 3L) { 38 | 39 | cur_names <- dimnames(object[[1]])[[3]] 40 | errors <- unlist(lapply(object, function(x){ 41 | !identical(cur_names, dimnames(x)[[3]]) 42 | })) 43 | 44 | if (sum(errors) > 0) { 45 | msg <- c(msg, "Not all channels have the same names.") 46 | } 47 | } 48 | 49 | # Check if entry names are unique 50 | if (!is.null(names(object)) && 51 | length(unique(names(object))) < length(names(object))) { 52 | msg <- c(msg, "Only unique entries allowed in a CytoImageList object.") 53 | } 54 | 55 | # Check if names contain NA or empties 56 | if (!is.null(names(object)) && (sum(is.na(names(object))) > 0 || 57 | sum(names(object) %in% "") > 0)) { 58 | msg <- c(msg, "Empty or NA names not supported.") 59 | } 60 | 61 | # Check if channelNames are unique 62 | if (!is.null(channelNames(object)) && 63 | length(unique(channelNames(object))) < length(channelNames(object))) { 64 | msg <- c(msg, paste("Only unique channels", 65 | "allowed in a CytoImageList object.")) 66 | } 67 | 68 | if (length(msg)) { return(msg) } 69 | 70 | return(TRUE) 71 | } 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /R/namespace.R: -------------------------------------------------------------------------------- 1 | #' @import methods 2 | #' @import SingleCellExperiment 3 | NULL 4 | -------------------------------------------------------------------------------- /R/shiny-server.R: -------------------------------------------------------------------------------- 1 | # ----------------------------------------------------------------------------- 2 | # Definition of the shiny server 3 | # ----------------------------------------------------------------------------- 4 | 5 | #' @importFrom SummarizedExperiment assay 6 | .cytomapper_server <- function(object, mask, image, cell_id, img_id, 7 | input, output, session, ...) 8 | { 9 | # Session info observer 10 | cur_sessionInfo <- sessionInfo() 11 | .create_general_observer(input, si = cur_sessionInfo) 12 | 13 | # Save some variables used throught the app 14 | rValues <- reactiveValues(ranges = NULL) 15 | 16 | # Reactive object list to store selected cells 17 | objValues <- reactiveValues(object1 = NULL) 18 | 19 | .create_interactive_observer(object, img_id, input, session, 20 | rValues, objValues) 21 | 22 | # Create updateSelectizeInput objects 23 | .create_updateSelectizeInput(object, img_id, input, session) 24 | 25 | # Dynamically generate wellPanels 26 | output$AdditionalPlots_sidebar <- .addPlots_sidebar(input) 27 | 28 | # Dynamically generate scatter plots 29 | output$AdditionalPlots_tab1 <- .addPlots_tab1(input) 30 | 31 | # Dynamically create image plot 32 | output$AdditionalPlots_tab2 <- .addPlots_tab2(input, object, mask, image) 33 | 34 | observe({ 35 | 36 | lapply(seq_len(input$plotCount), function(cur_plot){ 37 | output[[paste0("scatter", cur_plot)]] <- .createScatter(input, 38 | session, rValues, objValues, 39 | iter = cur_plot, img_id = img_id, 40 | cell_id = cell_id) 41 | 42 | output[[paste0("info", cur_plot)]] <- renderText({ 43 | paste0("Selection: ", .brushRange(input[[paste0("plot_brush", 44 | cur_plot)]])) 45 | }) 46 | }) 47 | }) 48 | 49 | if (!is.null(mask) || !is.null(image)) { 50 | output$image_expression <- .createImageExpression(input, object, 51 | mask, image, img_id, cell_id, ...) 52 | 53 | output$image_selection <- .createImageSelection(input, objValues, 54 | mask, image, img_id, cell_id, ...) 55 | } 56 | 57 | output$downloadData <- .downloadSelection(input, objValues) 58 | } -------------------------------------------------------------------------------- /R/validityChecksShiny.R: -------------------------------------------------------------------------------- 1 | # Check sce validity for shiny 2 | .valid.sce.shiny <- function(object, img_id, cell_id, image, mask){ 3 | if (!is(object, "SingleCellExperiment")) { 4 | stop("'object' is not of type 'SingleCellExperiment'.") 5 | } 6 | 7 | if (!is(metadata(object), "list")) { 8 | warning("metadata('object') is not of type 'list'.\n", 9 | "metadata('object') will be stored as 'list' \n", 10 | "in the metadata slot of the output object.") 11 | } 12 | 13 | if (is.null(img_id)) { 14 | stop("Please provide an 'img_id' argument.\n", 15 | "Gating is only supported on individual samples.") 16 | } 17 | 18 | if (is.null(cell_id)) { 19 | stop("Please provide a 'cell_id' argument.") 20 | } 21 | 22 | if (!is.character(cell_id) || length(cell_id) > 1) { 23 | stop("Invalid argument for 'cell_id'.") 24 | } 25 | 26 | if (!is.character(img_id) || length(img_id) > 1) { 27 | stop("Invalid argument for 'img_id'.") 28 | } 29 | 30 | if (is.null(colData(object))) { 31 | stop("Please store the image- and metadata\n", 32 | "in the 'colData' slot of 'object'.") 33 | } 34 | 35 | if (!(img_id %in% colnames(colData(object)))) { 36 | stop("'img_id' not in 'colData(object)'.") 37 | } 38 | 39 | if (!(cell_id %in% colnames(colData(object)))) { 40 | stop("'cell_id' not in 'colData(object)'.") 41 | } 42 | 43 | if (is.null(rownames(object))) { 44 | stop("Please specify the rownames of the 'object'.") 45 | } 46 | 47 | if (!is.null(image)) { 48 | if (is.null(channelNames(image))) { 49 | stop("Please specify the 'channelNames' of the 'image' object.") 50 | } 51 | if (!identical(channelNames(image), rownames(object))) { 52 | stop("The 'channelNames' of the images\n", 53 | "need to match the rownames of the object.") 54 | } 55 | if (length(image) != length(unique(colData(object)[[img_id]]))) { 56 | stop("Please provide a unique image/mask\n", 57 | "for every sample stored in 'object'.") 58 | } 59 | } 60 | 61 | if (!is.null(mask)) { 62 | if (length(mask) != length(unique(colData(object)[[img_id]]))) { 63 | stop("Please provide a unique image/mask\n", 64 | "for every sample stored in 'object'.") 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/_pkgdown.yml -------------------------------------------------------------------------------- /data/pancreasImages.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/data/pancreasImages.RData -------------------------------------------------------------------------------- /data/pancreasMasks.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/data/pancreasMasks.RData -------------------------------------------------------------------------------- /data/pancreasSCE.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/data/pancreasSCE.RData -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | 2 | citHeader("To cite the package 'cytomapper' in publications use:") 3 | 4 | citEntry(entry="article", 5 | title = "cytomapper: an R/Bioconductor package for visualisation of highly multiplexed imaging data", 6 | author = personList(as.person("Nils Eling"), 7 | as.person("Nicolas Damond"), 8 | as.person("Tobias Hoch"), 9 | as.person("Bernd Bodenmiller")), 10 | year = 2020, 11 | journal = "Bioinformatics", 12 | doi = "10.1093/bioinformatics/btaa1061", 13 | textVersion = "Nils Eling, Nicolas Damond, Tobias Hoch, Bernd Bodenmiller (2020). cytomapper: an R/Bioconductor package for visualisation of highly multiplexed imaging data. Bioinformatics, doi: 10.1093/bioinformatics/btaa1061") -------------------------------------------------------------------------------- /inst/extdata/E34_imc.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/E34_imc.tiff -------------------------------------------------------------------------------- /inst/extdata/E34_mask.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/E34_mask.tiff -------------------------------------------------------------------------------- /inst/extdata/G01_imc.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/G01_imc.tiff -------------------------------------------------------------------------------- /inst/extdata/G01_mask.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/G01_mask.tiff -------------------------------------------------------------------------------- /inst/extdata/J02_imc.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/J02_imc.tiff -------------------------------------------------------------------------------- /inst/extdata/J02_mask.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/inst/extdata/J02_mask.tiff -------------------------------------------------------------------------------- /man/CytoImageList-naming.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/CytoImageList-utils.R 3 | \docType{methods} 4 | \name{CytoImageList-naming} 5 | \alias{CytoImageList-naming} 6 | \alias{channelNames} 7 | \alias{channelNames<-} 8 | \alias{channelNames,CytoImageList-method} 9 | \alias{channelNames<-,CytoImageList-method} 10 | \alias{names,CytoImageList-method} 11 | \alias{names<-,CytoImageList-method} 12 | \title{Getting and setting the channel and image names} 13 | \description{ 14 | Methods to get and set the names of individual channels or the names of 15 | individual images. 16 | } 17 | \section{Setting and getting the channel names}{ 18 | 19 | In the following code, \code{x} is a \linkS4class{CytoImageList} 20 | object containing one or multiple channels. The channel 21 | names can be replaced by \code{value}, which contains a character vector of 22 | the same length as the number of channels in the images. 23 | \describe{ 24 | \item{\code{channelNames(x)}}{Returns the names of all channels stored in 25 | \code{x}} 26 | \item{\code{channelNames(x) <- value}}{Replaces the channel names of 27 | \code{x} with \code{values}. For this, \code{value} needs to have the same 28 | length as the number of channels in \code{x}} 29 | } 30 | } 31 | 32 | \section{Setting and getting the image names}{ 33 | 34 | Here, \code{x} is a \linkS4class{CytoImageList} object. The element 35 | names can be replaced by \code{value}, which contains a character vector of 36 | the same length as the number of images. In case of the CytoImageList object, 37 | elements are always images. 38 | \describe{ 39 | \item{\code{names(x)}}{Returns the names of all images stored in \code{x}} 40 | \item{\code{names(x) <- value}}{Replaces the image names of 41 | \code{x} with \code{value}. For this, \code{value} needs to have the same 42 | length as \code{x}} 43 | } 44 | } 45 | 46 | \examples{ 47 | data("pancreasImages") 48 | 49 | # Get channel and image names 50 | channelNames(pancreasImages) 51 | names(pancreasImages) 52 | 53 | # Set channel and image names 54 | channelNames(pancreasImages) <- paste0("marker", 1:5) 55 | names(pancreasImages) <- paste0("image", 1:3) 56 | 57 | } 58 | \author{ 59 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 60 | } 61 | -------------------------------------------------------------------------------- /man/pancreasImages.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{pancreasImages} 5 | \alias{pancreasImages} 6 | \title{Example CytoImageList object of image files} 7 | \format{ 8 | A CytoImageList object containing 3 \code{\linkS4class{Image}} 9 | objects with 5 channels each. Channel names can be accessed via 10 | \code{?\link{channelNames}}. 11 | } 12 | \usage{ 13 | pancreasImages 14 | } 15 | \description{ 16 | This \linkS4class{CytoImageList} object contains multi-channel stacks of 17 | three images acquired by imaging mass cytometry. Each channel represents the 18 | pixel-intensities of each of the 5 measured proteins. The data is part of a 19 | imaging mass cytometry study on the progression of Type 1 diabetes and 20 | contains pancreas cells. 21 | } 22 | \references{ 23 | \href{https://www.sciencedirect.com/science/article/pii/S1550413118306910}{ 24 | Damond, N. et al., A Map of Human Type 1 Diabetes Progression by 25 | Imaging Mass Cytometry, Cell Metabolism 29:3, 2019} 26 | } 27 | \keyword{datasets} 28 | -------------------------------------------------------------------------------- /man/pancreasMasks.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{pancreasMasks} 5 | \alias{pancreasMasks} 6 | \title{Example CytoImageList object of segmentation masks} 7 | \format{ 8 | A CytoImageList object containing 3 \code{\linkS4class{Image}} 9 | objects with 1 channel each. These images are the result to segmentation 10 | and associated to the images stored in the 11 | \code{\link[cytomapper]{pancreasImages}} object. Pixel values indicate the 12 | numeric cell identifier while a value of 0 represents the image background. 13 | } 14 | \usage{ 15 | pancreasMasks 16 | } 17 | \description{ 18 | This \linkS4class{CytoImageList} object contains single-channel images 19 | representing the segmentation masks after preprocessing of imaging mass 20 | cytometry data. The data is part of a imaging mass cytometry study on the 21 | progression of Type 1 diabetes and contains pancreas cells. 22 | } 23 | \references{ 24 | \href{https://www.sciencedirect.com/science/article/pii/S1550413118306910}{ 25 | Damond, N. et al., A Map of Human Type 1 Diabetes Progression by 26 | Imaging Mass Cytometry, Cell Metabolism 29:3, 2019} 27 | } 28 | \keyword{datasets} 29 | -------------------------------------------------------------------------------- /man/pancreasSCE.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{pancreasSCE} 5 | \alias{pancreasSCE} 6 | \title{Example SingleCellExperiment object} 7 | \format{ 8 | A SingleCellExperiment object containing the raw and 9 | arcsinh-transformed mean pixel counts per cell as well as associated cell- 10 | and protein-specific metadata. Row names represent the names of the target 11 | proteins and column names represent the image name and cell id of each cell. 12 | \describe{ 13 | \item{colData}{Cell-specific metadata where rownames represent the 14 | image name and cell id. It containins the 15 | \enumerate{ 16 | \item image number (ImageNb), 17 | \item cell number/identifier (CellNb), 18 | \item spatial position on the image (Pos_X, Pos_Y), 19 | \item the associated image name (ImageName, see 20 | \code{?"\link[cytomapper]{pancreasImages}"}), 21 | \item the associated mask name (MaskName, see 22 | \code{?"\link[cytomapper]{pancreasMasks}"}), 23 | \item a arbitrary cell-type label (CellType) 24 | \item a logical (Pattern) indicating exocrine cells 25 | } 26 | } 27 | \item{rowData}{Protein-specific metadata where rownames represent 28 | the names of the target proteins. It contains the 29 | \enumerate{ 30 | \item channel number (frame), 31 | \item metal tag of the antibody (MetalTag) 32 | \item Target (the expanded name of the targeted protein) 33 | \item clean_Target (the abbreviated name of the targeted protein) 34 | } 35 | } 36 | \item{assays}{List of protein expression counts containing: 37 | \enumerate{ 38 | \item the raw expression counts (counts): 39 | mean pixel value per cell and protein 40 | \item arcsinh-transformed raw expression counts 41 | using a co-factor of 1 (exprs) 42 | } 43 | } 44 | } 45 | } 46 | \usage{ 47 | pancreasSCE 48 | } 49 | \description{ 50 | This \linkS4class{SingleCellExperiment} object contains the expression values 51 | of 5 proteins (rows) from 362 cells (columns) across 3 images. The data is 52 | part of a imaging mass cytometry study on the progression of Type 1 diabetes 53 | and therefore contains pancreas cells. 54 | } 55 | \references{ 56 | \href{https://www.sciencedirect.com/science/article/pii/S1550413118306910}{ 57 | Damond, N. et al., A Map of Human Type 1 Diabetes Progression by 58 | Imaging Mass Cytometry, Cell Metabolism 29:3, 2019} 59 | } 60 | \keyword{datasets} 61 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(cytomapper) 3 | 4 | test_check("cytomapper") 5 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/app.R: -------------------------------------------------------------------------------- 1 | # Start cytomapperShiny only with SCE object 2 | library(cytomapper) 3 | data("pancreasSCE") 4 | data("pancreasMasks") 5 | data("pancreasImages") 6 | cytomapperShiny(object = pancreasSCE, mask = pancreasMasks, 7 | image = pancreasImages, 8 | cell_id = "CellNb", img_id = "ImageNb") 9 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest.R: -------------------------------------------------------------------------------- 1 | library(shinytest) 2 | shinytest::testApp("../") 3 | 4 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_assay_change-expected/004.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/004.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/005.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/006.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/007.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_gating-expected/008.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_gating.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("complex_gating") 3 | 4 | brush1 <- list(xmin = 0.5, 5 | xmax = 1.5, 6 | ymin = 12, 7 | ymax = 34, 8 | mapping = list(x = "sample", 9 | y = "CD99"), 10 | direction = "xy", 11 | brushId = "plot_brush1", 12 | outputId = "scatter1") 13 | 14 | Sys.sleep(0.5) 15 | app$setInputs(Marker_1 = "CD99") 16 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 17 | Sys.sleep(0.5) 18 | app$snapshot() 19 | app$setInputs(tabbox1 = "tab2") 20 | app$setInputs(resetMarkers = "click") 21 | #app$snapshot() 22 | app$setInputs(Marker_2 = "PIN") 23 | app$snapshot() 24 | 25 | brush1 <- list(xmin = 5, 26 | xmax = 34, 27 | ymin = 10, 28 | ymax = 60, 29 | mapping = list(x = "CD99", 30 | y = "PIN"), 31 | direction = "xy", 32 | brushId = "plot_brush1", 33 | outputId = "scatter1") 34 | 35 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 36 | app$snapshot() 37 | app$setInputs(tabbox1 = "tab2") 38 | app$setInputs(resetMarkers = "click") 39 | #app$snapshot() 40 | app$setInputs(plotCount = 3) 41 | app$snapshot() 42 | app$setInputs(Marker_1 = "CD99") 43 | app$setInputs(Marker_2 = "PIN") 44 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 45 | app$setInputs(Marker_3 = "CDH") 46 | app$snapshot() 47 | 48 | brush2 <- list(xmin = 0.5, 49 | xmax = 1.5, 50 | ymin = 8, 51 | ymax = 15, 52 | mapping = list(x = "sample", 53 | y = "CDH"), 54 | direction = "xy", 55 | brushId = "plot_brush1", 56 | outputId = "scatter1") 57 | 58 | app$setInputs(plot_brush2 = brush2, allowInputNoBinding_ = TRUE) 59 | app$snapshot() 60 | app$setInputs(tabbox1 = "tab2") 61 | app$setInputs(resetMarkers = "click") 62 | app$snapshot() 63 | app$setInputs(tabbox1 = "tab1") 64 | app$setInputs(Marker_5 = "CD8a") 65 | 66 | brush2 <- list(xmin = 0.5, 67 | xmax = 1.5, 68 | ymin = 0, 69 | ymax = 15, 70 | mapping = list(x = "sample", 71 | y = "CDH"), 72 | direction = "xy", 73 | brushId = "plot_brush1", 74 | outputId = "scatter1") 75 | 76 | brush3 <- list(xmin = 0.5, 77 | xmax = 1.5, 78 | ymin = 0, 79 | ymax = 10, 80 | mapping = list(x = "sample", 81 | y = "CD8a"), 82 | direction = "xy", 83 | brushId = "plot_brush1", 84 | outputId = "scatter1") 85 | app$setInputs(plot_brush2 = brush2, allowInputNoBinding_ = TRUE) 86 | app$setInputs(plot_brush3 = brush3, allowInputNoBinding_ = TRUE) 87 | 88 | app$snapshot() 89 | app$setInputs(tabbox1 = "tab2") 90 | app$setInputs(resetMarkers = "click") 91 | #app$snapshot() 92 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_plot_change-expected/004.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_plot_change.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("complex_plot_change") 3 | 4 | brush1 <- list(xmin = 0.5, 5 | xmax = 1.5, 6 | ymin = 12, 7 | ymax = 34, 8 | mapping = list(x = "sample", 9 | y = "CD99"), 10 | direction = "xy", 11 | brushId = "plot_brush1", 12 | outputId = "scatter1") 13 | 14 | brush2 <- list(xmin = 0.5, 15 | xmax = 1.5, 16 | ymin = 5, 17 | ymax = 15, 18 | mapping = list(x = "sample", 19 | y = "CDH"), 20 | direction = "xy", 21 | brushId = "plot_brush2", 22 | outputId = "scatter2") 23 | 24 | brush3 <- list(xmin = 0.5, 25 | xmax = 1.5, 26 | ymin = 10, 27 | ymax = 20, 28 | mapping = list(x = "sample", 29 | y = "PIN"), 30 | direction = "xy", 31 | brushId = "plot_brush3", 32 | outputId = "scatter3") 33 | 34 | Sys.sleep(0.5) 35 | app$setInputs(plotCount = 3) 36 | app$setInputs(Marker_1 = "CD99") 37 | app$setInputs(Marker_3 = "CDH") 38 | app$setInputs(Marker_5 = "PIN") 39 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 40 | app$setInputs(plot_brush2 = brush2, allowInputNoBinding_ = TRUE) 41 | app$setInputs(plot_brush3 = brush3, allowInputNoBinding_ = TRUE) 42 | app$snapshot() 43 | app$setInputs(tabbox1 = "tab2") 44 | app$setInputs(resetMarkers = "click") 45 | #app$snapshot() 46 | app$setInputs(plotCount = 1) 47 | app$snapshot() 48 | 49 | brush1 <- list(xmin = 0.5, 50 | xmax = 1.5, 51 | ymin = 12, 52 | ymax = 34, 53 | mapping = list(x = "sample", 54 | y = "CD99"), 55 | direction = "xy", 56 | brushId = "plot_brush1", 57 | outputId = "scatter1") 58 | 59 | app$setInputs(Marker_1 = "CD99") 60 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 61 | app$snapshot() 62 | app$setInputs(tabbox1 = "tab2") 63 | #app$snapshot() 64 | Sys.sleep(0.5) 65 | app$setInputs(resetMarkers = "click") 66 | Sys.sleep(0.5) 67 | #app$snapshot() 68 | app$setInputs(tabbox1 = "tab1") 69 | app$snapshot() 70 | app$setInputs(plotCount = 2) 71 | 72 | p <- app$.__enclos_env__$private$shinyProcess 73 | p$interrupt() 74 | p$wait() 75 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/004.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/005.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/006.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/007.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/008.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/complex_sample_change-expected/009.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/complex_sample_change.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("complex_sample_change") 3 | 4 | brush1 <- list(xmin = 0.5, 5 | xmax = 1.5, 6 | ymin = 12, 7 | ymax = 34, 8 | mapping = list(x = "sample", 9 | y = "CD99"), 10 | direction = "xy", 11 | brushId = "plot_brush1", 12 | outputId = "scatter1") 13 | 14 | brush2 <- list(xmin = 0.5, 15 | xmax = 1.5, 16 | ymin = 5, 17 | ymax = 15, 18 | mapping = list(x = "sample", 19 | y = "CDH"), 20 | direction = "xy", 21 | brushId = "plot_brush2", 22 | outputId = "scatter2") 23 | 24 | brush3 <- list(xmin = 0.5, 25 | xmax = 1.5, 26 | ymin = 10, 27 | ymax = 20, 28 | mapping = list(x = "sample", 29 | y = "PIN"), 30 | direction = "xy", 31 | brushId = "plot_brush3", 32 | outputId = "scatter3") 33 | 34 | Sys.sleep(0.5) 35 | app$setInputs(plotCount = 3) 36 | app$setInputs(Marker_1 = "CD99") 37 | app$setInputs(Marker_3 = "CDH") 38 | app$setInputs(Marker_5 = "PIN") 39 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 40 | app$setInputs(plot_brush2 = brush2, allowInputNoBinding_ = TRUE) 41 | app$setInputs(plot_brush3 = brush3, allowInputNoBinding_ = TRUE) 42 | app$snapshot() 43 | app$setInputs(tabbox1 = "tab2") 44 | app$setInputs(resetMarkers = "click") 45 | #app$snapshot() 46 | app$setInputs(sample = 2) 47 | app$snapshot() 48 | app$setInputs(tabbox1 = "tab2") 49 | #app$snapshot() 50 | app$setInputs(sample = 3) 51 | app$snapshot() 52 | app$setInputs(tabbox1 = "tab2") 53 | #app$snapshot() 54 | app$setInputs(`next.sample` = "click") 55 | Sys.sleep(0.5) 56 | app$snapshot() 57 | app$setInputs(tabbox1 = "tab2") 58 | #app$snapshot() 59 | app$setInputs(`next.sample` = "click") 60 | Sys.sleep(0.5) 61 | app$snapshot() 62 | app$setInputs(tabbox1 = "tab2") 63 | #app$snapshot() 64 | app$setInputs(`next.sample` = "click") 65 | Sys.sleep(0.5) 66 | app$snapshot() 67 | app$setInputs(tabbox1 = "tab2") 68 | #app$snapshot() 69 | app$setInputs(`previous.sample` = "click") 70 | Sys.sleep(0.5) 71 | app$snapshot() 72 | app$setInputs(tabbox1 = "tab2") 73 | #app$snapshot() 74 | app$setInputs(`previous.sample` = "click") 75 | Sys.sleep(0.5) 76 | app$snapshot() 77 | app$setInputs(tabbox1 = "tab2") 78 | #app$snapshot() 79 | app$setInputs(`previous.sample` = "click") 80 | Sys.sleep(0.5) 81 | app$snapshot() 82 | app$setInputs(tabbox1 = "tab2") 83 | #app$snapshot() 84 | 85 | 86 | p <- app$.__enclos_env__$private$shinyProcess 87 | p$interrupt() 88 | p$wait() 89 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/contrasts_set-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/contrasts_set.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("contrasts_set") 3 | 4 | brush1 <- list(xmin = 0.5, 5 | xmax = 1.5, 6 | ymin = 5, 7 | ymax = 40, 8 | mapping = list(x = "sample", 9 | y = "PIN"), 10 | direction = "xy", 11 | brushId = "plot_brush1", 12 | outputId = "scatter1") 13 | 14 | Sys.sleep(0.5) 15 | app$setInputs(Marker_1 = "PIN") 16 | app$setInputs(plot_brush1 = brush1, allowInputNoBinding_ = TRUE) 17 | app$snapshot() 18 | app$setInputs(tabbox1 = "tab2") 19 | #app$snapshot() 20 | app$setInputs(resetMarkers = "click") 21 | #app$snapshot() 22 | app$setInputs(contrast_marker_1 = 3) 23 | #app$snapshot() 24 | app$setInputs(contrast_marker_1 = 5) 25 | #app$snapshot() 26 | app$setInputs(exprs_marker_2 = "CD99") 27 | #app$snapshot() 28 | app$setInputs(contrast_marker_2 = 3) 29 | #app$snapshot() 30 | app$setInputs(contrast_marker_2 = 5) 31 | #app$snapshot() 32 | app$setInputs(sample = "2") 33 | app$snapshot() 34 | app$setInputs(tabbox1 = "tab2") 35 | #app$snapshot() 36 | app$setInputs(sample = "3") 37 | app$snapshot() 38 | app$setInputs(tabbox1 = "tab2") 39 | #app$snapshot() 40 | app$setInputs(contrast_marker_1 = 1) 41 | #app$snapshot() 42 | app$setInputs(contrast_marker_2 = 1) 43 | #app$snapshot() 44 | 45 | p <- app$.__enclos_env__$private$shinyProcess 46 | p$interrupt() 47 | p$wait() 48 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/marker_select-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/marker_select-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/marker_select-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/marker_select-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/marker_select.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("marker_select") 3 | 4 | Sys.sleep(0.5) 5 | app$setInputs(Marker_1 = "CD99") 6 | app$setInputs(tabbox1 = "tab2") 7 | #app$snapshot() 8 | app$setInputs(resetMarkers = "click") 9 | #app$snapshot() 10 | app$setInputs(Marker_2 = "PIN") 11 | app$snapshot() 12 | app$setInputs(tabbox1 = "tab2") 13 | #app$snapshot() 14 | app$setInputs(resetMarkers = "click") 15 | #app$snapshot() 16 | app$setInputs(Marker_2 = "CDH") 17 | app$snapshot() 18 | app$setInputs(tabbox1 = "tab2") 19 | #app$snapshot() 20 | app$setInputs(resetMarkers = "click") 21 | #app$snapshot() 22 | app$setInputs(exprs_marker_1 = "H3") 23 | #app$snapshot() 24 | app$setInputs(exprs_marker_2 = "CD8a") 25 | #app$snapshot() 26 | app$setInputs(resetMarkers = "click") 27 | #app$snapshot() 28 | 29 | p <- app$.__enclos_env__$private$shinyProcess 30 | p$interrupt() 31 | p$wait() 32 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/001.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/002.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/003.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/004.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/cytomapper/3314049b4233ca6fbc6c274dd6e01cf148b52e83/tests/testthat/apps/images_app/tests/shinytest/simple_assay_change-expected/005.png -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_assay_change.R: -------------------------------------------------------------------------------- 1 | app <- ShinyDriver$new("../../", loadTimeout = 100000, seed = 1234) 2 | app$snapshotInit("simple_assay_change") 3 | 4 | Sys.sleep(0.5) 5 | app$setInputs(Marker_1 = "CD99") 6 | app$setInputs(tabbox1 = "tab2") 7 | #app$snapshot() 8 | app$setInputs(assay = "exprs") 9 | app$snapshot() 10 | app$setInputs(tabbox1 = "tab2") 11 | #app$snapshot() 12 | app$setInputs(assay = "counts") 13 | app$snapshot() 14 | app$setInputs(tabbox1 = "tab2") 15 | #app$snapshot() 16 | app$setInputs(Marker_1 = "CDH") 17 | app$setInputs(tabbox1 = "tab2") 18 | app$setInputs(resetMarkers = "click") 19 | app$snapshot() 20 | app$setInputs(assay = "exprs") 21 | app$snapshot() 22 | app$setInputs(tabbox1 = "tab2") 23 | #app$snapshot() 24 | app$setInputs(assay = "counts") 25 | app$snapshot() 26 | app$setInputs(tabbox1 = "tab2") 27 | #app$snapshot() 28 | 29 | p <- app$.__enclos_env__$private$shinyProcess 30 | p$interrupt() 31 | p$wait() 32 | -------------------------------------------------------------------------------- /tests/testthat/apps/images_app/tests/shinytest/simple_gating-expected/001.json: -------------------------------------------------------------------------------- 1 | { 2 | "input": { 3 | "assay": "counts", 4 | "Help": 0, 5 | "labelCellsBy": "Cell-Type", 6 | "Marker_1": "", 7 | "Marker_2": "", 8 | "next.sample": 0, 9 | "plotCount": 1, 10 | "previous.sample": 0, 11 | "sample": "1", 12 | "SessionInfo": 0, 13 | "sidebar": null, 14 | "sidebarCollapsed": false, 15 | "sidebarItemExpanded": null, 16 | "tabbox1": "tab1" 17 | }, 18 | "output": { 19 | "AdditionalPlots_sidebar": { 20 | "html": "
\n

Plot 1<\/h3>\n
\n