├── .github ├── .gitignore └── workflows │ ├── build-checks-devel.yml │ ├── build-checks-release.yml │ └── docs.yml ├── .gitignore ├── DESCRIPTION ├── NAMESPACE ├── NEWS ├── R ├── aggregateNeighbors.R ├── binAcrossPixels.R ├── buildSpatialGraph.R ├── countInteractions.R ├── detectCommunity.R ├── detectSpatialContext.R ├── filterPixels.R ├── filterSpatialContext.R ├── findBorderCells.R ├── minDistToCells.R ├── patchDetection.R ├── patchSize.R ├── plotSpatial.R ├── plotSpatialContext.R ├── plotSpotHeatmap.R ├── readImagefromTXT.R ├── readSCEfromTXT.R ├── read_cpout.R ├── read_steinbock.R ├── show_cpout_features.R ├── testInteractions.R ├── utils.R └── validityChecks.R ├── README.md ├── inst ├── CITATION ├── extdata │ ├── mockData │ │ ├── cpout │ │ │ ├── Experiment.csv │ │ │ ├── Image.csv │ │ │ ├── Object_relationships.csv │ │ │ ├── cell.csv │ │ │ ├── panel.csv │ │ │ ├── var_Image.csv │ │ │ └── var_cell.csv │ │ ├── raw │ │ │ ├── 20210305_NE_mockData2_ROI_001_1.txt │ │ │ ├── 20210305_NE_mockData2_ROI_002_2.txt │ │ │ └── 20210305_NE_mockData2_ROI_003_3.txt │ │ ├── steinbock │ │ │ ├── images.csv │ │ │ ├── intensities │ │ │ │ ├── 20210305_NE_mockData1_001.csv │ │ │ │ ├── 20210305_NE_mockData1_002.csv │ │ │ │ ├── 20210305_NE_mockData1_003.csv │ │ │ │ ├── 20210305_NE_mockData2_001.csv │ │ │ │ ├── 20210305_NE_mockData2_002.csv │ │ │ │ ├── 20210305_NE_mockData2_003.csv │ │ │ │ ├── 20210305_NE_mockData3_001.csv │ │ │ │ ├── 20210305_NE_mockData3_002.csv │ │ │ │ ├── 20210305_NE_mockData3_003.csv │ │ │ │ ├── 20210305_NE_mockData4_001.csv │ │ │ │ ├── 20210305_NE_mockData4_002.csv │ │ │ │ ├── 20210305_NE_mockData4_003.csv │ │ │ │ ├── 20210305_NE_mockData5_001.csv │ │ │ │ ├── 20210305_NE_mockData5_002.csv │ │ │ │ └── 20210305_NE_mockData5_003.csv │ │ │ ├── neighbors │ │ │ │ ├── 20210305_NE_mockData1_001.csv │ │ │ │ ├── 20210305_NE_mockData1_002.csv │ │ │ │ ├── 20210305_NE_mockData1_003.csv │ │ │ │ ├── 20210305_NE_mockData2_001.csv │ │ │ │ ├── 20210305_NE_mockData2_002.csv │ │ │ │ ├── 20210305_NE_mockData2_003.csv │ │ │ │ ├── 20210305_NE_mockData3_001.csv │ │ │ │ ├── 20210305_NE_mockData3_002.csv │ │ │ │ ├── 20210305_NE_mockData3_003.csv │ │ │ │ ├── 20210305_NE_mockData4_001.csv │ │ │ │ ├── 20210305_NE_mockData4_002.csv │ │ │ │ ├── 20210305_NE_mockData4_003.csv │ │ │ │ ├── 20210305_NE_mockData5_001.csv │ │ │ │ ├── 20210305_NE_mockData5_002.csv │ │ │ │ └── 20210305_NE_mockData5_003.csv │ │ │ ├── panel.csv │ │ │ ├── regionprops │ │ │ │ ├── 20210305_NE_mockData1_001.csv │ │ │ │ ├── 20210305_NE_mockData1_002.csv │ │ │ │ ├── 20210305_NE_mockData1_003.csv │ │ │ │ ├── 20210305_NE_mockData2_001.csv │ │ │ │ ├── 20210305_NE_mockData2_002.csv │ │ │ │ ├── 20210305_NE_mockData2_003.csv │ │ │ │ ├── 20210305_NE_mockData3_001.csv │ │ │ │ ├── 20210305_NE_mockData3_002.csv │ │ │ │ ├── 20210305_NE_mockData3_003.csv │ │ │ │ ├── 20210305_NE_mockData4_001.csv │ │ │ │ ├── 20210305_NE_mockData4_002.csv │ │ │ │ ├── 20210305_NE_mockData4_003.csv │ │ │ │ ├── 20210305_NE_mockData5_001.csv │ │ │ │ ├── 20210305_NE_mockData5_002.csv │ │ │ │ └── 20210305_NE_mockData5_003.csv │ │ │ └── steinbock.sh │ │ └── tiffs │ │ │ └── 20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff │ └── spillover │ │ ├── Dy161.txt │ │ ├── Dy162.txt │ │ ├── Dy163.txt │ │ └── Dy164.txt └── scripts │ ├── download_TestData_cpout.Rmd │ ├── download_TestData_raw.Rmd │ ├── download_TestData_steinbock.Rmd │ └── download_spillover.Rmd ├── man ├── aggregateNeighbors.Rd ├── binAcrossPixels.Rd ├── buildSpatialGraph.Rd ├── countInteractions.Rd ├── detectCommunity.Rd ├── detectSpatialContext.Rd ├── filterPixels.Rd ├── filterSpatialContext.Rd ├── findBorderCells.Rd ├── minDistToCells.Rd ├── patchDetection.Rd ├── patchSize.Rd ├── plotSpatial.Rd ├── plotSpatialContext.Rd ├── plotSpotHeatmap.Rd ├── readImagefromTXT.Rd ├── readSCEfromTXT.Rd ├── read_cpout.Rd ├── read_steinbock.Rd ├── show_cpout_features.Rd └── testInteractions.Rd ├── tests ├── testthat.R └── testthat │ ├── test_aggregateNeighbors.R │ ├── test_binAcrossPixels.R │ ├── test_buildSpatialGraph.R │ ├── test_countInteractions.R │ ├── test_detectCommunity.R │ ├── test_detectSpatialContext.R │ ├── test_filterPixels.R │ ├── test_filterSpatialContext.R │ ├── test_findBorderCells.R │ ├── test_integration_interactions.R │ ├── test_minDistToCells.R │ ├── test_patchDetection.R │ ├── test_patchSize.R │ ├── test_plotSpatial.R │ ├── test_plotSpatialContext.R │ ├── test_plotSpotHeatmap.R │ ├── test_readImagefromTXT.R │ ├── test_readSCEfromTXT.R │ ├── test_read_cpout.R │ ├── test_read_steinbock.R │ ├── test_show_cpout_features.R │ └── test_testInteractions.R └── vignettes ├── imcRtools.Rmd ├── imcRtools_sticker.png └── library.bib /.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: 8 | - devel 9 | 10 | jobs: 11 | R-CMD-check: 12 | runs-on: ubuntu-latest 13 | container: rocker/r-ver:devel 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Query dependencies 19 | run: | 20 | install.packages('remotes') 21 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 22 | shell: Rscript {0} 23 | 24 | - name: Install system requirements 25 | run: | 26 | apt-get update 27 | apt-get install -y --no-install-recommends apt-utils 28 | apt-get install -y --no-install-recommends libharfbuzz-dev libfribidi-dev zlib1g-dev libfftw3-dev libxml2-dev libxt-dev curl libglpk-dev libcairo2-dev libmagick++-dev libcurl4-gnutls-dev libudunits2-dev libgdal-dev libproj-dev pandoc libnode-dev tk libv8-dev 29 | apt-get clean 30 | rm -rf /var/lib/apt/ilists/* 31 | 32 | - name: Install dependencies 33 | run: | 34 | install.packages("BiocManager") 35 | install.packages("svglite") 36 | BiocManager::install(version = "devel", update = TRUE, ask = FALSE, force = TRUE) 37 | remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpu = 2L) 38 | shell: Rscript {0} 39 | 40 | - name: Check 41 | run: | 42 | install.packages("rcmdcheck") 43 | rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") 44 | shell: Rscript {0} 45 | 46 | - name: BiocCheck 47 | run: | 48 | BiocManager::install("BiocCheck") 49 | BiocCheck::BiocCheck(".") 50 | shell: Rscript {0} 51 | 52 | - name: Session info 53 | run: | 54 | options(width = 100) 55 | pkgs <- installed.packages()[, "Package"] 56 | sessioninfo::session_info(pkgs, include_base = TRUE) 57 | shell: Rscript {0} 58 | -------------------------------------------------------------------------------- /.github/workflows/build-checks-release.yml: -------------------------------------------------------------------------------- 1 | name: build-checks-release 2 | 3 | on: 4 | push: 5 | branches: [ devel ] 6 | pull_request: 7 | branches: 8 | - devel 9 | 10 | jobs: 11 | R-CMD-check: 12 | runs-on: ubuntu-latest 13 | container: rocker/r-ver:latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Query dependencies 19 | run: | 20 | install.packages('remotes') 21 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 22 | shell: Rscript {0} 23 | 24 | - name: Install system requirements 25 | run: | 26 | apt-get update 27 | apt-get install -y --no-install-recommends apt-utils 28 | apt-get install -y --no-install-recommends zlib1g-dev libfftw3-dev libxml2-dev libxt-dev curl libglpk-dev libcairo2-dev libmagick++-dev libcurl4-gnutls-dev libudunits2-dev libproj-dev pandoc libgdal-dev libnode-dev 29 | apt-get clean 30 | rm -rf /var/lib/apt/ilists/* 31 | 32 | - name: Install dependencies 33 | run: | 34 | install.packages("BiocManager") 35 | remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpu = 2L) 36 | shell: Rscript {0} 37 | 38 | - name: Check 39 | run: | 40 | install.packages("rcmdcheck") 41 | rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") 42 | shell: Rscript {0} 43 | 44 | - name: BiocCheck 45 | run: | 46 | BiocManager::install("BiocCheck") 47 | BiocCheck::BiocCheck(".") 48 | shell: Rscript {0} 49 | 50 | - name: Test coverage 51 | run: | 52 | remotes::install_cran(c("covr")) 53 | covr::codecov() 54 | shell: Rscript {0} 55 | 56 | - name: Session info 57 | run: | 58 | options(width = 100) 59 | pkgs <- installed.packages()[, "Package"] 60 | sessioninfo::session_info(pkgs, include_base = TRUE) 61 | shell: Rscript {0} 62 | -------------------------------------------------------------------------------- /.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 dependecies 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 | */._* 3 | *.html 4 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: imcRtools 2 | Version: 1.15.0 3 | Title: Methods for imaging mass cytometry data analysis 4 | Description: 5 | This R package supports the handling and analysis of imaging mass cytometry 6 | and other highly multiplexed imaging data. The main functionality includes 7 | reading in single-cell data after image segmentation and measurement, data 8 | formatting to perform channel spillover correction and a number of spatial 9 | analysis approaches. First, cell-cell interactions are detected via spatial 10 | graph construction; these graphs can be visualized with cells representing 11 | nodes and interactions representing edges. Furthermore, per cell, its direct 12 | neighbours are summarized to allow spatial clustering. Per image/grouping 13 | level, interactions between types of cells are counted, averaged and 14 | compared against random permutations. In that way, types of cells that 15 | interact more (attraction) or less (avoidance) frequently than expected by 16 | chance are detected. 17 | Authors@R: 18 | c(person("Nils", "Eling", role = "aut"), 19 | person("Tobias", "Hoch", role = "ctb"), 20 | person("Vito", "Zanotelli", role = "ctb"), 21 | person("Jana", "Fischer", role = "ctb"), 22 | person("Daniel", "Schulz", role = c("ctb", "cre"),email = "daniel.schulz@uzh.ch",comment = c(ORCID = "0000-0002-0913-1678")), 23 | person("Lasse","Meyer", role = "ctb")) 24 | License: GPL-3 25 | Depends: 26 | R (>= 4.1), 27 | SpatialExperiment 28 | Imports: 29 | S4Vectors, 30 | stats, 31 | utils, 32 | SummarizedExperiment, 33 | methods, 34 | pheatmap, 35 | scuttle, 36 | stringr, 37 | readr, 38 | EBImage, 39 | cytomapper, 40 | abind, 41 | BiocParallel, 42 | viridis, 43 | dplyr, 44 | magrittr, 45 | DT, 46 | igraph, 47 | SingleCellExperiment, 48 | vroom, 49 | BiocNeighbors, 50 | RTriangle, 51 | ggraph, 52 | tidygraph, 53 | ggplot2, 54 | data.table, 55 | sf, 56 | concaveman, 57 | tidyselect, 58 | distances, 59 | MatrixGenerics, 60 | rlang, 61 | grDevices 62 | Suggests: 63 | CATALYST, 64 | grid, 65 | tidyr, 66 | BiocStyle, 67 | knitr, 68 | rmarkdown, 69 | markdown, 70 | testthat 71 | biocViews: ImmunoOncology, SingleCell, Spatial, DataImport, Clustering 72 | VignetteBuilder: knitr 73 | URL: https://github.com/BodenmillerGroup/imcRtools 74 | BugReports: https://github.com/BodenmillerGroup/imcRtools/issues 75 | RoxygenNote: 7.2.3 76 | Encoding: UTF-8 77 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(aggregateNeighbors) 4 | export(binAcrossPixels) 5 | export(buildSpatialGraph) 6 | export(countInteractions) 7 | export(detectCommunity) 8 | export(detectSpatialContext) 9 | export(filterPixels) 10 | export(filterSpatialContext) 11 | export(findBorderCells) 12 | export(minDistToCells) 13 | export(patchDetection) 14 | export(patchSize) 15 | export(plotSpatial) 16 | export(plotSpatialContext) 17 | export(plotSpotHeatmap) 18 | export(readImagefromTXT) 19 | export(readSCEfromTXT) 20 | export(read_cpout) 21 | export(read_steinbock) 22 | export(show_cpout_features) 23 | export(testInteractions) 24 | import(SingleCellExperiment) 25 | import(ggraph) 26 | importFrom(BiocNeighbors,KmknnParam) 27 | importFrom(BiocNeighbors,findKNN) 28 | importFrom(BiocNeighbors,findNeighbors) 29 | importFrom(BiocParallel,SerialParam) 30 | importFrom(BiocParallel,bplapply) 31 | importFrom(DT,datatable) 32 | importFrom(EBImage,Image) 33 | importFrom(MatrixGenerics,rowMins) 34 | importFrom(RTriangle,pslg) 35 | importFrom(RTriangle,triangulate) 36 | importFrom(S4Vectors,DataFrame) 37 | importFrom(S4Vectors,SelfHits) 38 | importFrom(S4Vectors,isRedundantHit) 39 | importFrom(S4Vectors,mcols) 40 | importFrom(S4Vectors,metadata) 41 | importFrom(SingleCellExperiment,SingleCellExperiment) 42 | importFrom(SingleCellExperiment,colData) 43 | importFrom(SingleCellExperiment,colPair) 44 | importFrom(SpatialExperiment,"spatialCoords<-") 45 | importFrom(SpatialExperiment,SpatialExperiment) 46 | importFrom(SpatialExperiment,spatialCoords) 47 | importFrom(SpatialExperiment,spatialCoordsNames) 48 | importFrom(SummarizedExperiment,"colData<-") 49 | importFrom(SummarizedExperiment,"metadata<-") 50 | importFrom(SummarizedExperiment,"rowData<-") 51 | importFrom(SummarizedExperiment,assay) 52 | importFrom(SummarizedExperiment,assayNames) 53 | importFrom(SummarizedExperiment,colData) 54 | importFrom(abind,abind) 55 | importFrom(concaveman,concaveman) 56 | importFrom(cytomapper,"channelNames<-") 57 | importFrom(cytomapper,CytoImageList) 58 | importFrom(cytomapper,channelNames) 59 | importFrom(data.table,":=") 60 | importFrom(data.table,CJ) 61 | importFrom(data.table,as.data.table) 62 | importFrom(data.table,data.table) 63 | importFrom(data.table,dcast) 64 | importFrom(data.table,dcast.data.table) 65 | importFrom(data.table,melt) 66 | importFrom(data.table,melt.data.table) 67 | importFrom(data.table,setnames) 68 | importFrom(data.table,setorder) 69 | importFrom(distances,distance_columns) 70 | importFrom(distances,distances) 71 | importFrom(dplyr,across) 72 | importFrom(dplyr,all_of) 73 | importFrom(dplyr,as_tibble) 74 | importFrom(dplyr,contains) 75 | importFrom(dplyr,count) 76 | importFrom(dplyr,filter) 77 | importFrom(dplyr,group_by_all) 78 | importFrom(dplyr,group_by_at) 79 | importFrom(dplyr,join_by) 80 | importFrom(dplyr,left_join) 81 | importFrom(dplyr,mutate) 82 | importFrom(dplyr,n) 83 | importFrom(dplyr,nest_by) 84 | importFrom(dplyr,pull) 85 | importFrom(dplyr,select) 86 | importFrom(dplyr,summarise) 87 | importFrom(dplyr,summarize) 88 | importFrom(dplyr,sym) 89 | importFrom(ggplot2,aes) 90 | importFrom(ggplot2,coord_fixed) 91 | importFrom(ggplot2,element_blank) 92 | importFrom(ggplot2,element_text) 93 | importFrom(ggplot2,ggtitle) 94 | importFrom(ggplot2,guide_colorbar) 95 | importFrom(ggplot2,guide_legend) 96 | importFrom(ggplot2,guides) 97 | importFrom(ggplot2,scale_color_manual) 98 | importFrom(ggplot2,scale_shape_manual) 99 | importFrom(ggplot2,scale_size_manual) 100 | importFrom(ggplot2,scale_x_reverse) 101 | importFrom(ggplot2,scale_y_reverse) 102 | importFrom(ggplot2,theme) 103 | importFrom(ggraph,geom_edge_link) 104 | importFrom(ggraph,geom_node_label) 105 | importFrom(ggraph,geom_node_point) 106 | importFrom(ggraph,ggraph) 107 | importFrom(grDevices,chull) 108 | importFrom(igraph,as.directed) 109 | importFrom(igraph,as.undirected) 110 | importFrom(igraph,as_edgelist) 111 | importFrom(igraph,cluster_louvain) 112 | importFrom(igraph,components) 113 | importFrom(igraph,graph_from_adj_list) 114 | importFrom(igraph,graph_from_data_frame) 115 | importFrom(igraph,graph_from_edgelist) 116 | importFrom(igraph,layout.sugiyama) 117 | importFrom(igraph,membership) 118 | importFrom(igraph,simplify) 119 | importFrom(igraph,sizes) 120 | importFrom(igraph,vertex_attr) 121 | importFrom(magrittr,"%>%") 122 | importFrom(methods,as) 123 | importFrom(methods,is) 124 | importFrom(pheatmap,pheatmap) 125 | importFrom(readr,cols) 126 | importFrom(readr,read_delim) 127 | importFrom(rlang,.data) 128 | importFrom(scuttle,aggregateAcrossCells) 129 | importFrom(sf,st_area) 130 | importFrom(sf,st_buffer) 131 | importFrom(sf,st_cast) 132 | importFrom(sf,st_distance) 133 | importFrom(sf,st_intersects) 134 | importFrom(sf,st_multipoint) 135 | importFrom(sf,st_polygon) 136 | importFrom(sf,st_sfc) 137 | importFrom(stats,dist) 138 | importFrom(stats,median) 139 | importFrom(stats,na.omit) 140 | importFrom(stats,sd) 141 | importFrom(stats,var) 142 | importFrom(stringr,str_count) 143 | importFrom(stringr,str_extract) 144 | importFrom(stringr,str_extract_all) 145 | importFrom(stringr,str_replace) 146 | importFrom(stringr,str_split) 147 | importFrom(tidygraph,tbl_graph) 148 | importFrom(tidyselect,all_of) 149 | importFrom(utils,getFromNamespace) 150 | importFrom(utils,globalVariables) 151 | importFrom(viridis,scale_color_viridis) 152 | importFrom(viridis,viridis) 153 | importFrom(vroom,vroom) 154 | -------------------------------------------------------------------------------- /R/binAcrossPixels.R: -------------------------------------------------------------------------------- 1 | #' @title Aggregate consecutive pixels per single-metal spot 2 | #' 3 | #' @description Helper function for estimating the spillover matrix. Per metal 4 | #' spot, consecutive pixels a aggregated (default: summed). 5 | #' 6 | #' @param object a \code{SingleCellExperiment} object containing pixel 7 | #' intensities for all channels. Individual pixels are stored as columns and 8 | #' channels are stored as rows. 9 | #' @param bin_size single numeric indicating how many consecutive pixels per 10 | #' spot should be aggregated. 11 | #' @param spot_id character string indicating which \code{colData(object)} entry 12 | #' stores the isotope names of the spotted metal. 13 | #' @param assay_type character string indicating which assay to use. 14 | #' @param statistic character string indicating the statistic to use for 15 | #' aggregating consecutive pixels. 16 | #' @param ... additional arguments passed to \code{aggregateAcrossCells} 17 | #' 18 | #' @return returns the binned pixel intensities in form of a 19 | #' \code{SingleCellExperiment} object 20 | #' 21 | #' @examples 22 | #' path <- system.file("extdata/spillover", package = "imcRtools") 23 | #' # Read in .txt files 24 | #' sce <- readSCEfromTXT(path) 25 | #' dim(sce) 26 | #' 27 | #' # Visualizes heatmap before aggregation 28 | #' plotSpotHeatmap(sce) 29 | #' 30 | #' # Sum consecutive pixels 31 | #' sce <- binAcrossPixels(sce, bin_size = 10) 32 | #' dim(sce) 33 | #' 34 | #' # Visualizes heatmap after aggregation 35 | #' plotSpotHeatmap(sce) 36 | #' 37 | #' @seealso \code{\link[scuttle]{aggregateAcrossCells}} for the aggregation 38 | #' function 39 | #' 40 | #' @author Nils Eling (\email{nils.eling@@dqbm.uzh.ch}) 41 | #' 42 | #' @importFrom scuttle aggregateAcrossCells 43 | #' @export 44 | binAcrossPixels <- function(object, 45 | bin_size, 46 | spot_id = "sample_id", 47 | assay_type = "counts", 48 | statistic = "sum", 49 | ...){ 50 | 51 | .valid.binAcrossPixels.input(object, bin_size, spot_id, assay_type) 52 | 53 | if (!statistic %in% c("sum", "mean", "median")) { 54 | stop("'statistic' must be 'sum', 'mean' or 'median'.") 55 | } 56 | 57 | cur_split_tmp <- split(object[[spot_id]], f = object[[spot_id]]) 58 | cur_split <- lapply(cur_split_tmp, function(x){ceiling(seq_along(x)/bin_size)}) 59 | 60 | if (!isTRUE(all.equal(as.vector(unlist(cur_split_tmp)), object[[spot_id]]))) { 61 | stop("Spot IDs of pixels within 'object' are not ordered alphabetically.") 62 | } 63 | 64 | cur_df <- DataFrame(spot_id = object[[spot_id]], 65 | bin = unlist(cur_split)) 66 | 67 | cur_out <- aggregateAcrossCells(object, cur_df, 68 | statistics = statistic, 69 | use.assay.type = assay_type, 70 | ...) 71 | 72 | return(cur_out) 73 | 74 | } 75 | -------------------------------------------------------------------------------- /R/filterPixels.R: -------------------------------------------------------------------------------- 1 | #' @title Filter pixels based on their assigned masses 2 | #' 3 | #' @description Helper function for estimating the spillover matrix. After 4 | #' assigning each pixel to a spotted mass, this function will filter 5 | #' incorrectly assigned pixels and remove small pixel sets. 6 | #' 7 | #' @param object a \code{SingleCellExperiment} object containing pixel 8 | #' intensities per channel. Individual pixels are stored as columns and 9 | #' channels are stored as rows. 10 | #' @param bc_id character string indicating which \code{colData(object)} entry 11 | #' stores the estimated mass 12 | #' @param spot_mass character string indicating which \code{colData(object)} 13 | #' entry stores the true isotope mass of the spotted metal. 14 | #' @param minevents single numeric indicating the threshold under which pixel 15 | #' sets are excluded from spillover estimation. 16 | #' @param correct_pixels logical indicating if incorrectly assigned pixels 17 | #' should be excluded from spillover estimation. 18 | #' 19 | #' @return returns a SingleCellExperiment object in which 20 | #' \code{colData(object)$bc_id} has been adjusted based on the filter 21 | #' criteria. 22 | #' 23 | #' @examples 24 | #' path <- system.file("extdata/spillover", package = "imcRtools") 25 | #' sce <- readSCEfromTXT(path) 26 | #' assay(sce, "exprs") <- asinh(counts(sce)/5) 27 | #' 28 | #' # Pre-process via CATALYST 29 | #' library(CATALYST) 30 | #' 31 | #' bc_key <- as.numeric(unique(sce$sample_mass)) 32 | #' sce <- assignPrelim(sce, bc_key = bc_key) 33 | #' sce <- estCutoffs(sce) 34 | #' sce <- applyCutoffs(sce) 35 | #' 36 | #' sce <- filterPixels(sce) 37 | #' 38 | #' table(sce$sample_mass, sce$bc_id) 39 | #' 40 | #' @author Vito Zanotelli, adapted by 41 | #' Nils Eling (\email{nils.eling@@dqbm.uzh.ch}) 42 | #' 43 | #' @importFrom SummarizedExperiment colData<- 44 | #' @export 45 | filterPixels <- function(object, 46 | bc_id = "bc_id", 47 | spot_mass = "sample_mass", 48 | minevents = 40, 49 | correct_pixels = TRUE){ 50 | 51 | .valid.filterPixels.input(object, bc_id, spot_mass, minevents, 52 | correct_pixels) 53 | 54 | cur_bcs <- as.character(colData(object)[[bc_id]]) 55 | cur_mass <- as.character(colData(object)[[spot_mass]]) 56 | 57 | if (correct_pixels) { 58 | cur_bcs[cur_bcs != "0" & cur_bcs != cur_mass] <- "0" 59 | } 60 | 61 | cur_stats <- table(cur_bcs) 62 | nonfreq <- names(cur_stats)[cur_stats < minevents] 63 | cur_bcs[cur_bcs %in% nonfreq] <- "0" 64 | 65 | colData(object)[[bc_id]] <- cur_bcs 66 | 67 | return(object) 68 | } 69 | -------------------------------------------------------------------------------- /R/findBorderCells.R: -------------------------------------------------------------------------------- 1 | #' @rdname findBorderCells 2 | #' @title Find cells at the image border 3 | #' 4 | #' @description 5 | #' Detection of cells close to the image border for subsequent exclusion from 6 | #' downstream analyses. 7 | #' 8 | #' @param object a \code{SingleCellExperiment} or \code{SpatialExperiment} 9 | #' object. 10 | #' @param img_id single character indicating the \code{colData(object)} entry 11 | #' containing the unique image identifiers. 12 | #' @param border_dist single numeric defining the distance to the image border. 13 | #' The image border here is defined as the minimum and maximum among the 14 | #' cells' x and y location. 15 | #' @param coords character vector of length 2 specifying the names of the 16 | #' \code{colData} (for a \code{SingleCellExperiment} object) or the 17 | #' \code{spatialCoords} entries indicating the cells' x and y locations. 18 | #' 19 | #' @return an object of \code{class(object)} containing the logical 20 | #' \code{border_cells} entry in the \code{colData} slot. 21 | #' 22 | #' @examples 23 | #' library(cytomapper) 24 | #' data("pancreasSCE") 25 | #' 26 | #' sce <- findBorderCells(pancreasSCE, img_id = "ImageNb", 27 | #' border_dist = 10) 28 | #' 29 | #' plotSpatial(sce, 30 | #' img_id = "ImageNb", 31 | #' node_color_by = "border_cells", 32 | #' scales = "free") 33 | #' 34 | #' @importFrom data.table as.data.table setnames 35 | #' @importFrom SpatialExperiment spatialCoords 36 | #' 37 | #' @export 38 | findBorderCells <- function(object, 39 | img_id, 40 | border_dist, 41 | coords = c("Pos_X", "Pos_Y")){ 42 | 43 | # Input check 44 | .valid.findBorderCells.input(object, img_id, border_dist, coords) 45 | 46 | if (is(object, "SpatialExperiment")) { 47 | cur_df <- as.data.table(cbind.data.frame(colData(object)[,img_id], 48 | spatialCoords(object)[,coords])) 49 | } else { 50 | cur_df <- as.data.table(colData(object)[,c(img_id, coords)]) 51 | } 52 | 53 | Pos_X <- Pos_Y <- border_cells <- NULL 54 | 55 | setnames(cur_df, old = names(cur_df), c("img_id", "Pos_X", "Pos_Y")) 56 | cur_df[,border_cells := Pos_X <= min(Pos_X) + border_dist | 57 | Pos_X >= max(Pos_X) - border_dist | 58 | Pos_Y <= min(Pos_Y) + border_dist | 59 | Pos_Y >= max(Pos_Y) - border_dist, by = img_id] 60 | colData(object)$border_cells <- cur_df$border_cells 61 | 62 | return(object) 63 | } 64 | -------------------------------------------------------------------------------- /R/patchSize.R: -------------------------------------------------------------------------------- 1 | #' @title Function to compute the area of c3ll patches 2 | #' 3 | #' @description This function constructs polygons around patch cells and 4 | #' computes their area. 5 | #' 6 | #' @param object a \code{SingleCellExperiment} or \code{SpatialExperiment} 7 | #' object 8 | #' @param patch_name single character indicating the \code{colData(object)} entry 9 | #' containing the patch cell identifiers. 10 | #' @param coords character vector of length 2 specifying the names of the 11 | #' \code{colData} (for a \code{SingleCellExperiment} object) or the 12 | #' \code{spatialCoords} entries of the cells' x and y locations. 13 | #' @param convex should the convex hull be computed to construct the polygon? 14 | #' Default: the concave hull is computed. 15 | #' 16 | #' @return A DataFrame object containing the patch identifier, the constructed 17 | #' polygon and the polygon size. 18 | #' 19 | #' @examples 20 | #' library(cytomapper) 21 | #' data(pancreasSCE) 22 | #' 23 | #' # Build interaction graph 24 | #' pancreasSCE <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 25 | #' type = "expansion", threshold = 20) 26 | #' 27 | #' # Detect patches of "celltype_B" cells 28 | #' pancreasSCE <- patchDetection(pancreasSCE, 29 | #' patch_cells = pancreasSCE$CellType == "celltype_B", 30 | #' expand_by = 5, img_id = "ImageNb", 31 | #' colPairName = "expansion_interaction_graph") 32 | #' 33 | #' # Compute the patch area 34 | #' patchSize(pancreasSCE) 35 | #' 36 | #' @author Nils Eling (\email{nils.eling@@dqbm.uzh.ch}) 37 | #' 38 | #' @importFrom sf st_area 39 | #' @export 40 | patchSize <- function(object, 41 | patch_name = "patch_id", 42 | coords = c("Pos_X", "Pos_Y"), 43 | convex = FALSE){ 44 | 45 | .valid.patchSize.input(object, patch_name, coords, convex) 46 | 47 | data <- polygon <- NULL 48 | 49 | if (is(object, "SpatialExperiment")) { 50 | out <- cbind(colData(object), spatialCoords(object)) %>% 51 | as_tibble %>% 52 | filter(!is.na(!!sym(patch_name))) %>% 53 | nest_by(!!sym(patch_name)) %>% 54 | summarize( 55 | polygon = list(.polygon_function(x = data, 56 | coords = coords, 57 | convex = convex)), 58 | size = ifelse(is.na(polygon), NA, st_area(polygon))) 59 | } else { 60 | out <- colData(object) %>% as_tibble %>% 61 | filter(!is.na(!!sym(patch_name))) %>% 62 | nest_by(!!sym(patch_name)) %>% 63 | summarize(polygon = list(.polygon_function(x = data, 64 | coords = coords, 65 | convex = convex)), 66 | size = ifelse(is.na(polygon), NA, st_area(polygon))) 67 | } 68 | 69 | return(as(out, "DataFrame")) 70 | } 71 | -------------------------------------------------------------------------------- /R/readImagefromTXT.R: -------------------------------------------------------------------------------- 1 | #' @title Reads one or multiple .txt files into a CytoImageList object 2 | #' 3 | #' @description Reader function to generate \code{\linkS4class{Image}} objects 4 | #' in form of a \code{\linkS4class{CytoImageList}} container from .txt files. 5 | #' 6 | #' @param path Full path to where the individual .txt files are located. This is 7 | #' usualy the path where the .mcd file is located. 8 | #' @param pattern pattern to select which files should be read in (default 9 | #' \code{".txt$"}). 10 | #' @param channel_pattern regular expression to select the channel names from 11 | #' the files. 12 | #' @param index_names exact names of the columns storing the x and y coordinates 13 | #' of the image 14 | #' @param BPPARAM parameters for parallelized reading in of images. 15 | #' This is only recommended for very large images. 16 | #' 17 | #' @return returns a \code{\linkS4class{CytoImageList}} object containing one 18 | #' \code{\linkS4class{Image}} object per .txt file. 19 | #' 20 | #' @section Imaging mass cytometry .txt files: 21 | #' As part of the raw data folder, the Hyperion imaging system writes out 22 | #' one .txt file per acquisition. These files store the ion counts per 23 | #' pixel and channel. 24 | #' 25 | #' This function reads these .txt files into a single 26 | #' \code{\linkS4class{CytoImageList}} object for downstream analysis. The 27 | #' \code{pattern} argument allows selection of all .txt files or a specific 28 | #' subset of files. The \code{\link[cytomapper]{channelNames}} of the 29 | #' \code{CytoImageList} object are determined by the \code{channel_pattern} 30 | #' argument. 31 | #' 32 | #' @examples 33 | #' path <- system.file("extdata/mockData/raw", package = "imcRtools") 34 | #' 35 | #' # Read in all images 36 | #' x <- readImagefromTXT(path) 37 | #' x 38 | #' 39 | #' # Read in specific files 40 | #' y <- readImagefromTXT(path, pattern = "ROI_002") 41 | #' y 42 | #' 43 | #' # Read in other channelNames 44 | #' z <- readImagefromTXT(path, channel_pattern = "[A-Za-z]{2}[0-9]{3}") 45 | #' z 46 | #' 47 | #' @seealso 48 | #' \code{\linkS4class{CytoImageList}} for the container 49 | #' 50 | #' \code{\link[BiocParallel]{MulticoreParam}} for parallelized processing 51 | #' 52 | #' \code{\linkS4class{Image}} for the multi-channel image object 53 | #' 54 | #' \code{vignette("cytomapper")} for visualization of multi-channel images 55 | #' 56 | #' @author Nils Eling (\email{nils.eling@@dqbm.uzh.ch}) 57 | #' 58 | #' @importFrom cytomapper CytoImageList channelNames<- channelNames 59 | #' @importFrom abind abind 60 | #' @importFrom BiocParallel bplapply SerialParam 61 | #' @importFrom EBImage Image 62 | #' @importFrom stringr str_extract 63 | #' @importFrom readr read_delim 64 | #' @export 65 | readImagefromTXT <- function(path, 66 | pattern = ".txt$", 67 | channel_pattern = "[A-Za-z]{1,2}[0-9]{2,3}Di", 68 | index_names = c("X", "Y"), 69 | BPPARAM = SerialParam()){ 70 | 71 | # Validity checks 72 | .valid.readImagefromTXT.input(path, pattern) 73 | 74 | cur_files <- list.files(path, pattern = pattern, full.names = TRUE) 75 | cur_names <- list.files(path, pattern = pattern, full.names = FALSE) 76 | 77 | cur_dat <- lapply(cur_files, read_delim, delim = "\t", 78 | show_col_types = FALSE) 79 | cur_dat <- bplapply(cur_dat, function(x){ 80 | 81 | if (sum(grepl(channel_pattern, colnames(x))) == 0) { 82 | stop("'channel_pattern' does not match", 83 | " any entries in the .txt files.") 84 | } 85 | 86 | cur_mat <- x[,grepl(channel_pattern, colnames(x))] 87 | 88 | if (!all(index_names %in% colnames(x))) { 89 | stop("'index_names' not in the names of the .txt files.") 90 | } 91 | 92 | cur_ind <- x[,index_names] 93 | 94 | n_row <- max(cur_ind[,index_names[1]]) + 1 95 | n_col <- max(cur_ind[,index_names[2]]) + 1 96 | 97 | cur_mat <- lapply(cur_mat, function(y){ 98 | matrix(y, nrow = n_row, ncol = n_col, byrow = FALSE) 99 | }) 100 | 101 | cur_mat <- do.call(abind, list(cur_mat, along = 3)) 102 | 103 | Image(cur_mat) 104 | }, BPPARAM = BPPARAM) 105 | 106 | cur_dat <- CytoImageList(cur_dat) 107 | names(cur_dat) <- sub("\\.[^.]*$", "", basename(cur_names)) 108 | 109 | channelNames(cur_dat) <- str_extract(channelNames(cur_dat), channel_pattern) 110 | 111 | return(cur_dat) 112 | } 113 | -------------------------------------------------------------------------------- /R/show_cpout_features.R: -------------------------------------------------------------------------------- 1 | #' @title Display all features measured by CellProfiler. 2 | #' 3 | #' @description Searchable datatable object of cell and image features as 4 | #' extracted by CellProfiler. 5 | #' 6 | #' @param path full path to the CellProfiler output folder 7 | #' @param display single character indicating which features to display. 8 | #' Accepted entries are \code{cell_features} to display extracted single-cell 9 | #' features or \code{image_features} to display extracted image-level features. 10 | #' @param cell_features single character indicating the name of the file storing 11 | #' the extracted cell features. 12 | #' @param image_features single character indicating the name of the file 13 | #' storing the extracted image features. 14 | #' 15 | #' @return a \code{\link[DT]{datatable}} object 16 | #' 17 | #' @examples 18 | #' path <- system.file("extdata/mockData/cpout", package = "imcRtools") 19 | #' 20 | #' # Display cell features 21 | #' show_cpout_features(path) 22 | #' 23 | #' # Display image features 24 | #' show_cpout_features(path, display = "image_features") 25 | #' 26 | #' @seealso \code{\link{read_cpout}} for the CellProfiler reader function 27 | #' 28 | #' @author Nils Eling (\email{nils.eling@@dqbm.uzh.ch}) 29 | #' 30 | #' @importFrom DT datatable 31 | #' @importFrom vroom vroom 32 | #' @export 33 | show_cpout_features <- function(path, 34 | display = c("cell_features", "image_features"), 35 | cell_features = "var_cell.csv", 36 | image_features = "var_Image.csv"){ 37 | 38 | display <- match.arg(display) 39 | 40 | if (!file.exists(file.path(path, eval(parse(text = display))))){ 41 | cur_text <- paste0("'", eval(parse(text = display)), 42 | "' does not exist in ", path) 43 | stop(cur_text) 44 | } 45 | 46 | cur_features <- vroom(file.path(path, eval(parse(text = display))), 47 | show_col_types = FALSE, progress = FALSE) 48 | 49 | datatable(cur_features) 50 | } 51 | -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | 2 | citHeader("To cite the package 'imcRtools' in publications use:") 3 | 4 | citEntry(entry="article", 5 | title = "An end-to-end workflow for multiplexed image processing and analysis", 6 | author = personList(as.person("Jonas Windhager"), 7 | as.person("Vito R.T. Zanotelli"), 8 | as.person("Daniel Schulz"), 9 | as.person("Lasse Meyer"), 10 | as.person("Michelle Daniel"), 11 | as.person("Bernd Bodenmiller"), 12 | as.person("Nils Eling")), 13 | year = 2023, 14 | journal = "Nature Protocols", 15 | doi = "10.1038/s41596-023-00881-0", 16 | textVersion = "Windhager, J., Zanotelli, V.R.T., Schulz, D. et al. An end-to-end workflow for multiplexed image processing and analysis. Nat Protoc (2023). https://doi.org/10.1038/s41596-023-00881-0") -------------------------------------------------------------------------------- /inst/extdata/mockData/cpout/panel.csv: -------------------------------------------------------------------------------- 1 | Tube Number,Metal Tag,Target,ilastik,full,deepcell,cellpose 2 | 625,Sm147,Laminin,0,1,, 3 | 1378,Yb172,H3K27Ac,1,1,1,1 4 | 2266,Pr141,Cytokeratin 5,0,1,2,2 5 | 2359,Eu153,YBX1,1,1,, 6 | ,Ag107,Ag107,1,1,, -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/images.csv: -------------------------------------------------------------------------------- 1 | image,width_px,height_px,num_channels,source_file,recovery_file,recovered,acquisition_id,acquisition_description,acquisition_start_x_um,acquisition_start_y_um,acquisition_end_x_um,acquisition_end_y_um,acquisition_width_um,acquisition_height_um 2 | 20210305_NE_mockData5_001.tiff,57,49,5,20210305_NE_mockData5.mcd,20210305_NE_mockData5_ROI_001_1.txt,False,1,ROI_001,34490.0,12435.0,34547.0,12386.0,57.0,49.0 3 | 20210305_NE_mockData5_002.tiff,93,69,5,20210305_NE_mockData5.mcd,20210305_NE_mockData5_ROI_002_2.txt,False,2,ROI_002,34215.0,12309.0,34308.0,12240.0,93.0,69.0 4 | 20210305_NE_mockData5_003.tiff,91,81,5,20210305_NE_mockData5.mcd,20210305_NE_mockData5_ROI_003_3.txt,False,3,ROI_003,35299.0,12843.0,35390.0,12762.0,91.0,81.0 5 | 20210305_NE_mockData4_001.tiff,35,29,5,20210305_NE_mockData4.mcd,20210305_NE_mockData4_ROI_001_1.txt,False,1,ROI_001,32131.0,12886.0,32166.0,12857.0,35.0,29.0 6 | 20210305_NE_mockData4_002.tiff,53,45,5,20210305_NE_mockData4.mcd,20210305_NE_mockData4_ROI_002_2.txt,False,2,ROI_002,32453.0,13194.0,32506.0,13149.0,53.0,45.0 7 | 20210305_NE_mockData4_003.tiff,82,54,5,20210305_NE_mockData4.mcd,20210305_NE_mockData4_ROI_003_3.txt,False,3,ROI_003,32373.0,13083.0,32455.0,13029.0,82.0,54.0 8 | 20210305_NE_mockData3_001.tiff,64,50,5,20210305_NE_mockData3.mcd,20210305_NE_mockData3_ROI_001_1.txt,False,1,ROI_001,17057.0,13485.0,17121.0,13435.0,64.0,50.0 9 | 20210305_NE_mockData3_002.tiff,59,54,5,20210305_NE_mockData3.mcd,20210305_NE_mockData3_ROI_002_2.txt,False,2,ROI_002,17073.0,13741.0,17132.0,13687.0,59.0,54.0 10 | 20210305_NE_mockData3_003.tiff,79,46,5,20210305_NE_mockData3.mcd,20210305_NE_mockData3_ROI_003_3.txt,False,3,ROI_003,17122.0,13504.0,17201.0,13458.0,79.0,46.0 11 | 20210305_NE_mockData2_001.tiff,103,87,5,20210305_NE_mockData2.mcd,20210305_NE_mockData2_ROI_001_1.txt,False,1,ROI_001,15242.0,12800.0,15345.0,12713.0,103.0,87.0 12 | 20210305_NE_mockData2_002.tiff,59,61,5,20210305_NE_mockData2.mcd,20210305_NE_mockData2_ROI_002_2.txt,False,2,ROI_002,15694.0,13247.0,15753.0,13186.0,59.0,61.0 13 | 20210305_NE_mockData2_003.tiff,53,54,5,20210305_NE_mockData2.mcd,20210305_NE_mockData2_ROI_003_3.txt,False,3,ROI_003,15919.0,13292.0,15972.0,13238.0,53.0,54.0 14 | 20210305_NE_mockData1_001.tiff,60,60,5,20210305_NE_mockData1.mcd,20210305_NE_mockData1_ROI_001_1.txt,False,1,ROI_001,31080.0,13449.0,31140.0,13389.0,60.0,60.0 15 | 20210305_NE_mockData1_002.tiff,64,51,5,20210305_NE_mockData1.mcd,20210305_NE_mockData1_ROI_002_2.txt,False,2,ROI_002,31884.0,14128.0,31948.0,14077.0,64.0,51.0 16 | 20210305_NE_mockData1_003.tiff,50,43,5,20210305_NE_mockData1.mcd,20210305_NE_mockData1_ROI_003_3.txt,False,3,ROI_003,31648.0,13349.0,31698.0,13306.0,50.0,43.0 17 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData1_001.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.09090909090909091,0.18181818181818182,0.09090909090909091,0.09090909090909091,0.9383063533089377 3 | 2,0.1811638048716954,0.0,0.14285714285714285,0.5014482906886509,1.003469433103289 4 | 3,0.20482163245861346,0.07692307692307693,0.20214260541475737,0.15384615384615385,0.8984988377644465 5 | 4,0.0,0.0,0.0,0.08624344212668282,0.3541263427053179 6 | 5,0.5036293268203735,0.0,0.0,0.0,0.6152833700180054 7 | 6,0.24262261390686035,0.22515279716915554,0.07304472393459743,0.15087725387679207,1.3701410624716017 8 | 7,0.1111111111111111,0.05555555555555555,0.0,0.08473039997948541,1.1414003802670374 9 | 8,0.0,0.1,0.1440024495124817,0.1,1.437891387939453 10 | 9,0.0,0.0,0.07692307692307693,0.0,1.2268304778979375 11 | 10,0.0,0.0,0.25,0.0,0.47393450140953064 12 | 11,0.07142857142857142,0.0,0.0,0.0,0.8892798253468105 13 | 12,0.043478260869565216,0.0,0.0,0.08695652173913043,1.4808433988819951 14 | 13,0.07692307692307693,0.07692307692307693,0.0,0.0,1.7355972069960375 15 | 14,0.0,0.0,0.1,0.0,0.7159563302993774 16 | 15,0.521193964914842,0.045454545454545456,0.09383481740951538,0.13636363636363635,0.7338118607347662 17 | 16,0.4818103551864624,0.0,0.0,0.0,1.1374428033828736 18 | 17,0.5545376214114103,0.18181818181818182,0.09090909090909091,0.0,1.7250295335596257 19 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData1_002.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,25.95716428756714,4.3803751319646835,0.7893503159284592,8.543220818042755,1.1984284818172455 3 | 2,17.75630189300677,20.937454283784287,0.8333534056987237,8.056470368980268,4.118487684004897 4 | 3,23.525939312848177,0.15818721055984497,0.6809534159573641,4.018878524953669,2.703742124817588 5 | 4,24.64270020150519,16.295698941528023,1.2871951758861542,4.333130395257628,2.5586605753217424 6 | 5,22.463626369353264,2.1790114679644184,0.07164154898735785,3.7384495773623065,4.509538658203617 7 | 6,25.39162945260807,26.19504576860642,1.2123623015929241,7.567651592955297,4.2560019687730435 8 | 7,23.327675519451017,0.2832112850681428,0.25520478910015476,5.443704589720695,4.290748742318923 9 | 8,20.848592518288413,55.15982630885678,5.004518258718797,8.428730451030496,6.8320470798162765 10 | 9,23.07453803582625,0.42309480905532837,1.2871286110444502,5.192588459361684,4.776389203288338 11 | 10,13.892751836776734,4.0507453298568725,0.617967945098877,2.835413032531738,3.3756445684432985 12 | 11,16.08570542741329,24.09106406252435,0.9057611886491167,8.669940202794177,8.682679597367631 13 | 12,12.104705572128296,0.5,0.46913374960422516,7.743903040885925,1.976126492023468 14 | 13,10.180746146043141,8.487537785371144,0.5878874023755392,4.367442957560221,8.302152903874715 15 | 14,5.159474074840546,0.40803350508213043,0.0,1.4745122194290161,1.3985407054424286 16 | 15,7.7426807433366776,0.45056796818971634,0.3656010031700134,2.687711466103792,6.699994660913944 17 | 16,9.392424960931143,0.09636189043521881,0.8315286586682001,5.925539011756579,1.7392532428105671 18 | 17,13.600418220395627,0.6744715675063755,0.840155391589455,9.039890211561453,6.804522778676904 19 | 18,24.2033375728698,11.715381758553642,0.40934168440955027,2.6185745029222396,6.661137921469552 20 | 19,18.450268516937893,26.10132837543885,0.3388431866963704,8.207912517090639,5.837020710110664 21 | 20,8.3302640914917,11.491207242012024,1.1769667714834213,3.265433967113495,1.6180363595485687 22 | 21,10.598465102059501,20.55508793081556,0.5644274456160409,3.5087749906948633,4.4834535769053865 23 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData1_003.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,2.5019488504954746,0.0,33.50506520271301,0.14337462186813354,5.855205280440194 3 | 2,34.61113481521606,20.900138195355733,56.94943321545919,3.5410444577534994,11.43835735321045 4 | 3,1.2212984144687653,0.577257239818573,43.967200756073,0.45823133587837217,7.19078831076622 5 | 4,0.9868977986849271,0.48689528611990124,46.63053402533898,0.2915794069950397,4.3889755721275625 6 | 5,20.485980274460534,20.481453609466552,25.782451178810813,2.9023234957998447,5.446259624307806 7 | 6,6.511207952834012,3.845613772931852,44.2595670934309,0.6119446252521715,10.293898113986902 8 | 7,7.873571276664734,6.1178067695526845,56.31488721711295,1.5778108267557054,7.675255372410729 9 | 8,23.149830265045168,25.759077110290526,2.3775324249267578,12.610792927742004,6.4847018027305605 10 | 9,16.891158444540842,30.698794869014193,3.8523405279432024,7.055544580732073,5.697084770883833 11 | 10,8.497299167844984,3.7555892694564093,55.17674770052471,1.1457281150515117,5.145502463219658 12 | 11,15.526001181453466,47.107573457062244,1.6374655608087778,7.556852601468563,8.57684381492436 13 | 12,28.158354816436766,36.05056044340134,3.4582459044456484,9.311961784362794,7.790038869380951 14 | 13,9.834077774532258,38.710749762398855,1.3357640599447584,11.313531676928202,4.889936625011384 15 | 14,16.874121597834996,45.18111697605678,1.2100532191140312,10.989066450936454,7.52338114465986 16 | 15,19.019284337759018,5.484892152249813,89.8672227859497,1.557644359767437,6.552613899111748 17 | 16,20.74962189950441,45.11870118191368,2.313545716436286,8.554768850928859,10.79528995877818 18 | 17,15.607115745544434,58.40884337425232,1.9691177606582642,18.173134756088256,3.204436254501343 19 | 18,7.9449264325878834,28.511150771921333,1.6579605584794825,6.310846894979477,3.555190248922868 20 | 19,47.32524607398293,49.2162616036155,2.0061381405050103,9.023335554383017,7.765908441760323 21 | 20,10.350853177938568,66.85331158155806,1.2910171713721885,9.954234640250045,8.9978919390882 22 | 21,21.069629352304,32.64441788649257,0.9336143520813954,11.117931521391567,6.530630404436136 23 | 22,23.173473618247293,59.23883103457364,1.6170285766774959,10.920333272760564,8.679642326181584 24 | 23,32.89180209589939,43.12884656120749,1.18109720360999,16.11802079630833,10.676162020832885 25 | 24,46.90763041847631,35.88113649267899,0.9135753230044716,18.71417658579977,13.163311105025443 26 | 25,54.52011511876033,57.449224362006554,1.1047494457318232,19.62688763325031,10.213213269527142 27 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData2_001.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.39965509957280654,0.034482758620689655,4.642012530359729,6.507055607335321,3.577796448921335 3 | 2,0.4287604130804539,0.09458689391613007,1.564711306244135,8.0167475938797,1.4679719656705856 4 | 3,0.705133505769678,0.05405405405405406,12.19957949986329,10.884136470588478,1.6269315529514004 5 | 4,0.06666666666666667,0.13333333333333333,0.9567224661509196,1.3292622884114584,1.119972546895345 6 | 5,0.6810750337747428,0.09969995572016789,3.45159707069397,9.015926366585951,4.547422462243301 7 | 6,0.4650946470131551,0.007518796992481203,1.2313854994630455,8.744936283369709,2.7812463197493016 8 | 7,0.7648899087423011,0.05569816842863831,2.9985769987106323,10.590918779373169,7.0574592593349985 9 | 8,0.5102118171494583,0.15816699225327063,1.2941516144522305,9.90739842118888,1.9660495519638062 10 | 9,0.4383224200558018,0.0,12.104410387374259,5.827275340621536,1.4324919533085179 11 | 10,0.37589792410532635,0.05885221229659186,1.8175903647034257,5.126732562427168,2.149655007653766 12 | 11,0.4,0.0,0.6274322986602783,2.419847917556763,1.4188434600830078 13 | 12,0.2530385877775109,0.0229977213818094,1.3551295840221902,11.767111099284628,2.953726677790932 14 | 13,0.621260636127912,0.08372083764809829,2.830246918476545,10.357561964255114,8.13908402965619 15 | 14,0.5189552207787832,0.11482200622558594,1.1803712606430055,8.20404711763064,7.076340107123057 16 | 15,0.09867111190420683,0.08648683790300714,0.604064935543498,5.75424946331587,1.5041905973778396 17 | 16,0.2949191122724299,0.05263157894736842,1.1392303349678976,7.0927022821024845,1.6070307263156824 18 | 17,0.5696998230048589,0.10133902856281825,1.171407665525164,10.11183376652854,8.501554823773247 19 | 18,0.4027652875069649,0.06846100861026395,0.8959075130762593,6.900937005396812,3.59787945401284 20 | 19,0.541573703289032,0.1338790643094766,4.994679977195432,8.2371207150546,7.299456981095401 21 | 20,0.0975609756097561,0.024390243902439025,0.9038807160970641,3.397096046587316,1.1585000142818545 22 | 21,0.4193642074997361,0.16216216216216217,0.6732056398649473,5.703735196912611,1.7584556985545803 23 | 22,0.12135681002698046,0.08132699956285193,12.8609480236439,2.870505594826759,2.0527052733492344 24 | 23,0.03125,0.0,0.28886181488633156,4.457205027341843,1.3224110677838326 25 | 24,0.42286556839942935,0.05731192231178284,1.2981701800227166,7.710970794558525,2.3462319222092627 26 | 25,0.3174678993896699,0.028169014084507043,0.8792941049790718,7.7430183602051,2.7576384510792478 27 | 26,0.4031162572943646,0.047505276790563614,1.0499261894087861,8.42305708622587,3.644725257935731 28 | 27,0.4315452460319765,0.046992671105169484,4.415229855045196,3.7081267535686493,2.3090803584744855 29 | 28,0.3155031857036409,0.02575065503044734,2.273369112658122,6.5111606565732805,1.9967787559070285 30 | 29,0.32186746639864783,0.0,2.1164519718715122,8.610601193564278,2.1843614510127476 31 | 30,0.058823529411764705,0.0,57.44034683003145,0.4978896730086383,1.2815317196004532 32 | 31,0.2678482301773564,0.06451612903225806,0.31855918130566996,3.1514902845505746,1.3434285925280662 33 | 32,0.646799303499269,0.06782097580992145,1.248984956814919,5.751183661413782,1.9121222565939398 34 | 33,0.05115455483633374,0.0,31.949667113167898,0.7599904243908231,1.4910530703408378 35 | 34,0.3325242634569661,0.06771663601478833,8.376519309503308,8.779184966944577,3.805032836252384 36 | 35,0.043478260869565216,0.06521739130434782,53.738601767498515,0.3491205158440963,1.5894944240217623 37 | 36,0.40714276738527444,0.06554882967171549,8.50808091924972,7.860274642455478,2.288665332463609 38 | 37,0.0,0.08695652173913043,42.853676754495375,0.6402921624805616,1.2399078426153765 39 | 38,0.049394151899549696,0.1259374353620741,54.726625463697644,0.5650552213191986,2.1601140154732597 40 | 39,0.48178605352129256,0.02857142857142857,3.205138761656625,5.2915603569575715,1.821737950188773 41 | 40,0.2301194171110789,0.027777777777777776,75.6501812140147,1.5824006473024685,2.985574778583315 42 | 41,0.41839446836304894,0.05057411749386093,5.436648583527908,6.722197846301551,6.028524769162669 43 | 42,0.44952922425371533,0.06969568323581776,2.7512676271986454,3.495858978717885,1.5158408474414906 44 | 43,0.2506421480860029,0.07869233403887067,40.09917505809239,7.039506869089036,9.476626694770086 45 | 44,0.0,0.15074822306632996,48.79403269290924,0.35687025139729184,1.4217608273029327 46 | 45,0.22519934588465199,0.034482758620689655,42.04077233939335,6.6959210099845095,2.989927189103488 47 | 46,0.7018131762742996,0.11556375523408254,5.964897409081459,6.82372909784317,1.9363084137439728 48 | 47,0.27922481298446655,0.0,45.0689500172933,2.1414762487014136,2.297351578871409 49 | 48,0.26945526662625763,0.05263157894736842,12.125615205419692,5.624056786298752,4.7109737945230385 50 | 49,0.37286340635876325,0.07173664625300917,13.184386774551037,5.336801933687787,2.0879557437674943 51 | 50,0.4360162134353931,0.04855026190097515,55.77141019472709,4.4259843207322636,3.17772153707651 52 | 51,0.09275537729263306,0.10714285714285714,57.14014877591814,0.5352509149483272,1.7325675913265772 53 | 52,0.03554467856884003,0.08333333333333333,5.339031716187795,0.08333333333333333,0.5123155117034912 54 | 53,0.413006950115812,0.04979136067888011,62.248015623161756,2.8029654967612117,2.7265007651370503 55 | 54,0.0667621778405231,0.10841300176537555,35.859004538992174,0.13992699851160464,1.3049779560254968 56 | 55,0.0,0.0,18.85778706414359,0.14285714285714285,0.9808682714189801 57 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData2_002.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.42734723179428663,0.14814814814814814,30.69079366436711,5.622160562762508,2.7718502989521734 3 | 2,0.35292668342590333,0.06666666666666667,7.866116491953532,5.795820999145508,2.5154155254364015 4 | 3,0.42370895962966115,0.046167182294945965,13.934698735412798,8.519584091086136,4.094976519283495 5 | 4,0.23008669912815094,0.0,0.4111023172736168,4.713036797940731,1.8919027149677277 6 | 5,0.06756570100784302,0.04,0.25060698032379153,8.613728094100953,2.5804660224914553 7 | 6,0.3379731595516205,0.0,0.5671495497226715,8.905865156650544,1.8456830024719237 8 | 7,0.20760228575729742,0.024390243902439025,0.5468343772539278,6.024696764422626,4.975516990917485 9 | 8,0.21518697057451522,0.0,0.21428571428571427,3.9870306508881703,2.0373947535242354 10 | 9,0.1469992090154577,0.26895936771675394,0.3576271180753355,5.450151187402231,1.7579987667225025 11 | 10,0.2897975808236657,0.141483146969865,0.40546264299532264,5.837915474321784,11.419219072272139 12 | 11,0.0,0.0,0.2791412512461344,9.18021264076233,2.74197256565094 13 | 12,0.10354537671467043,0.043833401405586385,0.2225649469303635,3.1314095821020738,11.880983293056488 14 | 13,0.1752431124448776,0.07596542835235595,0.462082502245903,4.839911571145057,12.315199367702007 15 | 14,0.12244897959183673,0.08163265306122448,0.3858103259485595,6.378329391382178,4.6357328137572935 16 | 15,0.16658855664848102,0.039603960396039604,0.31372141365957734,3.785807196456607,8.181156439356284 17 | 16,0.05262121531340453,0.04504504504504504,1.0441262002463814,3.160259265620429,6.83244243398443 18 | 17,0.21062232863228275,0.03773584905660377,4.800862771160197,6.2108927942671865,3.760040928732674 19 | 18,0.138940828036418,0.07094031730584338,0.8967771097622087,4.722167039339522,9.226006739962417 20 | 19,0.17401533235203137,0.0,3.866145334460519,5.762711622498252,2.417625318874012 21 | 20,0.13347039947026892,0.09932515591005736,0.46990320350550396,3.887655315519888,8.171673561953291 22 | 21,0.0,0.0,0.0,0.0,0.0 23 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData2_003.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.0,0.0,35.00823712348938,0.7139147222042084,1.9890956282615662 3 | 2,0.0,0.0,33.31746986934117,0.0,1.982086249760219 4 | 3,0.0,0.08333333333333333,32.844009478886925,0.0,3.3641597032546997 5 | 4,0.17512209028811068,0.07293555704323021,0.30017674452549703,2.850048260914313,7.009531873303491 6 | 5,0.6899443085377033,0.048962803987356335,0.5009210843306321,7.041304936775794,1.8324038432194636 7 | 6,0.46197060132638,0.05128205128205128,14.95586061783326,5.989896807915125,6.182300326151726 8 | 7,0.0,0.0,33.3722666572122,0.6309969074585858,2.311112971866832 9 | 8,0.0,0.0,1.2682632446289062,3.9052130699157717,1.4009344100952148 10 | 9,0.45695256559472336,0.05263157894736842,0.21052631578947367,7.066504867453324,4.451178149173134 11 | 10,0.29892709936414447,0.0,7.426990837710244,5.867960212911878,13.521633412156786 12 | 11,0.33328656469072615,0.08917118992124284,8.74082761832646,6.4632097806249345,9.67346019744873 13 | 12,0.24092719247264247,0.08781782273323305,0.7109528542846761,4.847468690205646,9.074603055113105 14 | 13,0.14041707221041905,0.06692273831099607,0.3438942753866817,6.177484482861637,6.235645911666785 15 | 14,0.25670866427883027,0.06451612903225806,0.08106608929172639,6.26512921817841,5.816573619842529 16 | 15,0.29886846623178254,0.01694915254237288,0.3245213658122693,5.584879271054672,6.127683722366721 17 | 16,0.1618143128136457,0.050158143043518066,0.5250195456763446,8.628814634630235,3.590440127809169 18 | 17,0.3024400715100563,0.020596767886210295,1.3518083654554551,6.661576770793246,3.9499824013413685 19 | 18,0.13333333333333333,0.0,1.3639886458714803,15.405676174163819,2.1109027306238812 20 | 19,0.1679510100413177,0.0847457627118644,0.24535767102645614,7.959869126142082,3.199824129120778 21 | 20,0.23703859249750772,0.08333333333333333,1.4946609735488892,7.053952157497406,2.3379401167233786 22 | 21,0.23700613042582636,0.04543352386225825,0.6913648464757464,4.455038956973864,2.595310654329217 23 | 22,0.402623230502719,0.047619047619047616,0.13768147286914645,10.989738555181594,2.2593820038295926 24 | 23,0.18702082633972167,0.03333333333333333,0.7797120730082194,12.591760206222535,1.8711830457051595 25 | 24,0.16660665223995844,0.06495385430753231,0.3479514146844546,7.8019392515222235,6.925830561667681 26 | 25,0.0,0.0,5.687510550022125,0.0,1.4153679410616558 27 | 26,0.08174335761148421,0.05671033507487813,0.3001253233581293,6.798361236931847,4.285121151658355 28 | 27,0.04256453514099121,0.05381927887598673,0.7258349378903707,9.00192214647929,3.7199877937634787 29 | 28,0.32019165479219874,0.03076923076923077,0.5336135845917922,7.001028805512648,2.001832151412964 30 | 29,0.0,0.0,0.3333333333333333,5.961897704336378,1.7175482643975153 31 | 30,0.06666666666666667,0.23019447326660156,0.4443489074707031,8.341032028198242,1.7501551787058511 32 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData3_001.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.31967514631699545,29.03417331345227,12.062073385837127,7.685774642594007,6.4569619066861215 3 | 2,0.3457037743769194,10.983404535996286,43.8792795382048,5.121213072224667,5.481333506734748 4 | 3,0.19145790213032773,24.211787642616976,0.6132382405431647,12.525135385362725,13.688247812421698 5 | 4,0.26559658611522,28.138866648954505,1.162442799876718,8.55513736079721,4.530004673144397 6 | 5,0.303557172574495,11.066027564751474,5.576683647695341,9.15686018090499,18.6191945954373 7 | 6,0.12039069652557373,23.766931538581847,18.448747732639312,8.938262090682983,3.2112149691581724 8 | 7,0.20669573545455933,29.39111534692347,0.7734110318124294,11.627235628664494,7.831155026331544 9 | 8,0.0,22.778099536895752,7.487902323404948,4.568759163220723,2.5838185946146646 10 | 9,0.3304615605111216,15.5931262736227,5.499174728113062,11.405229685353298,13.121989497951432 11 | 10,0.1797342130116054,17.33173139890035,46.05888757251558,6.7946529274895076,4.2199994041806175 12 | 11,0.2736247143846877,27.010033777419558,0.557966042072215,9.903360295802988,7.015915429338496 13 | 12,0.07142857142857142,17.05644782100405,46.395977003233774,2.769892062459673,5.368677582059588 14 | 13,0.19661835516276566,28.87435830157736,11.607598396747008,8.077570244022038,6.798389745795208 15 | 14,0.2649299105008443,19.254797037803765,0.5486130028059988,8.78661473050262,7.33181234923276 16 | 15,0.10526315789473684,19.405086943977757,9.549094451101203,7.064872315055446,2.384276114012066 17 | 16,0.28212919235229494,18.346771347522736,2.588945913314819,7.913173592090606,5.814029639959335 18 | 17,0.32496650608218447,28.84648334006874,0.5270295301262213,12.513538948127202,5.957568633313081 19 | 18,0.1300258374795681,9.163436404088648,36.0864907764807,2.5796656405053486,5.814172073108394 20 | 19,0.4828012281534623,37.21883910042899,0.5362448011125837,13.30725332182281,3.8972120722945855 21 | 20,0.6882945497830709,24.778562704722088,0.3761184240380923,12.098478945593039,11.800743768612543 22 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData3_002.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.2825403407216072,17.95343889296055,1.3233296871185303,9.717527805268764,11.243096773326396 3 | 2,0.27939324151901973,20.334954704557145,1.005025102978661,10.808132364636375,6.725141204538799 4 | 3,0.45106559112423755,27.569351716119733,0.23697287332816203,8.721016428509696,6.653848843496354 5 | 4,0.32270529866218567,37.36068885976618,0.2705802565271204,10.130643113092942,8.546528897502206 6 | 5,0.5406586329142252,18.70703725020091,2.3419422705968223,12.374156792958578,2.9102562268575034 7 | 6,0.35491757922702366,19.429973808924355,0.5747434642579821,9.421273220909967,8.726918941073947 8 | 7,0.23711503901571598,31.80768405266528,1.867756117064998,6.0076317922124325,4.915942054874492 9 | 8,0.41129037365317345,37.29224455356598,0.4965404272079468,9.642696410417557,8.613174855709076 10 | 9,0.22749310220990862,18.857234593800136,0.7230995076043265,13.946323987415859,7.597187692778451 11 | 10,0.3575570525192633,10.355645156488187,0.576023543753275,10.03880483348195,13.32234112809344 12 | 11,0.3287600949406624,9.489030309021473,4.7582539319992065,11.92921295762062,3.5278446674346924 13 | 12,0.22163152694702148,17.336372283788826,16.318609246840843,8.542091296269344,3.1008946941449094 14 | 13,0.21523081845250622,17.50340056624906,0.3050895929336548,10.291863320202664,11.245778414709815 15 | 14,0.3182488679885864,11.550053324018206,19.457025119236537,8.282182761601039,3.5485239369528636 16 | 15,0.1,16.987277030944824,0.4824720948934555,15.02157256603241,6.685822981595993 17 | 16,0.5521701357581399,21.608090660788797,0.19235146045684814,5.783043731342662,7.205848303708163 18 | 17,0.7797849973042806,30.36160933971405,0.7136527001857758,7.272190769513448,4.329571654399236 19 | 18,0.0,14.049716758728028,5.695052528381348,6.008988571166992,3.1668402194976806 20 | 19,0.21072581181159386,33.962236269162254,0.47886714110007655,9.109377310826229,9.263060982410725 21 | 20,0.5567319197732894,55.3770329991325,0.34229006923613003,8.354540226889439,8.466786312275245 22 | 21,0.1725572779558707,11.227207323779231,7.2541589857875435,9.18850328438524,8.602899815725243 23 | 22,0.42201614663714454,47.20659891764323,11.818213777882713,5.977741922651019,8.905811871801104 24 | 23,0.874705248865588,38.89754088171597,0.5938156267692303,11.079503873298908,4.16918669486868 25 | 24,1.045973336902158,79.69472437891467,0.8867280565459152,12.323827768194265,5.380809360537036 26 | 25,0.226177151788745,23.523590121352882,0.6403182431271202,5.5778038961845535,7.1087113007118825 27 | 26,0.55736977320451,12.123780543987568,0.7553216585746179,7.021953032566951,5.272130195911114 28 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData3_003.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.08333333333333333,17.049380511045456,24.866395870844524,1.0969769557317097,2.4358557860056558 3 | 2,0.4267625649770101,18.257153479258218,58.21162796020508,2.3124335130055744,6.3104705810546875 4 | 3,0.4059711432052871,34.68963707099527,2.677932391227302,2.473684675612692,5.707302014706499 5 | 4,0.2558118596181765,63.764308612425246,0.6417015692689917,3.0933556176803925,4.330147792349805 6 | 5,0.8172753280208956,122.05570983886719,6.514055498184696,5.099900630212599,2.7144274134789743 7 | 6,0.49468173980712893,80.94272333780924,1.0422200520833333,5.684833304087321,2.3685361703236896 8 | 7,0.4676088841564684,71.95568104824387,26.511641340083386,4.495295257453459,7.396814387964915 9 | 8,0.5019386932253838,85.14674456914265,0.125,8.675829152266184,3.415318086743355 10 | 9,0.32557392764735865,121.34879808168154,0.4465546704627372,3.441339019182566,2.629963059683104 11 | 10,0.22203831213066377,80.546734258353,0.6514828578535333,5.194401326308768,3.2356535239392015 12 | 11,0.39899425921232806,76.47072816931683,3.3088840194370435,2.4667510468026865,2.065439037654711 13 | 12,0.2962873422763717,32.165716110820505,10.148045737978439,3.632199293710816,4.523773564839027 14 | 13,0.7218273211093176,183.5530751546224,0.43730504172188894,2.1481840326672508,1.5067691462380546 15 | 14,0.3874966303507487,230.61757494055706,0.47089119925015216,4.659220572830974,4.192968656187472 16 | 15,0.3993912621548301,58.721535306227835,0.32371261245325994,4.135107476460306,3.0550146071534408 17 | 16,0.5123241373470852,274.05445752825057,0.7528441335473742,4.22359887616975,2.74462423154286 18 | 17,0.3044290393590927,53.515483665466306,0.4995690256357193,5.5681408762931826,5.693319107592106 19 | 18,0.2831645429134369,43.26002397537231,12.016792738437653,4.525404214859009,3.4568055838346483 20 | 19,0.5941404429349032,166.25634973699397,0.4622029716318304,4.303437995188164,1.6465541919072468 21 | 20,0.2691521167755127,158.49313100179037,0.7640158891677856,4.2905871868133545,2.4131456057230634 22 | 21,0.3280964983361108,72.4293348618916,0.7632891216448375,4.23478639125824,7.065283734883581 23 | 22,0.3365385286186052,40.32697569805643,1.5873422548174858,5.179564369761425,9.46755857700887 24 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData4_001.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.3245745102564494,0.09704324568825207,54.54370413018369,6.15397930419308,15.63132624516542 3 | 2,0.5033363392576575,0.1016274462454021,15.679105456918478,7.188816115260124,21.46225299499929 4 | 3,0.42154805446570776,0.06578231757541872,29.708626219686472,7.749916465777271,17.92251665187332 5 | 4,0.2738896672790115,0.05405405405405406,2.914601332432515,5.556000026496681,20.74999316318615 6 | 5,0.2739893259673283,0.04869190577802987,2.955743974652784,5.565564147357283,17.19112623148951 7 | 6,0.4242297247532875,0.03225806451612903,13.525740795558498,7.5249762900414,15.506300118661695 8 | 7,0.39366452260450885,0.09156582572243431,10.142809209197459,10.018919867698592,11.741081006599195 9 | 8,0.1595472296079,0.12148795127868653,11.526161869366964,8.211662060022354,14.806612771749496 10 | 9,0.5465883038662098,0.0,15.1152055616732,8.698105721561998,5.340202607490398 11 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData4_002.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.5998953851786527,0.11536809531125156,17.79255024953322,5.183334561911496,8.481767443093387 3 | 2,0.4234643259713816,0.0619760044785433,12.572703397551248,6.215821177460427,5.369499544764674 4 | 3,0.39473684210526316,0.10526315789473684,15.565422635329398,6.1866955474803325,10.220239959265056 5 | 4,0.49104604721069334,0.06666666666666667,18.940516090393068,4.603653148810069,7.650872993469238 6 | 5,0.5608236157164281,0.15625682169077348,3.6400818557155374,4.668728804101749,16.953732062359247 7 | 6,0.5135454378344796,0.09090909090909091,14.919795510985635,6.098705319924788,13.459867720170454 8 | 7,0.21817434472697123,0.03571428571428571,0.6214521250554493,4.461667026792254,19.23939562695367 9 | 8,0.3687463425970697,0.09098488634282892,34.10999306920287,4.827861857104611,17.80431542148838 10 | 9,0.11764705882352941,0.1599902440519894,0.9282649299677681,6.243830526576323,12.970004979301901 11 | 10,0.3829893307252364,0.06818181818181818,6.630163127725774,6.715202981775457,5.528641465035352 12 | 11,0.2688132378519798,0.13222530909946986,0.6452080230323636,5.054412547422915,20.727021728243148 13 | 12,0.42192037711067804,0.06349206349206349,46.53890876353733,6.440590905764746,14.980572011735704 14 | 13,0.4272448619206746,0.0,0.9328084389368693,4.57678574985928,18.379293481508892 15 | 14,0.25118719725995453,0.05435951497103717,0.49133585916983114,5.491818748615883,23.590597645656484 16 | 15,0.30192317377846195,0.05995366258441277,0.7676763242145754,8.162138731974476,13.495000848230326 17 | 16,0.25397760706183353,0.0751182723928381,20.089052435792524,5.887669788466559,21.348511127778043 18 | 17,0.3449204623699188,0.025,13.53734910786152,5.710882234573364,33.018408393859865 19 | 18,0.06378886461257935,0.06,122.20089057922364,2.31554345369339,5.360150189399719 20 | 19,0.1973467506468296,0.1083364188671112,17.679210958381493,4.959207780659199,32.553911512096725 21 | 20,0.20329166991370065,0.014285714285714285,13.019844484329223,4.3559455914156775,18.207440558501652 22 | 21,0.1437854390395315,0.04751810745189065,26.348963806503697,4.277694830768986,35.29372889117191 23 | 22,0.12198144378084125,0.033576770262284714,62.89281381741919,3.4534109385326657,11.123347765267498 24 | 23,0.038461538461538464,0.038461538461538464,122.81766128540039,0.27380985021591187,3.8708498753034153 25 | 24,0.11400810176250982,0.058823529411764705,64.91876108506146,6.281209136925492,12.520283102989197 26 | 25,0.0806377880713519,0.09959047506837283,44.904571044094425,3.5961945460123173,9.096486498327817 27 | 26,0.07692307692307693,0.0,133.0006103515625,0.4002473812836867,2.815931907066932 28 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData4_003.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.1714364236051386,0.04661989482966336,73.17044953866439,9.81380917267366,6.264037392356179 3 | 2,0.17231983351475985,0.07846791535905263,78.98415698819947,6.895587051956399,13.86844516379162 4 | 3,0.04906472516438318,0.0891686375178988,34.09511566918994,4.335311089243207,12.845235156634498 5 | 4,0.38455536524454753,0.04466546376546224,46.701134413083395,7.829015752474467,11.840408038099607 6 | 5,0.03333333333333333,0.18622347513834636,26.112419605255127,0.839434003829956,4.71673442920049 7 | 6,0.05555555555555555,0.07729966110653347,43.65797445509169,4.554947468969557,5.127542482482062 8 | 7,0.4007906553357147,0.023255813953488372,39.5216624459555,10.06268632134726,10.203077127767164 9 | 8,0.11948987108762146,0.05745096675685195,38.696855388703895,6.664829344045921,14.432744897779871 10 | 9,0.20763853371861468,0.07476026178842568,38.260923629783726,3.1056341866412795,12.902689533061292 11 | 10,0.25,0.08333333333333333,19.676395277182262,3.68081326285998,10.425509969393412 12 | 11,0.3557458811480066,0.06543024208234705,55.748716390651204,9.20504915714264,7.284766440806181 13 | 12,0.2562920485224043,0.1,31.296367643560682,6.130241542203086,13.470626326969692 14 | 13,0.3693365454673767,0.029411764705882353,8.881039829815135,4.201729760450475,11.714111002052531 15 | 14,0.3328509447051258,0.024390243902439025,1.568195030456636,6.723663126550069,20.20324913466849 16 | 15,0.14812833070755005,0.047619047619047616,1.281337320804596,4.61622847261883,8.70008735287757 17 | 16,0.6162857611974081,0.06397058377190241,80.83249326736208,7.039622263302879,8.975104557143318 18 | 17,0.05946848352076644,0.1605562052484286,29.247490228232692,4.943999953189139,11.441693261518317 19 | 18,0.09903211394945781,0.10452274564239714,4.930059873395496,5.391026187274191,26.82143460876412 20 | 19,0.23042184776730007,0.07729966110653347,17.440841886732315,6.599604851669735,19.07312552134196 21 | 20,0.14519989490509033,0.1186283997126988,2.0326012827101207,6.868182765112983,21.824830806444563 22 | 21,0.10720517447120265,0.19423235717572665,1.3508384133640088,9.923719217902736,4.702799979009126 23 | 22,0.41908946136633557,0.08333333333333333,22.243659615516663,4.820851882298787,21.153762976328533 24 | 23,0.8011853729977327,0.04183275909984813,87.27596667233635,9.494875115506789,11.346345165196587 25 | 24,0.14555810928344726,0.06,0.7347089338302613,6.914175426959991,14.814373626708985 26 | 25,0.16303536997121923,0.014705882352941176,15.802898417500888,8.751670875970055,14.231539720998091 27 | 26,0.08,0.04,0.8999105310440063,5.557310714721679,4.639729890823364 28 | 27,0.47588236655219124,0.052240597999702064,34.696454025931274,10.154365525407306,13.755302837339498 29 | 28,0.47974629171432986,0.016129032258064516,9.197531961625621,6.977418186203126,25.64173992987602 30 | 29,0.08091361903482014,0.07387485934628381,20.91643068856663,7.458797030978733,10.39192313949267 31 | 30,0.3572317361831665,0.0,50.092703925238716,8.97731128666136,4.290028625064426 32 | 31,0.21611782908439636,0.0,11.63771320382754,7.811355213324229,15.515924702088038 33 | 32,0.2731093475312898,0.1343179236758839,14.461143907272454,11.662453764315808,19.74759456063762 34 | 33,0.0484419550214495,0.03571428571428571,48.2999975340707,4.089467780930655,11.7934296642031 35 | 34,0.05298338830471039,0.0,58.43725474675497,2.689544195930163,8.027366856733957 36 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData5_001.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.1717709871855649,0.022727272727272728,0.47568896277384326,5.793745306405154,6.062795546921817 3 | 2,0.21456395120036845,0.08163265306122448,0.9806933403015137,4.95090867791857,12.441136927020793 4 | 3,0.2354490097532881,0.045984980907846,0.9699222280624065,6.237181602640355,4.125811731561702 5 | 4,0.7019552029669285,0.0625,1.1744188219308853,9.417389139533043,8.51183208450675 6 | 5,0.3072464112882261,0.07407407407407407,0.3900714803625036,5.1547492080264625,3.5112667127891823 7 | 6,0.4164343096993186,0.06663290556375083,0.804155673299517,6.849683481377441,7.590423844464413 8 | 7,0.44287586212158203,0.11130976049523604,2.629047893641288,6.488777474353188,3.8060452917165923 9 | 8,0.4552820316132377,0.10433955402935252,0.48226584055844474,6.68703292222584,23.8163522429326 10 | 9,0.35846231822614316,0.037037037037037035,0.4896500927430612,10.766416099336412,17.447529881088823 11 | 10,0.27179897026937516,0.04918032786885246,0.8777940029003581,6.301479706998731,9.6033501507806 12 | 11,0.044444444444444446,0.009507670667436388,1.5247009515762329,10.312939914067586,5.760318439536625 13 | 12,0.3430729845295782,0.10858513738798059,18.530458178209223,4.8076717646225635,8.24158315554909 14 | 13,0.21933012633096605,0.07142857142857142,1.3217180832510902,9.48085604679017,12.818896764800662 15 | 14,0.7397757865661798,0.10220332478368005,0.676876166532206,7.012897864330647,8.366645198921825 16 | 15,0.38006111127989634,0.07649170713765281,1.0432782833065306,6.490167998841831,8.217258789709636 17 | 16,0.5672280675656086,0.061602417681668256,0.43906781480119034,5.630102636040868,6.979848690935083 18 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData5_002.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.5458419162493485,0.08002283634283604,2.9004818139932094,6.287672331699958,4.7872058886748095 3 | 2,0.7372065169470651,0.02857142857142857,0.6797107424054827,7.341669811521258,3.9208932876586915 4 | 3,0.952359793515041,0.1170247012171252,0.7231301398112856,9.459601299516086,6.768773070697127 5 | 4,0.7658103194087744,0.04013420790433884,3.1096176251769068,7.9691295072436334,6.278136016428471 6 | 5,0.6438542746883982,0.049596093595027924,0.8487405163400313,8.423694845508127,4.720477887812783 7 | 6,0.47759059948079724,0.0696837306022644,0.5573265990790199,7.1248720183092,6.7673997326808815 8 | 7,0.5957620314189366,0.03571428571428571,0.5328297061579568,7.079281151294708,8.952011930091041 9 | 8,0.21397140665965922,0.08647664054101255,3.9976752906286417,7.797997057938776,14.592018050305983 10 | 9,0.644678334137062,0.025974025974025976,0.6820780189780445,6.856749995962366,7.361634825731253 11 | 10,0.5429347435633342,0.07358163793881735,0.5685596446196238,9.134267403682072,6.625192026297252 12 | 11,0.3273027296419497,0.07407407407407407,1.980811642275916,8.931908280761153,4.711195917041214 13 | 12,0.6061785951737435,0.0999610750905929,0.826435181402391,7.304393062668462,6.70473866116616 14 | 13,0.4259132085702358,0.02564102564102564,9.139648633125502,8.824228002474857,14.916995546756647 15 | 14,0.28480190860814064,0.05172413793103448,12.51848040366995,7.094892228471822,12.44357821448096 16 | 15,0.7184188596663936,0.03225806451612903,12.775522247437507,12.294188868614935,4.2377111556068545 17 | 16,0.8948656134307384,0.08751821052283049,0.937109749764204,6.562157271429896,5.4568616561591625 18 | 17,0.3440622648183447,0.06745825718789206,0.9748906797736231,8.20213232662556,4.6962448132299155 19 | 18,0.48990540314411773,0.028985507246376812,16.154757497967154,9.036228407984195,8.87648649405742 20 | 19,0.481938114980372,0.04878048780487805,7.237108681260086,11.981046769677139,4.581568587117079 21 | 20,0.38495366737760345,0.10062709759021628,38.85862941577517,11.225945768685177,13.290971854637409 22 | 21,0.48138941837860655,0.040672133634756275,13.182451232059583,9.232034734777502,10.28159539227013 23 | 22,0.09613381205378352,0.022234596110679006,38.92176371973914,7.117548224088308,6.340235329157597 24 | 23,0.4353620211283366,0.0300097127755483,10.486992943286896,8.264748744169871,14.494795523087184 25 | 24,0.23431687647441649,0.047693528094381654,82.97627471527963,4.324287372939992,3.7023740652597175 26 | 25,0.1193550603730338,0.05020867075238909,50.96550859723772,2.745442177568163,5.41220166512898 27 | 26,0.7550566873034915,0.02702702702702703,21.407134481378502,4.905616152125436,3.126175000860884 28 | 27,0.4565114484113805,0.055016524651471305,25.42730797248728,5.044493173150455,11.823773034179911 29 | 28,0.3122667960218481,0.06948746539450981,36.693260341077234,8.098133320743973,14.609728632746515 30 | 29,0.03125,0.09375,22.803048741072416,1.222010537981987,3.14743959531188 31 | 30,0.4868391375057399,0.046875,50.914587169885635,4.926626721397042,6.358861424028873 32 | 31,0.6808175799822567,0.05106579775762076,21.037965521667942,6.142542220125295,6.9056227556382765 33 | 32,0.7121661213728098,0.07882881470215626,22.851411347205822,7.513645946979523,5.3679762826516075 34 | 33,0.37712713009045445,0.06172839506172839,6.081877499450872,5.623366563408463,2.433102253778481 35 | 34,0.1844585587960163,0.034326049435229704,2.836330154469905,6.19183161854744,6.596314483926497 36 | 35,0.32210278074915816,0.0,28.252543482838608,6.563541351295099,5.686613828670688 37 | 36,0.24936563250244848,0.08393757627499814,17.690288797711695,5.439806977644661,7.123188946420783 38 | 37,0.5595375099921063,0.11433197537513629,0.8874693047510435,7.394751623885273,7.874724665733233 39 | 38,0.5117948337605125,0.08776091274462249,17.80983599236137,4.413516374010789,10.002820981176276 40 | 39,0.45176680173192707,0.13596991981778825,36.11894197549139,6.356129427041326,9.08701565861702 41 | 40,0.4058857130056078,0.03245564482428811,0.3482508496804671,6.815215766429901,1.5325628437779166 42 | 41,0.7645782208442689,0.159147736231486,2.2385629765192667,5.900551195144653,2.6920990546544394 43 | 42,0.24611445069313048,0.05,2.8503270924091337,0.7681510627269745,1.2239224910736084 44 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/intensities/20210305_NE_mockData5_003.csv: -------------------------------------------------------------------------------- 1 | Object,Ag107,Cytokeratin 5,Laminin,YBX1,H3K27Ac 2 | 1,0.33408536868435995,0.09562803379126958,0.7390898806708199,3.146509515387671,10.473720135433334 3 | 2,0.3681068244527598,0.0880965033515555,0.256061170921951,3.6919384628045755,12.517299179170953 4 | 3,0.3183602556890371,0.04081632653061224,0.15957912376948766,2.7603992272396476,8.181618435042244 5 | 4,0.048403436282895645,0.09433962264150944,0.35167461071374284,4.146063527970944,28.641730346769656 6 | 5,0.28408750421122503,0.05609749806554694,0.616835826321652,3.9079634233524927,7.563815342752557 7 | 6,0.5624928728478854,0.09747006658647882,0.32947854331282317,3.828638171563383,22.360406220936383 8 | 7,0.06382978723404255,0.10638297872340426,0.2328422247095311,3.2299269691426704,7.167191487677554 9 | 8,0.07142857142857142,0.07142857142857142,0.7811850564820426,4.8594686814716885,4.815909564495087 10 | 9,0.4313475832794652,0.10231508991935036,0.41348112954033744,3.5619968693665784,11.048619548479715 11 | 10,0.2818625670212966,0.03076923076923077,0.33805124576275164,5.443069674418523,10.141547421308664 12 | 11,0.09152405099435286,0.09147627064675996,0.3262563167196332,4.718569961461154,12.344059088013388 13 | 12,0.5049125283165316,0.06977434390414078,0.6418941189757491,4.976096730316635,8.334556637612064 14 | 13,0.18026449369347614,0.043478260869565216,0.47606952034908795,3.771098979141401,5.581627283407294 15 | 14,0.22516350009862116,0.1453603085349588,0.45850016965585594,5.126357211786158,38.824689728372235 16 | 15,0.2808942159016927,0.10065180195702447,0.4354448954264323,4.419371753268772,8.73077466752794 17 | 16,0.3116465761111333,0.05904868703622084,0.5349629177496984,8.782838734296652,5.697902991221501 18 | 17,0.10410176885539088,0.034482758620689655,0.2567846528415022,5.15283151330619,18.575914448705213 19 | 18,0.4780257070765776,0.047058823529411764,0.5206727055942311,5.628385193207684,5.975262556356542 20 | 19,0.11886234252483814,0.042138869692752885,0.3292590472605321,5.117248801441936,15.325224771128072 21 | 20,0.39928999845532404,0.16691972898400348,0.8728329755257869,5.533186986826468,15.229208198146544 22 | 21,0.5606906789800395,0.12485733498697696,0.5946079868337383,4.7621797737867935,16.50756734609604 23 | 22,0.35032769590616225,0.05814596861600876,0.41146960109472275,9.45085087120533,12.26369600892067 24 | 23,0.45629184405008955,0.07955869674682617,0.2255762767791748,8.247468277613322,7.057875153223674 25 | 24,0.4239350940499987,0.08924087030547005,1.0613543561526708,3.7990103363990784,3.5928600004741122 26 | 25,0.3883810111454555,0.11428571428571428,1.3095379965645926,3.8911614554268974,9.045133331843784 27 | 26,0.9590006482367422,0.15483079470840155,0.7679348459430769,7.312266630284927,12.530675705741434 28 | 27,0.6992189586162567,0.06742959672754462,0.15428011796691202,7.400407434864477,10.02090869979425 29 | 28,0.1111111111111111,0.0,0.24429627921846178,8.227679173151651,3.7617445720566645 30 | 29,0.3574077479979571,0.14158732750836542,0.24872852213242475,6.679019508642309,14.221722651930417 31 | 30,0.5364694347921407,0.03773584905660377,0.7848697743325863,7.28146407289325,16.14815745713576 32 | 31,0.34898925849369594,0.10494016238621302,0.43456332513264245,7.55826941217695,7.89591235433306 33 | 32,0.6763378654207503,0.20369125093732562,0.6017370905194964,6.439740875789098,4.883066875594003 34 | 33,0.47692277282476425,0.09375,0.20748146623373032,4.262234676629305,5.309991031885147 35 | 34,0.2484545579978398,0.03571428571428571,0.40170578232833315,7.5112340705735345,9.778764667255539 36 | 35,0.42931076015035313,0.10514151056607564,0.7408888141314188,7.5963953112562494,21.434340946376324 37 | 36,0.4548566263654958,0.09288627168406612,0.4281416716782943,7.004468223322993,8.346667460773302 38 | 37,0.38933296692677033,0.17417284464224791,0.39685009993039644,5.522789722833878,19.022328826097343 39 | 38,0.27369927345438205,0.1078302226168044,0.4734776641460175,6.033287748377374,15.49499098798062 40 | 39,0.2718068619032164,0.08877400127617088,0.47504462422551336,4.599256112768844,13.428654145550084 41 | 40,0.8157351998721852,0.0,0.25136033226461973,3.4155339563594147,7.540455460548401 42 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData1_001.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,3, 3 | 3,1, 4 | 3,5, 5 | 3,6, 6 | 3,7, 7 | 5,3, 8 | 5,7, 9 | 5,9, 10 | 6,3, 11 | 6,7, 12 | 6,8, 13 | 7,3, 14 | 7,5, 15 | 7,6, 16 | 7,8, 17 | 7,9, 18 | 7,11, 19 | 8,6, 20 | 8,7, 21 | 8,11, 22 | 8,12, 23 | 9,5, 24 | 9,7, 25 | 9,11, 26 | 10,13, 27 | 10,14, 28 | 11,7, 29 | 11,8, 30 | 11,9, 31 | 11,12, 32 | 12,8, 33 | 12,11, 34 | 12,13, 35 | 12,15, 36 | 13,10, 37 | 13,12, 38 | 13,14, 39 | 13,15, 40 | 14,10, 41 | 14,13, 42 | 14,15, 43 | 15,12, 44 | 15,13, 45 | 15,14, 46 | 15,16, 47 | 15,17, 48 | 16,15, 49 | 16,17, 50 | 17,15, 51 | 17,16, 52 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData1_002.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,4, 3 | 2,6, 4 | 2,8, 5 | 3,5, 6 | 3,7, 7 | 3,9, 8 | 4,1, 9 | 4,10, 10 | 5,3, 11 | 5,6, 12 | 5,9, 13 | 5,11, 14 | 6,2, 15 | 6,5, 16 | 6,8, 17 | 6,11, 18 | 7,3, 19 | 7,9, 20 | 7,10, 21 | 8,2, 22 | 8,6, 23 | 8,11, 24 | 8,13, 25 | 9,3, 26 | 9,5, 27 | 9,7, 28 | 9,11, 29 | 9,12, 30 | 10,4, 31 | 10,7, 32 | 10,14, 33 | 10,16, 34 | 10,18, 35 | 11,5, 36 | 11,6, 37 | 11,8, 38 | 11,9, 39 | 11,12, 40 | 11,13, 41 | 11,15, 42 | 12,9, 43 | 12,11, 44 | 12,15, 45 | 12,17, 46 | 13,8, 47 | 13,11, 48 | 13,15, 49 | 14,10, 50 | 14,16, 51 | 15,11, 52 | 15,12, 53 | 15,13, 54 | 15,17, 55 | 15,20, 56 | 16,10, 57 | 16,14, 58 | 16,17, 59 | 16,18, 60 | 16,19, 61 | 17,12, 62 | 17,15, 63 | 17,16, 64 | 17,19, 65 | 17,20, 66 | 17,21, 67 | 18,10, 68 | 18,16, 69 | 18,19, 70 | 19,16, 71 | 19,17, 72 | 19,18, 73 | 19,21, 74 | 20,15, 75 | 20,17, 76 | 20,21, 77 | 21,17, 78 | 21,19, 79 | 21,20, 80 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData1_003.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,5, 3 | 1,10, 4 | 2,5, 5 | 2,6, 6 | 2,8, 7 | 3,4, 8 | 3,6, 9 | 3,7, 10 | 4,3, 11 | 4,7, 12 | 5,1, 13 | 5,2, 14 | 5,8, 15 | 5,10, 16 | 6,2, 17 | 6,3, 18 | 6,7, 19 | 6,8, 20 | 6,9, 21 | 7,3, 22 | 7,4, 23 | 7,6, 24 | 7,11, 25 | 8,2, 26 | 8,5, 27 | 8,6, 28 | 8,9, 29 | 8,10, 30 | 8,12, 31 | 8,13, 32 | 9,6, 33 | 9,8, 34 | 9,13, 35 | 10,1, 36 | 10,5, 37 | 10,8, 38 | 10,12, 39 | 10,15, 40 | 11,7, 41 | 11,14, 42 | 11,17, 43 | 11,20, 44 | 12,8, 45 | 12,10, 46 | 12,13, 47 | 12,15, 48 | 12,16, 49 | 12,19, 50 | 13,8, 51 | 13,9, 52 | 13,12, 53 | 13,16, 54 | 13,18, 55 | 14,11, 56 | 14,17, 57 | 14,21, 58 | 15,10, 59 | 15,12, 60 | 15,19, 61 | 16,12, 62 | 16,13, 63 | 16,18, 64 | 16,19, 65 | 17,11, 66 | 17,14, 67 | 17,20, 68 | 17,21, 69 | 18,13, 70 | 18,16, 71 | 18,19, 72 | 18,20, 73 | 18,22, 74 | 18,23, 75 | 19,12, 76 | 19,15, 77 | 19,16, 78 | 19,18, 79 | 19,22, 80 | 20,11, 81 | 20,17, 82 | 20,18, 83 | 20,21, 84 | 20,23, 85 | 20,25, 86 | 21,14, 87 | 21,17, 88 | 21,20, 89 | 21,24, 90 | 21,25, 91 | 22,18, 92 | 22,19, 93 | 22,23, 94 | 23,18, 95 | 23,20, 96 | 23,22, 97 | 23,25, 98 | 24,21, 99 | 24,25, 100 | 25,20, 101 | 25,21, 102 | 25,23, 103 | 25,24, 104 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData2_001.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,3, 3 | 1,4, 4 | 1,5, 5 | 2,3, 6 | 2,6, 7 | 2,7, 8 | 3,1, 9 | 3,2, 10 | 3,5, 11 | 3,7, 12 | 4,1, 13 | 4,5, 14 | 4,8, 15 | 4,9, 16 | 5,1, 17 | 5,3, 18 | 5,4, 19 | 5,7, 20 | 5,8, 21 | 5,12, 22 | 5,13, 23 | 6,2, 24 | 6,7, 25 | 6,15, 26 | 6,17, 27 | 6,18, 28 | 7,2, 29 | 7,3, 30 | 7,5, 31 | 7,6, 32 | 7,12, 33 | 7,15, 34 | 8,4, 35 | 8,5, 36 | 8,9, 37 | 8,13, 38 | 9,4, 39 | 9,8, 40 | 9,10, 41 | 9,13, 42 | 10,9, 43 | 10,11, 44 | 10,13, 45 | 10,16, 46 | 10,19, 47 | 11,10, 48 | 12,5, 49 | 12,7, 50 | 12,13, 51 | 12,14, 52 | 12,15, 53 | 13,5, 54 | 13,8, 55 | 13,9, 56 | 13,10, 57 | 13,12, 58 | 13,14, 59 | 13,19, 60 | 13,22, 61 | 14,12, 62 | 14,13, 63 | 14,15, 64 | 14,20, 65 | 14,22, 66 | 15,6, 67 | 15,7, 68 | 15,12, 69 | 15,14, 70 | 15,17, 71 | 15,20, 72 | 15,21, 73 | 16,10, 74 | 16,19, 75 | 16,24, 76 | 17,6, 77 | 17,15, 78 | 17,18, 79 | 17,21, 80 | 17,23, 81 | 17,25, 82 | 18,6, 83 | 18,17, 84 | 18,23, 85 | 19,10, 86 | 19,13, 87 | 19,16, 88 | 19,22, 89 | 19,24, 90 | 20,14, 91 | 20,15, 92 | 20,21, 93 | 20,22, 94 | 20,26, 95 | 21,15, 96 | 21,17, 97 | 21,20, 98 | 21,25, 99 | 21,26, 100 | 22,13, 101 | 22,14, 102 | 22,19, 103 | 22,20, 104 | 22,24, 105 | 23,17, 106 | 23,18, 107 | 23,25, 108 | 23,27, 109 | 24,16, 110 | 24,19, 111 | 24,22, 112 | 24,28, 113 | 25,17, 114 | 25,21, 115 | 25,23, 116 | 25,26, 117 | 25,27, 118 | 26,20, 119 | 26,21, 120 | 26,25, 121 | 26,27, 122 | 26,29, 123 | 26,34, 124 | 27,23, 125 | 27,25, 126 | 27,26, 127 | 27,29, 128 | 27,30, 129 | 27,33, 130 | 27,35, 131 | 28,24, 132 | 28,31, 133 | 28,32, 134 | 29,26, 135 | 29,27, 136 | 29,33, 137 | 29,34, 138 | 30,27, 139 | 30,35, 140 | 30,37, 141 | 31,28, 142 | 31,32, 143 | 31,39, 144 | 31,41, 145 | 32,28, 146 | 32,31, 147 | 32,39, 148 | 32,42, 149 | 33,27, 150 | 33,29, 151 | 33,34, 152 | 33,35, 153 | 33,38, 154 | 34,26, 155 | 34,29, 156 | 34,33, 157 | 34,36, 158 | 34,38, 159 | 34,40, 160 | 34,43, 161 | 35,27, 162 | 35,30, 163 | 35,33, 164 | 35,37, 165 | 35,38, 166 | 35,44, 167 | 36,34, 168 | 36,41, 169 | 36,43, 170 | 36,45, 171 | 36,48, 172 | 37,30, 173 | 37,35, 174 | 38,33, 175 | 38,34, 176 | 38,35, 177 | 38,40, 178 | 38,44, 179 | 39,31, 180 | 39,32, 181 | 39,41, 182 | 39,42, 183 | 39,46, 184 | 40,34, 185 | 40,38, 186 | 40,43, 187 | 40,44, 188 | 40,47, 189 | 41,31, 190 | 41,36, 191 | 41,39, 192 | 41,45, 193 | 41,46, 194 | 41,49, 195 | 42,32, 196 | 42,39, 197 | 42,46, 198 | 43,34, 199 | 43,36, 200 | 43,40, 201 | 43,47, 202 | 43,48, 203 | 43,50, 204 | 44,35, 205 | 44,38, 206 | 44,40, 207 | 44,47, 208 | 44,51, 209 | 45,36, 210 | 45,41, 211 | 45,48, 212 | 45,49, 213 | 46,39, 214 | 46,41, 215 | 46,42, 216 | 46,49, 217 | 47,40, 218 | 47,43, 219 | 47,44, 220 | 47,50, 221 | 47,51, 222 | 48,36, 223 | 48,43, 224 | 48,45, 225 | 48,49, 226 | 48,50, 227 | 48,52, 228 | 48,53, 229 | 48,55, 230 | 49,41, 231 | 49,45, 232 | 49,46, 233 | 49,48, 234 | 49,52, 235 | 50,43, 236 | 50,47, 237 | 50,48, 238 | 50,51, 239 | 50,53, 240 | 51,44, 241 | 51,47, 242 | 51,50, 243 | 51,53, 244 | 52,48, 245 | 52,49, 246 | 52,55, 247 | 53,48, 248 | 53,50, 249 | 53,51, 250 | 53,54, 251 | 53,55, 252 | 54,53, 253 | 54,55, 254 | 55,48, 255 | 55,52, 256 | 55,53, 257 | 55,54, 258 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData2_002.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,3, 3 | 1,5, 4 | 2,3, 5 | 2,4, 6 | 3,1, 7 | 3,2, 8 | 3,5, 9 | 4,2, 10 | 4,5, 11 | 4,8, 12 | 5,1, 13 | 5,3, 14 | 5,4, 15 | 5,6, 16 | 5,7, 17 | 5,9, 18 | 6,5, 19 | 6,7, 20 | 6,9, 21 | 7,5, 22 | 7,6, 23 | 7,9, 24 | 7,10, 25 | 7,12, 26 | 8,4, 27 | 8,11, 28 | 9,5, 29 | 9,6, 30 | 9,7, 31 | 9,12, 32 | 10,7, 33 | 10,12, 34 | 11,8, 35 | 11,14, 36 | 12,7, 37 | 12,9, 38 | 12,10, 39 | 12,15, 40 | 13,16, 41 | 14,11, 42 | 14,17, 43 | 15,12, 44 | 15,18, 45 | 15,20, 46 | 16,13, 47 | 17,14, 48 | 17,18, 49 | 17,19, 50 | 18,15, 51 | 18,17, 52 | 18,19, 53 | 18,20, 54 | 18,21, 55 | 19,17, 56 | 19,18, 57 | 19,21, 58 | 20,15, 59 | 20,18, 60 | 21,18, 61 | 21,19, 62 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData2_003.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,6, 4 | 1,7, 5 | 2,1, 6 | 2,3, 7 | 2,6, 8 | 3,2, 9 | 3,5, 10 | 4,5, 11 | 4,8, 12 | 4,9, 13 | 5,3, 14 | 5,4, 15 | 5,8, 16 | 5,13, 17 | 6,1, 18 | 6,2, 19 | 6,7, 20 | 6,10, 21 | 6,11, 22 | 7,1, 23 | 7,6, 24 | 7,11, 25 | 8,4, 26 | 8,5, 27 | 8,9, 28 | 8,13, 29 | 8,14, 30 | 9,4, 31 | 9,8, 32 | 9,14, 33 | 10,6, 34 | 10,11, 35 | 10,12, 36 | 10,16, 37 | 11,6, 38 | 11,7, 39 | 11,10, 40 | 11,16, 41 | 11,17, 42 | 12,10, 43 | 12,13, 44 | 12,16, 45 | 12,21, 46 | 13,5, 47 | 13,8, 48 | 13,12, 49 | 13,14, 50 | 13,15, 51 | 13,18, 52 | 13,19, 53 | 13,21, 54 | 14,8, 55 | 14,9, 56 | 14,13, 57 | 14,15, 58 | 15,13, 59 | 15,14, 60 | 15,19, 61 | 16,10, 62 | 16,11, 63 | 16,12, 64 | 16,17, 65 | 16,20, 66 | 16,21, 67 | 16,23, 68 | 16,24, 69 | 17,11, 70 | 17,16, 71 | 17,20, 72 | 17,24, 73 | 17,25, 74 | 18,13, 75 | 18,19, 76 | 18,21, 77 | 18,22, 78 | 18,28, 79 | 19,13, 80 | 19,15, 81 | 19,18, 82 | 19,28, 83 | 20,16, 84 | 20,17, 85 | 20,24, 86 | 21,12, 87 | 21,13, 88 | 21,16, 89 | 21,18, 90 | 21,22, 91 | 21,23, 92 | 21,26, 93 | 22,18, 94 | 22,21, 95 | 22,26, 96 | 22,28, 97 | 23,16, 98 | 23,21, 99 | 23,24, 100 | 23,26, 101 | 23,27, 102 | 24,16, 103 | 24,17, 104 | 24,20, 105 | 24,23, 106 | 24,25, 107 | 24,27, 108 | 24,29, 109 | 25,17, 110 | 25,24, 111 | 26,21, 112 | 26,22, 113 | 26,23, 114 | 26,27, 115 | 26,28, 116 | 27,23, 117 | 27,24, 118 | 27,26, 119 | 27,29, 120 | 27,30, 121 | 28,18, 122 | 28,19, 123 | 28,22, 124 | 28,26, 125 | 29,24, 126 | 29,27, 127 | 29,30, 128 | 30,27, 129 | 30,29, 130 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData3_001.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 2,1, 6 | 2,3, 7 | 2,5, 8 | 3,1, 9 | 3,2, 10 | 3,4, 11 | 3,5, 12 | 3,7, 13 | 4,1, 14 | 4,3, 15 | 4,6, 16 | 4,7, 17 | 4,8, 18 | 5,2, 19 | 5,3, 20 | 5,7, 21 | 5,9, 22 | 5,11, 23 | 6,4, 24 | 6,8, 25 | 6,10, 26 | 7,3, 27 | 7,4, 28 | 7,5, 29 | 7,8, 30 | 7,11, 31 | 7,13, 32 | 8,4, 33 | 8,6, 34 | 8,7, 35 | 8,10, 36 | 8,13, 37 | 9,5, 38 | 9,11, 39 | 9,14, 40 | 9,15, 41 | 10,6, 42 | 10,8, 43 | 10,12, 44 | 10,13, 45 | 11,5, 46 | 11,7, 47 | 11,9, 48 | 11,13, 49 | 11,14, 50 | 12,10, 51 | 12,13, 52 | 13,7, 53 | 13,8, 54 | 13,10, 55 | 13,11, 56 | 13,12, 57 | 13,17, 58 | 14,9, 59 | 14,11, 60 | 14,15, 61 | 14,16, 62 | 14,20, 63 | 15,9, 64 | 15,14, 65 | 15,16, 66 | 15,18, 67 | 16,14, 68 | 16,15, 69 | 16,18, 70 | 16,20, 71 | 17,13, 72 | 17,19, 73 | 18,15, 74 | 18,16, 75 | 18,20, 76 | 19,17, 77 | 19,20, 78 | 20,14, 79 | 20,16, 80 | 20,18, 81 | 20,19, 82 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData3_002.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 2,1, 6 | 2,4, 7 | 2,5, 8 | 2,7, 9 | 3,1, 10 | 3,4, 11 | 3,6, 12 | 3,8, 13 | 4,1, 14 | 4,2, 15 | 4,3, 16 | 4,7, 17 | 4,8, 18 | 4,9, 19 | 5,2, 20 | 5,7, 21 | 5,12, 22 | 6,3, 23 | 6,8, 24 | 6,10, 25 | 6,13, 26 | 7,2, 27 | 7,4, 28 | 7,5, 29 | 7,9, 30 | 7,12, 31 | 8,3, 32 | 8,4, 33 | 8,6, 34 | 8,9, 35 | 8,13, 36 | 9,4, 37 | 9,7, 38 | 9,8, 39 | 9,13, 40 | 9,15, 41 | 10,6, 42 | 10,11, 43 | 10,13, 44 | 10,16, 45 | 10,19, 46 | 11,10, 47 | 11,14, 48 | 11,16, 49 | 11,17, 50 | 12,5, 51 | 12,7, 52 | 12,15, 53 | 13,6, 54 | 13,8, 55 | 13,9, 56 | 13,10, 57 | 13,15, 58 | 13,19, 59 | 13,21, 60 | 14,11, 61 | 14,17, 62 | 14,18, 63 | 15,9, 64 | 15,12, 65 | 15,13, 66 | 15,21, 67 | 16,10, 68 | 16,11, 69 | 16,17, 70 | 16,19, 71 | 17,11, 72 | 17,14, 73 | 17,16, 74 | 17,18, 75 | 17,19, 76 | 17,20, 77 | 18,14, 78 | 18,17, 79 | 18,20, 80 | 18,23, 81 | 19,10, 82 | 19,13, 83 | 19,16, 84 | 19,17, 85 | 19,20, 86 | 19,22, 87 | 20,17, 88 | 20,18, 89 | 20,19, 90 | 20,22, 91 | 20,23, 92 | 20,24, 93 | 21,13, 94 | 21,15, 95 | 22,19, 96 | 22,20, 97 | 22,24, 98 | 23,18, 99 | 23,20, 100 | 23,24, 101 | 24,20, 102 | 24,22, 103 | 24,23, 104 | 25,26, 105 | 26,25, 106 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData3_003.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,3, 3 | 1,4, 4 | 2,3, 5 | 2,7, 6 | 3,1, 7 | 3,2, 8 | 3,4, 9 | 3,7, 10 | 4,1, 11 | 4,3, 12 | 4,6, 13 | 4,7, 14 | 4,10, 15 | 5,8, 16 | 5,9, 17 | 5,14, 18 | 6,4, 19 | 6,10, 20 | 6,11, 21 | 7,2, 22 | 7,3, 23 | 7,4, 24 | 7,10, 25 | 7,12, 26 | 8,5, 27 | 8,13, 28 | 8,16, 29 | 9,5, 30 | 9,14, 31 | 9,17, 32 | 10,4, 33 | 10,6, 34 | 10,7, 35 | 10,11, 36 | 10,12, 37 | 10,15, 38 | 11,6, 39 | 11,10, 40 | 12,7, 41 | 12,10, 42 | 12,15, 43 | 12,18, 44 | 13,8, 45 | 13,16, 46 | 13,19, 47 | 14,5, 48 | 14,9, 49 | 14,16, 50 | 14,17, 51 | 14,21, 52 | 15,10, 53 | 15,12, 54 | 15,18, 55 | 16,8, 56 | 16,13, 57 | 16,14, 58 | 16,19, 59 | 16,20, 60 | 16,21, 61 | 17,9, 62 | 17,14, 63 | 17,21, 64 | 17,22, 65 | 18,12, 66 | 18,15, 67 | 19,13, 68 | 19,16, 69 | 19,20, 70 | 20,16, 71 | 20,19, 72 | 20,21, 73 | 21,14, 74 | 21,16, 75 | 21,17, 76 | 21,20, 77 | 21,22, 78 | 22,17, 79 | 22,21, 80 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData4_001.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 1,5, 6 | 2,1, 7 | 2,4, 8 | 2,6, 9 | 3,1, 10 | 3,5, 11 | 3,7, 12 | 4,1, 13 | 4,2, 14 | 4,5, 15 | 4,6, 16 | 4,8, 17 | 5,1, 18 | 5,3, 19 | 5,4, 20 | 5,7, 21 | 5,8, 22 | 6,2, 23 | 6,4, 24 | 6,8, 25 | 6,9, 26 | 7,3, 27 | 7,5, 28 | 7,8, 29 | 7,9, 30 | 8,4, 31 | 8,5, 32 | 8,6, 33 | 8,7, 34 | 8,9, 35 | 9,6, 36 | 9,7, 37 | 9,8, 38 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData4_002.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,4, 4 | 1,5, 5 | 2,1, 6 | 2,3, 7 | 2,5, 8 | 2,7, 9 | 3,2, 10 | 3,6, 11 | 3,7, 12 | 3,9, 13 | 4,1, 14 | 4,5, 15 | 4,10, 16 | 4,11, 17 | 5,1, 18 | 5,2, 19 | 5,4, 20 | 5,7, 21 | 5,11, 22 | 6,3, 23 | 6,8, 24 | 6,9, 25 | 6,12, 26 | 7,2, 27 | 7,3, 28 | 7,5, 29 | 7,9, 30 | 7,11, 31 | 7,13, 32 | 7,14, 33 | 8,6, 34 | 8,12, 35 | 9,3, 36 | 9,6, 37 | 9,7, 38 | 9,12, 39 | 9,14, 40 | 10,4, 41 | 10,11, 42 | 10,15, 43 | 10,20, 44 | 11,4, 45 | 11,5, 46 | 11,7, 47 | 11,10, 48 | 11,13, 49 | 11,15, 50 | 12,6, 51 | 12,8, 52 | 12,9, 53 | 12,14, 54 | 12,16, 55 | 12,18, 56 | 13,7, 57 | 13,11, 58 | 13,14, 59 | 13,15, 60 | 14,7, 61 | 14,9, 62 | 14,12, 63 | 14,13, 64 | 14,15, 65 | 14,16, 66 | 14,19, 67 | 14,21, 68 | 15,10, 69 | 15,11, 70 | 15,13, 71 | 15,14, 72 | 15,17, 73 | 15,20, 74 | 15,21, 75 | 16,12, 76 | 16,14, 77 | 16,18, 78 | 16,19, 79 | 16,22, 80 | 17,15, 81 | 17,20, 82 | 17,21, 83 | 17,24, 84 | 18,12, 85 | 18,16, 86 | 18,22, 87 | 18,23, 88 | 19,14, 89 | 19,16, 90 | 19,21, 91 | 19,22, 92 | 19,25, 93 | 20,10, 94 | 20,15, 95 | 20,17, 96 | 20,24, 97 | 21,14, 98 | 21,15, 99 | 21,17, 100 | 21,19, 101 | 21,24, 102 | 21,25, 103 | 22,16, 104 | 22,18, 105 | 22,19, 106 | 22,23, 107 | 22,25, 108 | 22,26, 109 | 23,18, 110 | 23,22, 111 | 23,26, 112 | 24,17, 113 | 24,20, 114 | 24,21, 115 | 24,25, 116 | 25,19, 117 | 25,21, 118 | 25,22, 119 | 25,24, 120 | 26,22, 121 | 26,23, 122 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData4_003.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 2,1, 6 | 2,4, 7 | 2,6, 8 | 2,8, 9 | 3,1, 10 | 3,4, 11 | 4,1, 12 | 4,2, 13 | 4,3, 14 | 4,8, 15 | 4,10, 16 | 5,6, 17 | 5,9, 18 | 5,17, 19 | 6,2, 20 | 6,5, 21 | 6,8, 22 | 6,18, 23 | 7,11, 24 | 7,12, 25 | 7,14, 26 | 8,2, 27 | 8,4, 28 | 8,6, 29 | 8,10, 30 | 8,18, 31 | 9,5, 32 | 9,12, 33 | 9,13, 34 | 9,17, 35 | 9,21, 36 | 10,4, 37 | 10,8, 38 | 10,18, 39 | 11,7, 40 | 11,14, 41 | 11,16, 42 | 11,20, 43 | 12,7, 44 | 12,9, 45 | 12,13, 46 | 12,14, 47 | 12,15, 48 | 13,9, 49 | 13,12, 50 | 13,15, 51 | 13,21, 52 | 14,7, 53 | 14,11, 54 | 14,12, 55 | 14,15, 56 | 14,20, 57 | 14,24, 58 | 15,12, 59 | 15,13, 60 | 15,14, 61 | 15,21, 62 | 15,24, 63 | 16,11, 64 | 16,20, 65 | 16,23, 66 | 17,5, 67 | 17,9, 68 | 17,19, 69 | 17,21, 70 | 17,22, 71 | 17,25, 72 | 18,6, 73 | 18,8, 74 | 18,10, 75 | 18,19, 76 | 19,17, 77 | 19,18, 78 | 19,22, 79 | 20,11, 80 | 20,14, 81 | 20,16, 82 | 20,23, 83 | 20,24, 84 | 20,27, 85 | 21,9, 86 | 21,13, 87 | 21,15, 88 | 21,17, 89 | 21,24, 90 | 21,25, 91 | 21,26, 92 | 22,17, 93 | 22,19, 94 | 22,25, 95 | 23,16, 96 | 23,20, 97 | 23,27, 98 | 23,30, 99 | 24,14, 100 | 24,15, 101 | 24,20, 102 | 24,21, 103 | 24,26, 104 | 24,27, 105 | 24,28, 106 | 25,17, 107 | 25,21, 108 | 25,22, 109 | 25,26, 110 | 25,29, 111 | 26,21, 112 | 26,24, 113 | 26,25, 114 | 26,28, 115 | 26,29, 116 | 27,20, 117 | 27,23, 118 | 27,24, 119 | 27,28, 120 | 27,30, 121 | 27,32, 122 | 28,24, 123 | 28,26, 124 | 28,27, 125 | 28,29, 126 | 28,31, 127 | 28,32, 128 | 29,25, 129 | 29,26, 130 | 29,28, 131 | 29,31, 132 | 30,23, 133 | 30,27, 134 | 31,28, 135 | 31,29, 136 | 31,32, 137 | 32,27, 138 | 32,28, 139 | 32,31, 140 | 33,34, 141 | 34,33, 142 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData5_001.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 1,6, 6 | 2,1, 7 | 2,4, 8 | 2,5, 9 | 2,9, 10 | 3,1, 11 | 3,6, 12 | 3,7, 13 | 4,1, 14 | 4,2, 15 | 4,6, 16 | 4,9, 17 | 5,2, 18 | 5,8, 19 | 5,9, 20 | 6,1, 21 | 6,3, 22 | 6,4, 23 | 6,7, 24 | 6,9, 25 | 6,10, 26 | 7,3, 27 | 7,6, 28 | 7,10, 29 | 7,12, 30 | 8,5, 31 | 8,9, 32 | 8,13, 33 | 8,14, 34 | 9,2, 35 | 9,4, 36 | 9,5, 37 | 9,6, 38 | 9,8, 39 | 9,10, 40 | 9,11, 41 | 9,13, 42 | 10,6, 43 | 10,7, 44 | 10,9, 45 | 10,11, 46 | 10,12, 47 | 11,9, 48 | 11,10, 49 | 11,12, 50 | 11,13, 51 | 11,15, 52 | 11,16, 53 | 12,7, 54 | 12,10, 55 | 12,11, 56 | 12,15, 57 | 13,8, 58 | 13,9, 59 | 13,11, 60 | 13,14, 61 | 14,8, 62 | 14,13, 63 | 14,16, 64 | 15,11, 65 | 15,12, 66 | 15,16, 67 | 16,11, 68 | 16,14, 69 | 16,15, 70 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData5_002.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,3, 4 | 1,4, 5 | 1,6, 6 | 2,1, 7 | 2,5, 8 | 2,6, 9 | 3,1, 10 | 3,4, 11 | 3,6, 12 | 3,8, 13 | 4,1, 14 | 4,3, 15 | 4,7, 16 | 4,8, 17 | 4,9, 18 | 4,10, 19 | 5,2, 20 | 5,6, 21 | 5,11, 22 | 5,12, 23 | 6,1, 24 | 6,2, 25 | 6,3, 26 | 6,5, 27 | 6,8, 28 | 6,11, 29 | 7,4, 30 | 7,8, 31 | 7,10, 32 | 8,3, 33 | 8,4, 34 | 8,6, 35 | 8,7, 36 | 8,10, 37 | 8,11, 38 | 8,13, 39 | 8,15, 40 | 8,18, 41 | 9,4, 42 | 9,10, 43 | 9,16, 44 | 10,4, 45 | 10,7, 46 | 10,8, 47 | 10,9, 48 | 10,16, 49 | 10,18, 50 | 10,19, 51 | 11,5, 52 | 11,6, 53 | 11,8, 54 | 11,12, 55 | 11,14, 56 | 11,15, 57 | 12,5, 58 | 12,11, 59 | 12,14, 60 | 12,17, 61 | 13,8, 62 | 13,15, 63 | 13,18, 64 | 13,21, 65 | 14,11, 66 | 14,12, 67 | 14,15, 68 | 14,17, 69 | 14,21, 70 | 15,8, 71 | 15,11, 72 | 15,13, 73 | 15,14, 74 | 15,21, 75 | 16,9, 76 | 16,10, 77 | 16,19, 78 | 17,12, 79 | 17,14, 80 | 17,21, 81 | 17,22, 82 | 17,24, 83 | 18,8, 84 | 18,10, 85 | 18,13, 86 | 18,19, 87 | 18,20, 88 | 18,21, 89 | 18,23, 90 | 19,10, 91 | 19,16, 92 | 19,18, 93 | 19,20, 94 | 19,25, 95 | 20,18, 96 | 20,19, 97 | 20,23, 98 | 20,25, 99 | 21,13, 100 | 21,14, 101 | 21,15, 102 | 21,17, 103 | 21,18, 104 | 21,22, 105 | 21,23, 106 | 21,27, 107 | 21,28, 108 | 22,17, 109 | 22,21, 110 | 22,24, 111 | 22,28, 112 | 22,31, 113 | 23,18, 114 | 23,20, 115 | 23,21, 116 | 23,25, 117 | 23,27, 118 | 23,29, 119 | 24,17, 120 | 24,22, 121 | 24,30, 122 | 24,31, 123 | 24,36, 124 | 25,19, 125 | 25,20, 126 | 25,23, 127 | 25,29, 128 | 25,33, 129 | 26,30, 130 | 26,32, 131 | 27,21, 132 | 27,23, 133 | 27,28, 134 | 27,29, 135 | 27,34, 136 | 27,35, 137 | 28,21, 138 | 28,22, 139 | 28,27, 140 | 28,31, 141 | 28,35, 142 | 29,23, 143 | 29,25, 144 | 29,27, 145 | 29,33, 146 | 29,34, 147 | 30,24, 148 | 30,26, 149 | 30,32, 150 | 30,36, 151 | 31,22, 152 | 31,24, 153 | 31,28, 154 | 31,35, 155 | 31,36, 156 | 31,39, 157 | 32,26, 158 | 32,30, 159 | 32,36, 160 | 32,41, 161 | 33,25, 162 | 33,29, 163 | 33,34, 164 | 33,37, 165 | 34,27, 166 | 34,29, 167 | 34,33, 168 | 34,35, 169 | 34,37, 170 | 34,38, 171 | 34,40, 172 | 35,27, 173 | 35,28, 174 | 35,31, 175 | 35,34, 176 | 35,38, 177 | 36,24, 178 | 36,30, 179 | 36,31, 180 | 36,32, 181 | 36,39, 182 | 36,41, 183 | 36,42, 184 | 37,33, 185 | 37,34, 186 | 37,40, 187 | 38,34, 188 | 38,35, 189 | 38,39, 190 | 39,31, 191 | 39,36, 192 | 39,38, 193 | 39,42, 194 | 40,34, 195 | 40,37, 196 | 41,32, 197 | 41,36, 198 | 41,42, 199 | 42,36, 200 | 42,39, 201 | 42,41, 202 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/neighbors/20210305_NE_mockData5_003.csv: -------------------------------------------------------------------------------- 1 | Object,Neighbor,Distance 2 | 1,2, 3 | 1,4, 4 | 1,6, 5 | 2,1, 6 | 2,3, 7 | 2,4, 8 | 2,5, 9 | 3,2, 10 | 3,7, 11 | 3,9, 12 | 4,1, 13 | 4,2, 14 | 4,5, 15 | 4,6, 16 | 4,8, 17 | 5,2, 18 | 5,4, 19 | 5,7, 20 | 6,1, 21 | 6,4, 22 | 6,8, 23 | 6,10, 24 | 7,3, 25 | 7,5, 26 | 7,9, 27 | 7,14, 28 | 8,4, 29 | 8,6, 30 | 8,10, 31 | 8,13, 32 | 9,3, 33 | 9,7, 34 | 9,11, 35 | 9,14, 36 | 10,6, 37 | 10,8, 38 | 10,12, 39 | 10,13, 40 | 11,9, 41 | 11,14, 42 | 11,16, 43 | 11,17, 44 | 12,10, 45 | 12,13, 46 | 12,21, 47 | 13,8, 48 | 13,10, 49 | 13,12, 50 | 13,15, 51 | 13,21, 52 | 14,7, 53 | 14,9, 54 | 14,11, 55 | 14,15, 56 | 14,17, 57 | 14,19, 58 | 15,13, 59 | 15,14, 60 | 15,19, 61 | 15,20, 62 | 15,21, 63 | 16,11, 64 | 16,17, 65 | 16,18, 66 | 16,22, 67 | 16,23, 68 | 17,11, 69 | 17,14, 70 | 17,16, 71 | 17,19, 72 | 17,22, 73 | 18,16, 74 | 18,23, 75 | 18,24, 76 | 18,26, 77 | 19,14, 78 | 19,15, 79 | 19,17, 80 | 19,20, 81 | 19,22, 82 | 19,29, 83 | 20,15, 84 | 20,19, 85 | 20,21, 86 | 20,25, 87 | 21,12, 88 | 21,13, 89 | 21,15, 90 | 21,20, 91 | 21,25, 92 | 22,16, 93 | 22,17, 94 | 22,19, 95 | 22,23, 96 | 22,28, 97 | 22,29, 98 | 23,16, 99 | 23,18, 100 | 23,22, 101 | 23,26, 102 | 23,28, 103 | 23,30, 104 | 24,18, 105 | 24,26, 106 | 24,27, 107 | 25,20, 108 | 25,21, 109 | 26,18, 110 | 26,23, 111 | 26,24, 112 | 26,27, 113 | 26,30, 114 | 27,24, 115 | 27,26, 116 | 27,30, 117 | 27,33, 118 | 28,22, 119 | 28,23, 120 | 28,29, 121 | 28,30, 122 | 28,31, 123 | 28,34, 124 | 29,19, 125 | 29,22, 126 | 29,28, 127 | 29,31, 128 | 29,36, 129 | 30,23, 130 | 30,26, 131 | 30,27, 132 | 30,28, 133 | 30,32, 134 | 30,33, 135 | 31,28, 136 | 31,29, 137 | 31,34, 138 | 31,36, 139 | 32,30, 140 | 32,33, 141 | 32,35, 142 | 32,37, 143 | 33,27, 144 | 33,30, 145 | 33,32, 146 | 33,37, 147 | 34,28, 148 | 34,31, 149 | 34,35, 150 | 34,36, 151 | 34,38, 152 | 34,40, 153 | 35,32, 154 | 35,34, 155 | 35,37, 156 | 35,39, 157 | 35,40, 158 | 36,29, 159 | 36,31, 160 | 36,34, 161 | 36,38, 162 | 37,32, 163 | 37,33, 164 | 37,35, 165 | 37,39, 166 | 38,34, 167 | 38,36, 168 | 38,40, 169 | 39,35, 170 | 39,37, 171 | 39,40, 172 | 40,34, 173 | 40,35, 174 | 40,38, 175 | 40,39, 176 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/panel.csv: -------------------------------------------------------------------------------- 1 | channel,name,keep,ilastik,deepcell,cellpose,Tube Number 2 | Ag107,Ag107,1,1,,, 3 | Pr141,Cytokeratin 5,1,,2.0,2.0,2266.0 4 | Sm147,Laminin,1,,,,625.0 5 | Eu153,YBX1,1,2,,,2359.0 6 | Yb172,H3K27Ac,1,3,1.0,1.0,1378.0 7 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData1_001.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,11,4.0,34.36363636363637,4.967994363003793,2.848231107005645,0.8193342786072867 3 | 2,7,8.0,6.0,3.7032803990902057,2.138089935299395,0.816496580927726 4 | 3,13,11.615384615384615,39.46153846153846,4.907725735659753,3.279400065550629,0.7439711284387783 5 | 4,14,14.357142857142858,20.214285714285715,4.742873420478221,3.6860255520522984,0.629288982059086 6 | 5,4,17.5,33.5,2.0,2.0,0.0 7 | 6,18,18.88888888888889,41.44444444444444,5.132946212902184,4.480247343827444,0.4880042003142553 8 | 7,18,21.055555555555557,36.611111111111114,6.539325004089144,3.665345734728451,0.828148827822692 9 | 8,10,24.5,42.0,4.381780460041329,2.6832815729997477,0.7905694150420949 10 | 9,13,26.384615384615383,31.384615384615383,4.318667337728677,3.6794648440311994,0.523556754446835 11 | 10,4,31.5,53.0,3.23606797749979,1.2360679774997898,0.9241763718304448 12 | 11,14,30.714285714285715,37.5,4.20883424647321,4.120630029101703,0.2036532699906393 13 | 12,23,33.78260869565217,42.91304347826087,5.733826014124253,5.0375140067593245,0.4776307722564946 14 | 13,13,33.84615384615385,48.61538461538461,5.376796813410203,2.993305616289287,0.830708276629804 15 | 14,10,35.1,54.8,4.7504310473449705,2.6520567234546397,0.8296545749843498 16 | 15,22,40.5,52.5,5.78399044384977,4.898979485566356,0.5316095330711949 17 | 16,5,44.8,48.4,3.098386676965933,1.7888543819998317,0.816496580927726 18 | 17,11,46.90909090909091,53.63636363636363,4.346129984141888,3.067356324605906,0.7084437526351622 19 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData1_002.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,8,0.875,55.125,3.4641016151377544,2.7386127875258306,0.6123724356957945 3 | 2,109,8.53211009174312,14.46788990825688,13.560581284613413,10.433038079557232,0.6388093073539358 4 | 3,22,9.545454545454545,37.04545454545455,9.055410466272445,3.1517337426952987,0.9374760483639183 5 | 4,77,8.285714285714286,58.48051948051948,14.431805122939194,7.011708304510785,0.8740415977811581 6 | 5,31,12.903225806451612,30.806451612903224,7.289948954529379,5.404090938441835,0.6711659850292946 7 | 6,49,13.591836734693878,23.6734693877551,8.370809027656046,7.450988392550833,0.45573465018599896 8 | 7,31,16.70967741935484,38.193548387096776,6.799734978568976,5.90867223249778,0.4948889060357737 9 | 8,81,17.17283950617284,14.728395061728396,12.29618840950188,8.527937248444687,0.7204150875847001 10 | 9,22,17.772727272727273,33.09090909090909,5.493798156268411,5.129722174423958,0.3579789930628065 11 | 10,125,20.928,52.664,16.42394444496912,10.337348251295785,0.777075688231192 12 | 11,47,19.893617021276597,27.0,8.865265644110725,6.743983006925004,0.6490804289059541 13 | 12,8,24.125,30.875,3.4641016151377544,2.7386127875258306,0.6123724356957945 14 | 13,30,25.633333333333333,23.133333333333333,7.864968013902464,4.868954978713151,0.7853368898168944 15 | 14,8,24.875,49.125,3.4641016151377544,2.7386127875258306,0.6123724356957945 16 | 15,32,29.46875,27.96875,6.594983853900756,6.401166922271933,0.24065200862258296 17 | 16,24,30.125,42.166666666666664,5.811014160855937,5.247634703167451,0.4295360352800381 18 | 17,46,32.19565217391305,33.19565217391305,8.899365782340904,6.588051524358383,0.6722950937804886 19 | 18,84,33.416666666666664,54.916666666666664,12.796707700737732,8.719062438109813,0.7319559047331643 20 | 19,48,39.208333333333336,44.8125,9.807439266395432,6.289450738460438,0.7672953570225843 21 | 20,16,40.875,26.0,5.491121612710071,3.6874901266889313,0.740971222810684 22 | 21,70,44.542857142857144,34.1,13.644808894552325,7.141514618585633,0.8520951372797996 23 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData1_003.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,14,0.9285714285714286,1.8571428571428572,5.449353665897314,3.145851452097728,0.8165399631383785 3 | 2,15,0.8666666666666667,14.333333333333334,5.963268946242256,3.2213663642250534,0.8415357530872689 4 | 3,20,1.0,24.05,7.322752910766844,3.5689339876012993,0.873192212109006 5 | 4,26,1.7692307692307692,31.76923076923077,6.777193426869851,5.11973252124675,0.6552230167837274 6 | 5,55,3.1636363636363636,7.527272727272727,9.384151481909464,7.5610910362718995,0.592283206527048 7 | 6,57,4.421052631578948,21.333333333333332,12.059201275232649,6.234869880795507,0.8559722333398617 8 | 7,42,6.619047619047619,31.047619047619047,9.45896569145884,5.621233212773251,0.8042614146835391 9 | 8,50,8.62,12.32,8.352956864028426,7.6863067612267715,0.3914722206076646 10 | 9,35,9.971428571428572,18.885714285714286,7.313366134834392,6.178863103131937,0.5349674640908675 11 | 10,63,11.682539682539682,2.365079365079365,12.538231489474228,7.324677589084138,0.8116187610096801 12 | 11,64,12.875,36.921875,10.752934440426754,8.01727788403796,0.6664052065674341 13 | 12,50,14.9,7.7,9.032018465120737,7.067010856487915,0.6227262126959229 14 | 13,63,16.095238095238095,16.58730158730159,10.530433673208497,7.643964838392365,0.687807968028821 15 | 14,35,18.228571428571428,40.34285714285714,7.568809277702379,6.075415799611953,0.5963950096767545 16 | 15,16,19.3125,2.5,6.379043545017158,3.278002966864877,0.8578677060860016 17 | 16,38,20.210526315789473,11.68421052631579,8.261291922749175,6.032720368697496,0.6831914116802753 18 | 17,20,21.9,36.95,5.215361924162119,4.79583152331272,0.39295262399668773 19 | 18,44,24.522727272727273,20.15909090909091,9.734654018868964,5.7291611944875855,0.8084734901153281 20 | 19,44,25.113636363636363,10.522727272727273,10.170119495778806,5.814493861297594,0.820446534064707 21 | 20,89,27.696629213483146,29.089887640449437,11.887226828644643,9.557154983744288,0.5946492449596099 22 | 21,79,29.164556962025316,38.075949367088604,11.563421523423898,8.682279598952071,0.6604841184503141 23 | 22,55,30.618181818181817,16.69090909090909,8.715539466978523,7.992953501918878,0.39867511412220147 24 | 23,51,34.627450980392155,25.03921568627451,11.262326245183518,6.07252020069131,0.842184917542763 25 | 24,19,36.421052631578945,36.89473684210526,5.544698233777089,4.2956952169149805,0.6322808964466018 26 | 25,26,36.69230769230769,31.807692307692307,6.201736729460423,5.495560338305155,0.4634320131035735 27 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData2_001.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,58,8.517241379310345,50.94827586206897,11.048771903163546,6.82398213498496,0.7864738423863622 3 | 2,32,10.0,35.65625,6.6332495807108,6.13264828601804,0.38110559858486376 4 | 3,37,10.0,42.4054054054054,8.127468294993347,5.9607733262038565,0.6797856602927278 5 | 4,15,12.066666666666666,55.733333333333334,5.258554520990449,3.5691337129452037,0.7343887778710586 6 | 5,65,15.261538461538462,48.07692307692308,9.992887596638344,8.412399756924337,0.5397291547622112 7 | 6,133,19.50375939849624,30.60902255639098,15.103480658455874,14.512469273651082,0.27700251570276385 8 | 7,79,17.11392405063291,39.65822784810127,10.81068033956158,9.404520475233719,0.493177611500516 9 | 8,29,17.310344827586206,54.172413793103445,7.28722991870597,5.151194587347714,0.7073338321787024 10 | 9,37,18.64864864864865,59.32432432432432,7.746894072973619,6.160284832102345,0.6063549018243924 11 | 10,108,20.046296296296298,72.13888888888889,14.210194120057077,10.041840401703546,0.7075487381885023 12 | 11,5,21.6,78.8,3.098386676965933,1.7888543819998317,0.816496580927726 13 | 12,46,23.065217391304348,45.630434782608695,8.688948965016033,6.736415407129451,0.6316110549820596 14 | 13,104,25.625,57.75961538461539,16.70865385534437,8.967472380693387,0.8437755046319207 15 | 14,60,28.183333333333334,50.166666666666664,9.571237556762872,8.258885482302661,0.5053988572368022 16 | 15,61,27.262295081967213,41.114754098360656,12.802474271194468,6.660251317883649,0.8540252404397958 17 | 16,57,29.56140350877193,77.42105263157895,11.189417092616553,6.782721941386829,0.7953328595948856 18 | 17,140,29.15,28.12857142857143,14.950448838295697,12.447702760883175,0.5538788677602284 19 | 18,62,30.629032258064516,18.43548387096774,9.650718972434312,8.512703490292589,0.47110016698053037 20 | 19,99,30.434343434343436,68.58585858585859,12.15570815861433,10.575907491014926,0.4929876433795678 21 | 20,41,34.1219512195122,47.58536585365854,10.2526679771005,5.035624765750429,0.8710735338068334 22 | 21,37,35.972972972972975,34.16216216216216,7.84581369554782,6.156514185333591,0.6198911816287468 23 | 22,94,35.170212765957444,59.58510638297872,15.539987154761294,7.8857257538474235,0.8616827475264368 24 | 23,32,37.4375,22.1875,7.010867347484396,5.850020430389718,0.551126381648487 25 | 24,200,39.115,74.91,24.135061186631116,12.170358315085558,0.8635515826352654 26 | 25,71,40.394366197183096,29.816901408450704,11.61158118122678,7.8474840250083995,0.7370552366630283 27 | 26,138,45.36231884057971,41.63768115942029,19.03888534786068,9.78247709701229,0.8579006271638421 28 | 27,124,47.193548387096776,27.04032258064516,18.472975171978817,9.25244124783692,0.8655262170944742 29 | 28,126,48.36507936507937,79.67460317460318,14.833659925412674,10.949059702763353,0.6746665993608824 30 | 29,35,52.22857142857143,39.82857142857143,7.677593977087699,5.824075621541641,0.6515789456240351 31 | 30,17,53.11764705882353,24.470588235294116,5.487954724560282,3.880570000581328,0.7071067811865475 32 | 31,31,57.25806451612903,75.70967741935483,7.100847713202127,5.594000544055981,0.6159396495152216 33 | 32,162,56.98765432098765,86.8641975308642,16.129986971969895,13.446559235683567,0.5523122357959548 34 | 33,63,56.55555555555556,33.07936507936508,10.07065634845916,8.201043456013672,0.5803734628797725 35 | 34,178,56.46067415730337,47.353932584269664,17.68540249681022,13.405758304572604,0.6522398837979569 36 | 35,46,60.45652173913044,26.97826086956522,11.797928030193146,5.080803604931761,0.9025179703338023 37 | 36,119,60.15966386554622,59.89915966386555,13.088681798914452,12.009024437032927,0.39770777508638705 38 | 37,23,63.17391304347826,23.0,5.405311397537409,5.360360002581718,0.12869789041755736 39 | 38,45,63.022222222222226,33.8,8.349449474646718,7.25679092009519,0.49457657229842095 40 | 39,35,64.05714285714286,77.02857142857142,7.769169116755115,5.848356738553234,0.6582896122429026 41 | 40,36,64.77777777777777,38.97222222222222,8.76788667987907,5.342650676884922,0.7929067196949555 42 | 41,103,63.04854368932039,69.85436893203884,14.204613814956222,9.944870622266624,0.7140295898796976 43 | 42,47,65.04255319148936,83.31914893617021,8.155691542790725,7.304652029456073,0.4447578691629512 44 | 43,105,66.4952380952381,47.695238095238096,14.827032974617646,9.350644791788891,0.776068670383037 45 | 44,24,67.375,30.875,7.092208989924561,4.381845689117,0.7863043657429808 46 | 45,29,68.65517241379311,63.96551724137931,6.759626853142222,5.593073800049007,0.5615785140215117 47 | 46,24,70.625,74.54166666666667,6.823644071207446,4.600011283866343,0.7386143060911923 48 | 47,24,70.95833333333333,40.666666666666664,7.48194624318278,4.026775988128411,0.8428177953224391 49 | 48,152,73.16447368421052,59.171052631578945,16.439238210383433,12.7942402195809,0.6279241771540252 50 | 49,43,73.06976744186046,70.06976744186046,8.684265380336612,6.4814481624498175,0.6655605454649425 51 | 50,52,73.88461538461539,48.46153846153846,9.197915898136637,7.3017465646322535,0.6081163146934828 52 | 51,56,76.03571428571429,40.57142857142857,11.613028172477021,6.316065128390567,0.8391646010564351 53 | 52,12,79.83333333333333,63.833333333333336,4.854930889924544,3.1949059190896785,0.7529528759900531 54 | 53,69,80.55072463768116,49.72463768115942,11.892638605738764,7.474056014165988,0.7778413368178773 55 | 54,23,85.26086956521739,50.65217391304348,10.737519863547195,2.879199222512428,0.9633789027826622 56 | 55,7,85.57142857142857,59.285714285714285,4.155374705678736,1.9054711331003737,0.8886656215775005 57 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData2_002.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,27,2.0,35.407407407407405,6.347936380926978,5.787266662110996,0.41090791657516096 3 | 2,15,0.8666666666666667,52.666666666666664,5.963268946242257,3.2213663642250534,0.8415357530872689 4 | 3,38,2.8947368421052633,40.8421052631579,7.337773517310567,6.766936444147132,0.38669972427629107 5 | 4,32,8.0,55.875,7.305972312535168,6.809755397110055,0.3622508360702269 6 | 5,50,8.32,38.66,10.660757111059146,6.011676789299458,0.8258382198262969 7 | 6,20,12.05,33.7,5.639889740659884,4.5068440968375425,0.601196195006148 8 | 7,82,14.75609756097561,26.634146341463413,11.569002816169945,9.183303857259235,0.6081981322077903 9 | 8,14,13.857142857142858,57.07142857142857,5.449353665897314,3.145851452097728,0.8165399631383784 10 | 9,27,17.40740740740741,32.48148148148148,6.720680652327869,5.050208431791945,0.6597980127807583 11 | 10,82,23.658536585365855,22.98780487804878,12.063709097854755,8.763224806030465,0.6872593361772101 12 | 11,15,26.6,56.6,4.618802153517006,4.026578365477733,0.4898979485566357 13 | 12,106,28.0188679245283,31.528301886792452,13.610003396625439,10.140254795418354,0.6669986251308101 14 | 13,80,30.75,8.0625,12.24152822452852,8.466551052705675,0.7222564618749652 15 | 14,49,32.93877551020408,55.91836734693877,10.956657906565733,6.176762680087425,0.8259487959698146 16 | 15,101,41.21782178217822,36.86138613861386,13.698813545928434,9.57454881109775,0.7151874393875831 17 | 16,111,41.486486486486484,13.252252252252251,14.830451224479697,9.62591902515959,0.7607334016720576 18 | 17,53,48.0,55.16981132075472,9.611704099499494,7.06726417925281,0.6777668123942079 19 | 18,113,52.34513274336283,44.29203539823009,14.714358095594399,9.982528417361538,0.7346734306391147 20 | 19,22,52.68181818181818,51.81818181818182,5.601323204534069,5.038403411484692,0.4369159118492763 21 | 20,79,56.21518987341772,36.0,10.815071129927764,9.308477852388393,0.5091208934551592 22 | 21,3,59.333333333333336,47.333333333333336,2.3094010767585034,1.3333333333333333,0.816496580927726 23 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData2_003.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,8,0.875,10.125,3.4641016151377544,2.7386127875258306,0.6123724356957945 3 | 2,7,0.42857142857142855,21.285714285714285,4.155374705678736,1.9054711331003737,0.8886656215775005 4 | 3,12,0.75,33.083333333333336,5.294328785763617,2.862220279862641,0.8412668804818468 5 | 4,74,5.0,48.91891891891892,11.385185388064553,8.472654892391551,0.6679764333763113 6 | 5,26,6.846153846153846,42.19230769230769,6.20222641359446,5.373049936583512,0.4995069720668289 7 | 6,39,9.025641025641026,12.58974358974359,7.3994727592688605,6.685668589531329,0.42851829613932363 8 | 7,17,9.882352941176471,7.470588235294118,5.487954724560282,3.880570000581328,0.7071067811865475 9 | 8,5,13.8,46.4,3.098386676965933,1.7888543819998317,0.816496580927726 10 | 9,19,14.68421052631579,50.94736842105263,6.649713070702405,3.9515960182159326,0.8042799375487082 11 | 10,70,15.2,17.514285714285716,10.205271974339551,8.724875032796918,0.518730160129003 12 | 11,70,16.757142857142856,8.9,11.581505922203473,8.313116398044434,0.696257234524895 13 | 12,93,18.247311827956988,29.870967741935484,11.320632215132395,10.614273548238728,0.3477041260799485 14 | 13,89,18.60674157303371,38.93258426966292,11.406094668693305,10.13309893212364,0.45908301233727605 15 | 14,31,18.0,48.41935483870968,8.012220922744255,5.139059742001583,0.7672044310410789 16 | 15,59,25.71186440677966,49.88135593220339,12.977993434813234,6.054930028009781,0.8844929081222237 17 | 16,118,26.177966101694917,22.5,13.336483743936101,11.462729268306703,0.5111330355229469 18 | 17,177,30.01129943502825,5.169491525423729,18.1702467728421,13.548060483651762,0.6663737760264042 19 | 18,15,34.13333333333333,39.8,5.281633700418866,3.5748987412450277,0.7361166193605281 20 | 19,59,34.69491525423729,48.559322033898304,12.796761490429814,6.360823400206327,0.8677132570375283 21 | 20,12,36.5,15.0,4.47213595499958,3.265986323710904,0.6831300510639732 22 | 21,92,37.16304347826087,32.880434782608695,12.963510817218582,10.2993170509164,0.6072835582364682 23 | 22,21,41.42857142857143,38.523809523809526,5.47970557247616,5.012007494928868,0.40424882899037456 24 | 23,30,42.36666666666667,24.466666666666665,6.1752192943516855,6.150700050491091,0.08902476018169247 25 | 24,96,43.364583333333336,15.177083333333334,12.884786297344935,9.592730399432517,0.6676218547492107 26 | 25,12,43.916666666666664,0.75,5.294328785763616,2.862220279862641,0.8412668804818468 27 | 26,61,46.85245901639344,36.295081967213115,10.600303070324884,7.350051361096547,0.7205709169532606 28 | 27,30,47.53333333333333,22.366666666666667,6.175219294351686,6.150700050491091,0.08902476018169433 29 | 28,65,42.84615384615385,44.01538461538462,14.439294784867494,6.590293864183151,0.8897676179521729 30 | 29,9,51.666666666666664,16.88888888888889,3.885753375057407,2.7954428906961324,0.6945875203623408 31 | 30,15,52.13333333333333,22.333333333333332,5.963268946242256,3.2213663642250534,0.8415357530872689 32 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData3_001.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,49,6.428571428571429,43.244897959183675,10.241083576270626,6.853972100020177,0.743026143191422 3 | 2,19,9.631578947368421,31.31578947368421,6.09093638927516,3.9438855858140767,0.7620648537700135 4 | 3,76,12.092105263157896,38.9078947368421,10.902768786623934,8.921603373084778,0.5748086403164231 5 | 4,34,14.0,46.029411764705884,7.97349528451496,5.651455023449602,0.7054294631433137 6 | 5,95,17.410526315789475,29.842105263157894,13.010386318615103,9.664515881872962,0.669479185052539 7 | 6,50,17.42,51.02,8.693881086950915,7.3964607513294585,0.5255442514740986 8 | 7,64,20.359375,37.203125,10.460422443091247,8.114986125192878,0.6310035266072468 9 | 8,6,21.166666666666668,44.833333333333336,3.126943839882286,2.309401076758503,0.6741998624632421 10 | 9,51,24.11764705882353,24.137254901960784,9.324695314820419,7.176877707306668,0.6384497508875908 11 | 10,42,25.142857142857142,53.166666666666664,9.406191210469155,6.070241342042468,0.7638909846513514 12 | 11,47,27.127659574468087,30.319148936170212,9.560177901810462,6.4172139924991365,0.7412362784322296 13 | 12,14,29.142857142857142,54.214285714285715,5.114139636946515,3.575521120622371,0.714980679768619 14 | 13,92,32.630434782608695,46.5,12.36404323906186,9.631784182623838,0.6270043785932361 15 | 14,66,33.24242424242424,24.757575757575758,9.399963671411163,8.968094848781321,0.29962729833542917 16 | 15,19,35.05263157894737,14.631578947368421,7.402215365687311,3.4704139201161013,0.8832860318783144 17 | 16,20,43.55,17.85,5.608008728538381,4.577143006356403,0.5777981144054632 18 | 17,98,43.46938775510204,43.38775510204081,14.66885405826188,8.775893541755803,0.8012967083038806 19 | 18,41,43.65853658536585,12.682926829268293,8.69266023672467,6.071735706299521,0.7156198761046924 20 | 19,49,46.857142857142854,32.734693877551024,10.623352207051015,5.9913054910937324,0.8257918343663552 21 | 20,48,46.958333333333336,22.333333333333332,10.311143353987687,6.261637206936647,0.7944963318345811 22 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData3_002.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,80,10.8875,21.5125,13.22315678762945,7.716419154618882,0.8120747111291169 3 | 2,42,16.523809523809526,14.5,7.9642056370093455,6.830636600777565,0.5142054690561589 4 | 3,61,17.524590163934427,27.40983606557377,10.46738837535566,7.669330047902946,0.6805646681289229 5 | 4,44,18.977272727272727,21.386363636363637,8.217809696123812,6.97254359103419,0.5292476532533313 6 | 5,12,19.5,9.5,3.8297084310253524,3.8297084310253524,0.0 7 | 6,45,20.91111111111111,32.888888888888886,9.886749492291226,6.115136999778656,0.7857702739812928 8 | 7,53,23.11320754716981,14.283018867924529,8.873655474448205,7.637907187393984,0.5090454197605326 9 | 8,16,24.0625,26.1875,6.222716025422782,3.2638635490697965,0.8514055971008102 10 | 9,35,25.571428571428573,20.714285714285715,7.093954219590176,6.401075902848849,0.4310493881350331 11 | 10,41,26.29268292682927,35.90243902439025,9.361476066244782,5.6405205950617106,0.7981002325315818 12 | 11,16,29.5,44.1875,5.301859257350197,3.7852065221398448,0.700207434242993 13 | 12,26,29.346153846153847,10.653846153846153,6.115263665954397,5.378017936291857,0.47600659499739345 14 | 13,58,29.25862068965517,28.103448275862068,9.43004779039568,7.828224270074132,0.5575606233269773 15 | 14,7,30.714285714285715,48.0,3.0237157840738176,2.7994168488950604,0.3779644730092273 16 | 15,20,30.5,21.5,6.0,4.09878030638384,0.7302967433402214 17 | 16,11,31.09090909090909,38.36363636363637,4.346129984141888,3.067356324605907,0.7084437526351621 18 | 17,24,33.583333333333336,44.75,7.05377187045096,4.2972694378939025,0.7930044644012295 19 | 18,5,36.8,51.4,3.098386676965933,1.7888543819998317,0.816496580927726 20 | 19,52,35.17307692307692,35.86538461538461,11.171730813918357,6.513309439303212,0.812459925278107 21 | 20,61,39.131147540983605,44.68852459016394,10.062827996841603,7.93377677126154,0.6151319650513949 22 | 21,69,41.42028985507246,20.89855072463768,10.282171953628115,8.52169613195535,0.5595691561257814 23 | 22,42,42.5,38.54761904761905,8.292517763992343,6.484983485859928,0.6232429332220634 24 | 23,29,43.55172413793103,49.44827586206897,7.636772334941404,4.962718881486602,0.7600666944920791 25 | 24,29,46.172413793103445,44.48275862068966,6.7615308595621055,5.484266770020345,0.5849097430567937 26 | 25,57,48.12280701754386,3.3859649122807016,10.360946578540025,6.972981399056796,0.7396368297844492 27 | 26,13,52.0,6.461538461538462,5.178126215393372,3.4095276388293323,0.7526260896030552 28 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData3_003.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,12,5.083333333333333,16.166666666666668,4.894994431930091,2.9693109114996994,0.7950060587397373 3 | 2,15,9.4,25.4,4.618802153517006,4.026578365477733,0.4898979485566357 4 | 3,59,10.084745762711865,18.389830508474578,11.216451322918344,6.763617369551219,0.7977346341807806 5 | 4,91,14.637362637362637,11.571428571428571,12.323238538659018,9.409860368313932,0.6457053785929747 6 | 5,31,17.419354838709676,60.064516129032256,8.039436227469327,4.98740703494059,0.7843110631413124 7 | 6,15,18.333333333333332,5.4,5.433874815756726,3.464374889583069,0.7704077621947727 8 | 7,83,17.734939759036145,23.481927710843372,12.60564847252728,9.004261418817624,0.6998358491680301 9 | 8,24,18.833333333333332,66.41666666666667,6.733003292241386,4.558264777059114,0.7359800721939873 10 | 9,37,22.135135135135137,52.13513513513514,9.001363380894812,5.3130901527254375,0.8072176240880427 11 | 10,83,23.57831325301205,12.91566265060241,11.622671256403066,9.933654132011437,0.519156669367436 12 | 11,23,23.391304347826086,6.565217391304348,6.667281608803804,4.352291467154875,0.757544515981121 13 | 12,71,28.04225352112676,22.408450704225352,9.77575485845448,9.46997368074262,0.24815455422242919 14 | 13,21,29.666666666666668,69.47619047619048,7.230069715317223,3.6300604784473767,0.8648222179141843 15 | 14,69,29.55072463768116,56.3768115942029,10.596981801742055,8.298751598934327,0.6218654830975966 16 | 15,38,30.289473684210527,15.421052631578947,7.360090908790708,6.7566098374685515,0.39656579468203 17 | 16,28,32.214285714285715,62.892857142857146,7.688728997411695,4.656110476750688,0.7957874049986925 18 | 17,40,33.775,48.1,8.007301931803893,6.333491594131128,0.61186203897846 19 | 18,40,34.5,21.225,11.791171589418587,4.261252462467808,0.9324134045566581 20 | 19,33,35.878787878787875,66.3030303030303,7.454351176536058,5.651588614085657,0.652068920396172 21 | 20,15,38.2,62.06666666666667,5.40599920284407,3.5680145984013056,0.7512566405469012 22 | 21,56,38.92857142857143,57.05357142857143,9.811051660273737,7.243815096768732,0.674437248049809 23 | 22,92,41.119565217391305,48.18478260869565,12.542326198164023,9.573616699798032,0.6460386327612013 24 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData4_001.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,87,3.67816091954023,20.022988505747126,14.316228554170246,8.29904277712803,0.8148337112710596 3 | 2,64,6.265625,8.234375,10.429190698068645,7.95136270605979,0.6470893622277615 4 | 3,53,8.132075471698114,25.30188679245283,10.592159743265418,6.491868037811066,0.790165365826617 5 | 4,37,10.108108108108109,13.35135135135135,7.468702089997269,6.341804876442543,0.5282041711130772 6 | 5,29,11.724137931034482,18.79310344827586,6.761672012514283,5.641415640590722,0.5512765476687427 7 | 6,62,15.387096774193548,8.387096774193548,9.692989645456532,8.275068155717616,0.5207375692540466 8 | 7,99,16.303030303030305,26.545454545454547,12.691636463983023,10.144703922586018,0.6009029709588555 9 | 8,60,17.3,17.5,10.961824957062076,7.023654813846162,0.7677598350854624 10 | 9,54,22.62962962962963,13.61111111111111,9.754827085827754,7.102888868723141,0.6854274474308611 11 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData4_002.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,44,8.931818181818182,16.613636363636363,9.88286232132904,5.866146688052899,0.8047841486945058 3 | 2,43,9.883720930232558,26.25581395348837,10.430649883502241,5.530761266285775,0.8478467860997243 4 | 3,38,12.131578947368421,31.289473684210527,10.999691689608449,4.714993050351264,0.903471698382707 5 | 4,30,14.466666666666667,11.866666666666667,6.455916151924497,6.144286594099555,0.30693768068931926 6 | 5,49,14.10204081632653,18.632653061224488,9.578271844952846,6.538144795643997,0.7307905976433671 7 | 6,55,15.163636363636364,35.836363636363636,9.521768426810805,7.767471401724121,0.5783914943634013 8 | 7,56,17.660714285714285,24.267857142857142,9.69513914590811,7.607340131757989,0.6199325879367076 9 | 8,77,17.207792207792206,42.246753246753244,13.970548953178326,7.402370520365261,0.8480880122904207 10 | 9,34,19.41176470588235,30.705882352941178,7.123618331221204,6.1149382806032895,0.5129752259477252 11 | 10,44,20.931818181818183,10.386363636363637,9.633243153695679,6.031101065376337,0.7797654822253336 12 | 11,49,21.040816326530614,16.571428571428573,8.269031255677927,7.548789415163143,0.40818577310200654 13 | 12,63,24.063492063492063,39.26984126984127,15.499431100160836,5.79531929840019,0.9274668906428339 14 | 13,18,23.5,22.38888888888889,5.742336839989466,4.182667022196356,0.6851615954266117 15 | 14,74,26.243243243243242,27.7027027027027,10.548389409344043,9.06986909645944,0.5105728534330816 16 | 15,53,27.30188679245283,17.20754716981132,11.60323786552277,5.8640684636510665,0.8628956804083193 17 | 16,81,29.580246913580247,36.77777777777778,11.85600525215101,8.823300114201015,0.6679511219779977 18 | 17,40,32.75,16.8,7.671750577229819,7.064293530196345,0.3899902675024661 19 | 18,50,33.32,44.54,8.938301318150112,7.454043838478279,0.551848894704598 20 | 19,48,33.625,28.625,8.733811168882362,7.110124879328004,0.58073607392823 21 | 20,70,34.01428571428571,10.542857142857143,11.801638641139727,7.634701848974404,0.7625588978244998 22 | 21,38,34.21052631578947,22.394736842105264,9.294720592226176,5.437264733559222,0.8110446844968638 23 | 22,99,38.86868686868687,37.101010101010104,15.166629895890368,9.016195122959518,0.8041134681917625 24 | 23,26,39.11538461538461,45.30769230769231,6.166056295965654,5.344121201075725,0.49882968149873613 25 | 24,51,40.19607843137255,17.352941176470587,8.963804506268477,7.336640572777416,0.5745436245065748 26 | 25,68,40.89705882352941,25.83823529411765,10.81637132368087,8.091767398013133,0.6635818377583984 27 | 26,13,43.15384615384615,50.0,5.203549084703927,3.076923076923077,0.8064425896179158 28 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData4_003.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,44,8.613636363636363,70.56818181818181,8.854917271592875,6.539418462849314,0.67424579992383 3 | 2,103,11.368932038834952,62.786407766990294,12.674797424544963,10.627635896810947,0.5449236609510372 4 | 3,63,12.603174603174603,77.60317460317461,10.64693114162052,7.505595468558748,0.7092531426986035 5 | 4,75,17.213333333333335,71.14666666666666,10.457276725831122,9.230366980272336,0.46998562845007247 6 | 5,30,19.333333333333332,46.2,6.317486299531702,6.050200195926147,0.2877982277471246 7 | 6,18,18.5,56.5,6.060143424630315,3.733808824722635,0.7876480070835765 8 | 7,43,19.74418604651163,21.697674418604652,8.253299168854596,6.960126126428911,0.5374205098393691 9 | 8,61,20.34426229508197,61.98360655737705,9.533884304862413,8.19783420770876,0.5105248756986405 10 | 9,83,20.686746987951807,39.04819277108434,10.809018871522529,9.872260410312741,0.4072079393633025 11 | 10,12,22.083333333333332,67.83333333333333,4.894994431930092,2.9693109114997,0.7950060587397373 12 | 11,46,23.934782608695652,16.02173913043478,8.501495736099873,7.0276657801241935,0.5627329584279573 13 | 12,70,21.957142857142856,27.67142857142857,14.463454625312847,6.574433373232055,0.8907187507971498 14 | 13,34,24.235294117647058,32.64705882352941,6.8759711314892575,6.339958157735183,0.38708153917627397 15 | 14,41,28.073170731707318,20.926829268292682,8.215203922503248,6.510597392572932,0.6098642753073713 16 | 15,42,29.404761904761905,29.738095238095237,8.525386994033845,6.397834717591092,0.6609328128996212 17 | 16,63,30.603174603174605,10.34920634920635,10.50447832724914,7.591424899090482,0.6911779394804288 18 | 17,59,30.610169491525422,43.728813559322035,10.995684401882048,7.022625893044708,0.7694798381246188 19 | 18,72,30.375,59.208333333333336,10.913022145854454,8.57420892882844,0.6186254755518432 20 | 19,36,31.88888888888889,52.5,7.8589632624152355,5.8722746887602755,0.6645910447694143 21 | 20,63,34.111111111111114,17.6984126984127,10.07640798885283,8.058546822927202,0.6003411827351517 22 | 21,38,34.13157894736842,35.73684210526316,7.302374312132636,6.651139471948513,0.4128064890831741 23 | 22,24,33.708333333333336,48.25,6.795203388442655,4.774665761277923,0.7115333075906854 24 | 23,34,38.294117647058826,11.411764705882353,7.015560144186248,6.387697324465225,0.413499711604341 25 | 24,50,38.28,24.52,8.782176337798354,7.322061101343987,0.5521556187646485 26 | 25,68,38.35294117647059,42.05882352941177,10.629915748392985,8.24713718843722,0.6309270047426019 27 | 26,25,40.24,31.68,5.993871251740861,5.298443867547758,0.4675305328410962 28 | 27,59,42.94915254237288,16.152542372881356,9.1932942089355,8.280168644426219,0.4344937988662953 29 | 28,62,44.435483870967744,26.370967741935484,12.002917017485238,6.804900735373995,0.8237609832004742 30 | 29,72,44.59722222222222,38.0,12.223433995437688,7.702292884600397,0.7764936096209726 31 | 30,9,44.333333333333336,10.88888888888889,3.885753375057407,2.7954428906961324,0.6945875203623408 32 | 31,24,48.708333333333336,32.0,6.30367691015701,5.37610884387977,0.5221513279951117 33 | 32,66,49.27272727272727,22.681818181818183,13.211836709619554,6.594386874567046,0.8665287372688952 34 | 33,28,51.75,59.82142857142857,9.28006373265841,4.046011991599304,0.8999516661117162 35 | 34,24,51.625,66.54166666666667,7.192595005192923,4.319197376847081,0.7996201537188491 36 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData5_001.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,44,10.090909090909092,33.43181818181818,9.041240872847922,6.314074257330051,0.7157430886662959 3 | 2,49,13.877551020408163,24.93877551020408,9.207471139064902,6.962299948967187,0.6543894664897661 4 | 3,47,14.148936170212766,39.5531914893617,8.305236651336733,7.168599621592134,0.5049610579323598 5 | 4,32,15.3125,29.96875,8.082751776633145,5.347055144407408,0.74991080416152 6 | 5,27,19.37037037037037,21.85185185185185,7.120032409637136,4.878137161046793,0.7284222206285936 7 | 6,77,19.805194805194805,36.15584415584416,14.051954704749246,7.235466836599315,0.8572453183416566 8 | 7,57,25.035087719298247,45.578947368421055,10.283746720890711,7.010183726536711,0.731654138521262 9 | 8,68,26.102941176470587,20.16176470588235,11.212136844995928,7.809857215213731,0.7175045073091103 10 | 9,54,24.166666666666668,27.35185185185185,11.125831696472362,6.207364154586225,0.8298923113208758 11 | 10,61,25.918032786885245,35.114754098360656,11.401288972164375,7.04463213864637,0.7862721562163983 12 | 11,45,31.511111111111113,32.644444444444446,9.167571140932388,6.287364155027046,0.7277649849769076 13 | 12,46,30.91304347826087,41.08695652173913,8.728786018865385,6.934556063206929,0.6073337570166328 14 | 13,42,31.547619047619047,24.452380952380953,8.838973003610667,6.038763163912944,0.7302337606712006 15 | 14,86,36.13953488372093,20.8953488372093,16.543509334414285,6.999167093693827,0.906094048746532 16 | 15,56,37.30357142857143,40.57142857142857,10.050413452277398,7.672133889464737,0.6459673931850484 17 | 16,74,39.054054054054056,32.87837837837838,10.663512965363084,8.893095848180524,0.5518032740718298 18 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData5_002.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,78,4.756410256410256,57.217948717948715,12.778342483244906,7.9954761330751,0.7800595649960997 3 | 2,35,8.82857142857143,49.68571428571428,6.993805619194584,6.538375672161244,0.3549614079023291 4 | 3,58,9.310344827586206,62.241379310344826,10.842584372619932,6.945572694604141,0.7678891320520094 5 | 4,80,10.85,71.775,14.829741650835956,7.463830288093459,0.8641109090746887 6 | 5,68,13.705882352941176,45.10294117647059,12.604679246060183,7.375090324715443,0.8109558573568241 7 | 6,68,14.205882352941176,53.35294117647059,10.642247760721034,8.307373760292707,0.6250267852891888 8 | 7,28,15.928571428571429,70.75,6.7723832865971465,5.5981163128388705,0.5627759292952693 9 | 8,119,18.142857142857142,63.134453781512605,15.14795247342929,10.801854593618742,0.7010724229901382 10 | 9,77,19.324675324675326,82.97402597402598,10.852582638760941,9.071398148656309,0.5489204465972255 11 | 10,60,20.383333333333333,74.86666666666666,10.419901776560428,7.446929439570641,0.6994482313996018 12 | 11,27,20.48148148148148,52.7037037037037,8.177343340188878,4.322484004365911,0.8488755835210016 13 | 12,62,20.112903225806452,42.693548387096776,11.684602739735144,7.226002771008594,0.7858470374377488 14 | 13,39,24.71794871794872,63.256410256410255,8.615172459716824,5.814893939146684,0.7378546247088581 15 | 14,58,25.603448275862068,50.172413793103445,9.080603869878567,8.123991177057615,0.44676132100839244 16 | 15,31,25.35483870967742,56.903225806451616,7.410732060877671,5.347341171643986,0.6923444071547831 17 | 16,64,26.890625,80.234375,10.400830883203579,8.170214467136017,0.6188175007359739 18 | 17,137,28.78832116788321,40.13138686131387,14.207501596272152,12.805697490397376,0.43312570614297063 19 | 18,69,28.82608695652174,66.1304347826087,14.566500565838158,6.57972656393188,0.8921685587647726 20 | 19,41,29.853658536585368,74.65853658536585,9.600035915518097,5.45239965494141,0.8230587986649825 21 | 20,29,32.793103448275865,69.41379310344827,7.500030344823326,5.028972799576618,0.7418851331269437 22 | 21,111,33.072072072072075,53.75675675675676,15.02196294933876,9.637344560249,0.7670809841119383 23 | 22,74,37.810810810810814,41.4054054054054,14.26232050078279,6.808586448986025,0.8786954337853744 24 | 23,60,37.4,63.06666666666667,9.235238819207186,8.426896592128736,0.40913921515160867 25 | 24,106,38.79245283018868,30.81132075471698,12.748226328194114,11.104875242118835,0.4911202501935132 26 | 25,70,38.74285714285714,70.94285714285714,12.263950837400255,7.393019298475119,0.7978732425554047 27 | 26,37,40.37837837837838,13.162162162162161,8.761238318866946,5.431593492522128,0.7846355643626467 28 | 27,85,42.43529411764706,54.976470588235294,12.525732053516965,8.820808316751247,0.7099867906647502 29 | 28,74,42.63513513513514,46.0,11.684026550814707,8.34084635167604,0.7002808366153677 30 | 29,32,44.28125,63.0,6.728877274013787,6.079192843730225,0.42869702564007844 31 | 30,128,43.2890625,21.203125,14.296363835432617,11.618601928478073,0.5826875073710287 32 | 31,99,47.86868686868687,37.282828282828284,13.127610279920514,9.953882945456836,0.6519752080293805 33 | 32,78,49.15384615384615,15.217948717948717,15.154053096046654,6.686039913584002,0.8974064774143475 34 | 33,81,48.641975308641975,70.8641975308642,13.1400378769857,8.291351347470926,0.775783607463878 35 | 34,131,51.343511450381676,58.33587786259542,16.339662213959503,10.76509634642846,0.7522898858461141 36 | 35,82,51.31707317073171,47.01219512195122,11.081315872067151,9.851746409244543,0.45782719106467995 37 | 36,151,53.54304635761589,28.576158940397352,14.828480297561578,13.652996642554886,0.3902050682980365 38 | 37,73,56.04109589041096,66.28767123287672,10.601469960064467,8.796648486221782,0.5581241838086607 39 | 38,38,57.60526315789474,44.8421052631579,8.305527548952746,6.0974483969552065,0.6789944324916031 40 | 39,56,58.125,37.767857142857146,9.277614863183901,7.761584179859253,0.547825499955663 41 | 40,44,60.22727272727273,60.63636363636363,11.33668764094663,5.133765322787862,0.8915891237915614 42 | 41,75,59.733333333333334,20.666666666666668,13.298616797344522,7.423694209881664,0.8296858740609631 43 | 42,20,62.55,32.75,5.985542185750804,4.187276530466729,0.7145688521824596 44 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/regionprops/20210305_NE_mockData5_003.csv: -------------------------------------------------------------------------------- 1 | Object,area,centroid-0,centroid-1,axis_major_length,axis_minor_length,eccentricity 2 | 1,56,11.196428571428571,29.285714285714285,10.05305474942012,7.182203658267776,0.6997069458821189 3 | 2,61,11.770491803278688,37.049180327868854,10.084766510659406,7.731536502597818,0.6420592934535401 4 | 3,49,15.673469387755102,52.02040816326531,9.09079621468462,6.920238608638086,0.6484752971050647 5 | 4,53,18.0,28.150943396226417,9.069644452674947,7.658983341681665,0.5356131659781782 6 | 5,38,18.157894736842106,36.973684210526315,10.390125197983666,4.926145046425686,0.8804613293000979 7 | 6,61,19.016393442622952,20.721311475409838,9.96312085806004,7.814282861549349,0.6203554563214021 8 | 7,47,20.914893617021278,47.02127659574468,8.867583881452983,6.7955127605617776,0.6424448283421569 9 | 8,14,23.785714285714285,24.357142857142858,4.742873420478221,3.686025552052299,0.629288982059086 10 | 9,99,24.575757575757574,55.494949494949495,11.626938246006373,10.998386053408183,0.3243416438286171 11 | 10,65,27.153846153846153,18.015384615384615,10.320552449204142,8.10293515276853,0.6193359332391882 12 | 11,66,33.78787878787879,53.13636363636363,10.752748357850395,7.875761691426861,0.6808297151201005 13 | 12,113,36.690265486725664,18.123893805309734,15.035413444808983,9.767927999963977,0.7602236799702268 14 | 13,46,35.891304347826086,25.543478260869566,11.735585279255178,5.715369816729889,0.873395327604 15 | 14,68,36.838235294117645,45.80882352941177,11.179227259476864,8.381927689440182,0.66169057856769 16 | 15,45,38.91111111111111,32.37777777777778,8.537433536105171,6.725747944036424,0.6159374540288877 17 | 16,52,40.23076923076923,57.98076923076923,9.007216089829736,7.53533681494481,0.5478312211748073 18 | 17,29,41.58620689655172,51.10344827586207,6.344569113616827,5.884617724115323,0.3738114716594334 19 | 18,85,43.45882352941177,71.34117647058824,13.611134357276205,8.00002578193567,0.8090382521182451 20 | 19,77,45.03896103896104,44.285714285714285,12.91871892664483,8.398186601743559,0.759866713652244 21 | 20,69,45.594202898550726,34.768115942028984,11.120379226586126,7.994658564495164,0.6950932393874204 22 | 21,92,45.01086956521739,24.293478260869566,11.012452545416345,10.719661568045925,0.2290581681099669 23 | 22,80,47.8875,53.825,12.42191084909054,8.318871970240119,0.7426376788492602 24 | 23,75,49.17333333333333,64.16,12.01341300120513,8.0837860530425,0.7397364538685227 25 | 24,28,49.92857142857143,79.42857142857143,7.126856614385291,5.004462957388155,0.7119819274917604 26 | 25,35,50.74285714285714,29.542857142857144,7.845698369447885,5.685868335469602,0.68905235584947 27 | 26,51,51.09803921568628,71.6078431372549,8.787814811646928,7.399200432840645,0.5395023248732761 28 | 27,44,55.31818181818182,78.81818181818181,8.674831688264584,6.637249453218373,0.6438928854038571 29 | 28,18,55.888888888888886,59.166666666666664,6.039848861445872,3.914421396157223,0.7615558995436135 30 | 29,85,56.576470588235296,51.77647058823529,11.917574973535332,9.294947198793816,0.6258591270169932 31 | 30,53,58.15094339622642,72.94339622641509,9.47990542323291,7.246243141102379,0.6447668873389272 32 | 31,35,63.02857142857143,53.82857142857143,7.966052345785105,5.621530206353635,0.70852488954191 33 | 32,35,63.48571428571429,71.11428571428571,8.002140270464567,5.665365243010128,0.706231233141586 34 | 33,32,65.46875,77.3125,6.636097323074277,6.114252801339377,0.3887038775690792 35 | 34,56,67.03571428571429,58.25,9.346451863035737,7.831839830012884,0.5457502135228917 36 | 35,48,68.72916666666667,64.64583333333333,10.097665706760814,6.17979975826761,0.7908555898723314 37 | 36,46,68.8913043478261,48.630434782608695,8.193751007477376,7.08098349279216,0.5031602126912892 38 | 37,39,69.07692307692308,71.97435897435898,8.239122888143417,6.219190200451355,0.6559130634934798 39 | 38,47,73.2127659574468,54.765957446808514,8.714150532927695,6.933965492878471,0.6056734609915119 40 | 39,37,73.67567567567568,66.62162162162163,8.546284268234706,5.498232899450907,0.7655740661727326 41 | 40,17,74.58823529411765,60.35294117647059,5.366359905713177,4.0470547254255615,0.6566991163647711 42 | -------------------------------------------------------------------------------- /inst/extdata/mockData/steinbock/steinbock.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | base_dir=$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd -P) 4 | steinbock="docker run -v ${base_dir}:/data -v /tmp/.X11-unix:/tmp/.X11-unix -v ${HOME}/.Xauthority:/home/steinbock/.Xauthority:ro -e DISPLAY ghcr.io/bodenmillergroup/steinbock:0.16.1" 5 | 6 | cd "${base_dir}" 7 | 8 | cp -r ../raw . 9 | cp ../panel.csv raw 10 | $steinbock preprocess imc panel 11 | $steinbock preprocess imc images --hpf 50 12 | 13 | $steinbock classify ilastik prepare --cropsize 50 --seed 123 14 | cp ../ilastik.ilp pixel_classifier.ilp 15 | rm -r ilastik_crops && mkdir ilastik_crops && cp -r ../analysis/ilastik/*.h5 ilastik_crops 16 | $steinbock classify ilastik fix --no-backup 17 | $steinbock classify ilastik run 18 | 19 | $steinbock segment cellprofiler prepare 20 | $steinbock segment cellprofiler run -o masks_ilastik 21 | 22 | $steinbock measure intensities --masks masks_ilastik -o intensities_ilastik 23 | $steinbock measure regionprops --masks masks_ilastik -o regionprops_ilastik 24 | $steinbock measure neighbors --type expansion --dmax 4 --masks masks_ilastik -o neighbors_ilastik 25 | $steinbock measure cellprofiler prepare --masks masks_ilastik 26 | $steinbock measure cellprofiler run 27 | 28 | # deep learning-based segmentation 29 | $steinbock segment deepcell --minmax -o masks_deepcell 30 | 31 | # measurement 32 | $steinbock measure intensities --masks masks_deepcell -o intensities_deepcell 33 | $steinbock measure regionprops --masks masks_deepcell -o regionprops_deepcell 34 | $steinbock measure neighbors --masks masks_deepcell --type expansion --dmax 4 -o neighbors_deepcell 35 | 36 | $steinbock export ome 37 | $steinbock export csv intensities_deepcell regionprops_deepcell -o cells.csv 38 | $steinbock export fcs intensities_deepcell regionprops_deepcell -o cells.fcs 39 | $steinbock export anndata --intensities intensities_deepcell --data regionprops_deepcell --neighbors neighbors_deepcell -o cells.h5ad 40 | $steinbock export graphs --data intensities_deepcell --data regionprops_deepcell --neighbors neighbors_deepcell 41 | -------------------------------------------------------------------------------- /inst/extdata/mockData/tiffs/20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/imcRtools/abc2ed7a7fec178049a251a626a13b2f2cdc23e4/inst/extdata/mockData/tiffs/20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff -------------------------------------------------------------------------------- /inst/extdata/spillover/Dy161.txt: -------------------------------------------------------------------------------- 1 | Start_push End_push Pushes_duration X Y Z 161Dy(Dy161Di) 162Dy(Dy162Di) 163Dy(Dy163Di) 164Dy(Dy164Di) 2 | 1570 1953 384 0 0 0 1140.449 30.374 9.82 8.466 3 | 1955 2338 384 1 0 1 1192.119 36.666 5.024 6.091 4 | 2341 2724 384 2 0 2 1072.492 41.223 7.702 8.255 5 | 2726 3109 384 3 0 3 1365.843 59.154 17.342 10.302 6 | 3111 3494 384 4 0 4 1422.316 54.236 16.669 11.786 7 | 3497 3880 384 5 0 5 1411.041 29.022 9.82 11.353 8 | 3882 4265 384 6 0 6 1356.291 42.774 18.003 10.044 9 | 4267 4650 384 7 0 7 1489.757 45.532 19.934 12.099 10 | 4653 5036 384 8 0 8 1937.968 42.445 29.084 11.593 11 | 5038 5421 384 9 0 9 1245.874 46.63 12.865 2 12 | 5423 5806 384 10 0 10 1357.652 57.206 9.502 6.08 13 | 5809 6192 384 11 0 11 1996.262 67.952 19.375 12.859 14 | 6194 6577 384 12 0 12 1342.607 35.021 18.342 16.281 15 | 6579 6962 384 13 0 13 1344.669 35.627 10.714 4.226 16 | 6964 7347 384 14 0 14 1634.378 38.324 20.17 10.778 17 | 7350 7733 384 15 0 15 1153.522 42.06 6.669 10.04 18 | 7735 8118 384 16 0 16 1030.403 24.058 8.073 5 19 | 8120 8503 384 17 0 17 1414.955 46.151 22.232 11.138 20 | 8506 8889 384 18 0 18 1697.201 42.868 22.04 9.891 21 | 8891 9274 384 19 0 19 1482.106 49.265 13.118 15.281 22 | 9276 9659 384 20 0 20 1433.778 42.65 16.391 7.371 23 | 9662 10045 384 21 0 21 1004.257 26.123 7.992 6.455 24 | 10047 10430 384 22 0 22 1604.177 53.441 17.375 7.073 25 | 10432 10815 384 23 0 23 1537.177 57.05 9.387 6.52 26 | 10817 11200 384 24 0 24 1586.682 37.308 21.403 10.48 27 | 11203 11586 384 25 0 25 962.281 30.627 9.147 5.913 28 | 11588 11971 384 26 0 26 1355.349 27.566 16.228 14.051 29 | 11973 12356 384 27 0 27 1628.124 50.832 23.191 12.058 30 | 12359 12742 384 28 0 28 1801.093 59.17 13.922 14.491 31 | 12744 13127 384 29 0 29 1235.006 31.279 13.649 7.815 32 | 13129 13512 384 30 0 30 1287.695 35.376 13.469 6.891 33 | 13515 13898 384 31 0 31 1255.347 29.598 11.159 12.269 34 | 13900 14283 384 32 0 32 1602.932 43.334 16.469 4.146 35 | 14285 14668 384 33 0 33 1216.641 44.679 16.264 5.386 36 | 14671 15054 384 34 0 34 842.555 41.148 4 5.778 37 | 15056 15439 384 35 0 35 1153.677 32.878 8.143 8.695 38 | 15441 15824 384 36 0 36 1420.431 36.187 8.538 7.513 39 | 15827 16210 384 37 0 37 784.917 27.295 9.693 7.455 40 | 16212 16595 384 38 0 38 1300.381 36.113 36.051 9.237 41 | 16597 16980 384 39 0 39 1338.383 32.21 16.448 8.073 42 | 16982 17365 384 40 0 40 1058.054 36.653 13.636 5.52 43 | 17368 17751 384 41 0 41 1264.56 36.461 15.86 12.204 44 | 17753 18136 384 42 0 42 1106.913 41.552 10.224 10.153 45 | 18138 18521 384 43 0 43 1166.457 39.591 7.6 8.353 46 | 18524 18907 384 44 0 44 1229.522 34.63 8.885 6.713 47 | 18909 19292 384 45 0 45 1348.615 33.875 12.302 4.636 48 | 19294 19677 384 46 0 46 1113.271 37.367 12.269 6.764 49 | 19680 20063 384 47 0 47 1663.06 64.082 20.085 8.109 50 | 20065 20448 384 48 0 48 1310.126 45.93 14.13 8.946 51 | 20450 20833 384 49 0 49 972.054 35.168 12.432 4.109 52 | 20836 21219 384 50 0 50 1104.696 35.448 9.894 7.993 53 | 21221 21604 384 51 0 51 1076.82 34.881 11.494 5.847 54 | 21606 21989 384 52 0 52 988.282 23.097 12.791 6.189 55 | 21991 22374 384 53 0 53 1215.828 41.692 9.126 10.12 56 | 22377 22760 384 54 0 54 1597.252 55.571 9.559 8.517 57 | 22762 23145 384 55 0 55 1433.201 36.409 15.746 13.055 58 | 23147 23530 384 56 0 56 1162.283 31.803 8.277 11.924 59 | 23533 23916 384 57 0 57 2133.617 77.228 19.522 17.131 60 | 23918 24301 384 58 0 58 1994.891 51.659 29.493 14.724 61 | 24303 24686 384 59 0 59 2145.704 72.049 27.297 9.12 62 | 24689 25072 384 60 0 60 1121.342 28.025 14.554 2 63 | 25074 25457 384 61 0 61 793.466 27.592 13.412 4.291 64 | 25459 25842 384 62 0 62 1376.151 41.842 8.143 11.579 65 | 25845 26228 384 63 0 63 1104.79 36.239 9.494 9.68 66 | 26230 26613 384 64 0 64 977.285 28.553 9.542 7.971 67 | 26615 26998 384 65 0 65 1126.781 24.566 13.012 9.924 68 | 27000 27383 384 66 0 66 1267.816 42.741 8.045 11.688 69 | 27386 27769 384 67 0 67 1215.008 36.738 16.742 3.571 70 | 27771 28154 384 68 0 68 1036.74 35.575 10.547 3.015 71 | 28156 28539 384 69 0 69 1192.809 45.936 11.052 5.113 72 | 28542 28925 384 70 0 70 1057.629 43.171 10.008 4.389 73 | 28927 29310 384 71 0 71 1379.555 33.641 11.399 11.906 74 | 29312 29695 384 72 0 72 1305.952 64.085 13.632 14.739 75 | 29698 30081 384 73 0 73 1285.435 57.108 9.522 18.622 76 | 30083 30466 384 74 0 74 1235.267 34.875 17.856 11.477 77 | 30468 30851 384 75 0 75 1252.365 33.591 14.424 5.815 78 | 30854 31237 384 76 0 76 1144.02 22.207 9.714 9.582 79 | 31239 31622 384 77 0 77 1531.517 59.16 8.11 4.618 80 | 31624 32007 384 78 0 78 1113.711 43.786 7.286 9.484 81 | 32009 32392 384 79 0 79 1022.298 38.311 9.408 5.113 82 | 32395 32778 384 80 0 80 996.773 34.849 7.828 4.633 83 | 32780 33163 384 81 0 81 832.342 24.426 9.147 8.499 84 | 33165 33548 384 82 0 82 776.693 20.26 16.816 4.193 85 | 33551 33934 384 83 0 83 922.195 14.491 7.722 5.648 86 | 33936 34319 384 84 0 84 880.218 35.607 3.743 8.597 87 | 34321 34704 384 85 0 85 1269.268 39.79 9.608 7.484 88 | 34707 35090 384 86 0 86 1381.302 47.041 16.048 9.207 89 | 35092 35475 384 87 0 87 1311.021 31.435 11.159 9.371 90 | 35477 35860 384 88 0 88 1244.609 33.116 14.269 6.415 91 | 35863 36246 384 89 0 89 1311.873 43.601 18.423 8.371 92 | 36248 36631 384 90 0 90 1077.489 33.034 10.061 2.753 93 | 36633 37016 384 91 0 91 1075.02 39.858 4.102 9.171 94 | 37018 37401 384 92 0 92 1172.926 39.187 5.428 9.237 95 | 37404 37787 384 93 0 93 1381.276 44.262 10.926 10.939 96 | 37789 38172 384 94 0 94 1018.111 32.406 10.955 7.484 97 | 38174 38557 384 95 0 95 875.958 18.651 6.951 4.211 98 | 38560 38943 384 96 0 96 797.792 23.263 10.257 2.851 99 | 38945 39328 384 97 0 97 1009.438 30.745 10.31 6.32 100 | 39330 39713 384 98 0 98 1095.952 36.966 9.077 3.702 101 | 39716 40099 384 99 0 99 736.478 20.745 6.396 4.506 102 | -------------------------------------------------------------------------------- /inst/scripts/download_TestData_cpout.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Download test IMC data - cp out" 3 | author: "Nils Eling" 4 | date: "`r Sys.Date()`" 5 | output: html_document 6 | --- 7 | 8 | ```{r setup, include=FALSE} 9 | knitr::opts_chunk$set(echo = TRUE) 10 | ``` 11 | 12 | This script downloads the CellProfiler output of a small test dataset. 13 | The Github repository containing this data can be accessed [here](https://github.com/BodenmillerGroup/TestData). 14 | 15 | More specifically, we will use the `210308_ImcTestData` dataset. 16 | 17 | ## Download the CellProfiler output 18 | 19 | Here, we will first download the output of the standard [ImcSegmentationPipeline](https://github.com/BodenmillerGroup/ImcSegmentationPipeline). 20 | For this, we an use the automatically generated Github assets. 21 | 22 | ```{r download-cpout} 23 | cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.10/210308_ImcTestData_analysis_cpout.tar.gz" 24 | 25 | download.file(cur_url, "210308_ImcTestData_analysis_cpout.tar.gz") 26 | untar("210308_ImcTestData_analysis_cpout.tar.gz") 27 | unlink("210308_ImcTestData_analysis_cpout.tar.gz") 28 | ``` 29 | 30 | ## Only copy the .csv files 31 | 32 | For reading in the single-cell features, we will only need to copy the .csv files of the output folder. 33 | 34 | ```{r copy-csv, message=FALSE} 35 | file.copy(list.files("datasets/210308_ImcTestData/analysis/cpout/", pattern = ".csv$", full.names = TRUE), 36 | "../extdata/mockData/cpout", overwrite = TRUE) 37 | unlink("datasets/", recursive = TRUE) 38 | ``` 39 | 40 | ## Rename object relationship file 41 | 42 | This needs to be done to avoid an R CMD check warning indicating an invalid file 43 | name. 44 | 45 | ```{r rename-object-relationship} 46 | file.rename("../extdata/mockData/cpout/Object relationships.csv", 47 | "../extdata/mockData/cpout/Object_relationships.csv") 48 | ``` 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /inst/scripts/download_TestData_raw.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Download test IMC data" 3 | author: "Nils Eling" 4 | date: "`r Sys.Date()`" 5 | output: html_document 6 | --- 7 | 8 | ```{r setup, include=FALSE} 9 | knitr::opts_chunk$set(echo = TRUE) 10 | ``` 11 | 12 | This script downloads and subsets test IMC data that were acquired for general purpose testing. 13 | The Github repository containing this data can be accessed [here](https://github.com/BodenmillerGroup/TestData). 14 | 15 | More specifically, we will use the `210308_ImcTestData` dataset. 16 | 17 | ## Download the .txt files 18 | 19 | Here, we will first download the raw data in form of .txt files. 20 | For this, we an use the automatically generated Github assets. 21 | 22 | ```{r download-txt} 23 | cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.2/210308_ImcTestData_raw.tar.gz" 24 | 25 | download.file(cur_url, "210308_ImcTestData_raw.tar.gz") 26 | untar("210308_ImcTestData_raw.tar.gz") 27 | unlink("210308_ImcTestData_raw.tar.gz") 28 | ``` 29 | 30 | ## Subset and move the data 31 | 32 | Here, we will move the .txt files of one raw data file to the `mockData` folder 33 | 34 | ```{r subset-txt, message=FALSE} 35 | file.copy(list.files("datasets/210308_ImcTestData/raw/20210305_NE_mockData2/", pattern = ".txt$", full.names = TRUE), 36 | "../extdata/mockData/raw", overwrite = TRUE) 37 | unlink("datasets/", recursive = TRUE) 38 | ``` 39 | 40 | ## Download the corresponding tiff files 41 | 42 | Here, we will download the `.tiff` files asset. 43 | 44 | ```{r download-tiff} 45 | cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.2/210308_ImcTestData_analysis_cpout_images.tar.gz" 46 | 47 | download.file(cur_url, "210308_ImcTestData_analysis_cpout_images.tar.gz") 48 | untar("210308_ImcTestData_analysis_cpout_images.tar.gz") 49 | unlink("210308_ImcTestData_analysis_cpout_images.tar.gz") 50 | ``` 51 | 52 | And copy them to the right location. 53 | 54 | ```{r move-tiff} 55 | file.copy("datasets/210308_ImcTestData/analysis/cpout/images/20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff", 56 | "../extdata/mockData/tiffs/", overwrite = TRUE) 57 | unlink("datasets/", recursive = TRUE) 58 | ``` 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /inst/scripts/download_TestData_steinbock.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Download test IMC data - steinbock" 3 | author: "Nils Eling" 4 | date: "`r Sys.Date()`" 5 | output: html_document 6 | --- 7 | 8 | ```{r setup, include=FALSE} 9 | knitr::opts_chunk$set(echo = TRUE) 10 | ``` 11 | 12 | This script downloads the steinbock output of a small test dataset. 13 | The Github repository containing this data can be accessed [here](https://github.com/BodenmillerGroup/TestData). 14 | 15 | More specifically, we will use the `210308_ImcTestData` dataset. 16 | 17 | ## Download the steinbock output 18 | 19 | Here, we will first download the output of the [steinbock](https://github.com/BodenmillerGroup/steinbock). 20 | For this, we an use the automatically generated Github assets. 21 | 22 | ```{r download-cpout} 23 | cur_url <- "https://github.com/BodenmillerGroup/TestData/releases/download/v1.0.10/210308_ImcTestData_steinbock.tar.gz" 24 | 25 | download.file(cur_url, "210308_ImcTestData_steinbock.tar.gz") 26 | untar("210308_ImcTestData_steinbock.tar.gz") 27 | unlink("210308_ImcTestData_steinbock.tar.gz") 28 | ``` 29 | 30 | ## Only copy the needed files 31 | 32 | For reading in the single-cell features, we will only need to copy the .csv files and the folders containing the individual measurements. 33 | 34 | ```{r copy-files, message=FALSE} 35 | files_of_interest <- c("panel.csv", "steinbock.sh", "images.csv") 36 | 37 | folders_of_interest <- c("neighbors", "intensities", "regionprops") 38 | 39 | lapply(folders_of_interest, function(x){ 40 | dir.create(paste0("../extdata/mockData/steinbock/", x)) 41 | file.copy(list.files(paste0("datasets/210308_ImcTestData/steinbock/", x, "_deepcell"), 42 | full.names = TRUE), 43 | paste0("../extdata/mockData/steinbock/", x), 44 | overwrite = TRUE) 45 | }) 46 | 47 | file.copy(paste0("datasets/210308_ImcTestData/steinbock/", files_of_interest), 48 | "../extdata/mockData/steinbock/", 49 | overwrite = TRUE) 50 | unlink("datasets/", recursive = TRUE) 51 | ``` 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /inst/scripts/download_spillover.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Download example spillover data" 3 | author: "Nils Eling" 4 | date: "`r Sys.Date()`" 5 | output: html_document 6 | --- 7 | 8 | ```{r setup, include=FALSE} 9 | knitr::opts_chunk$set(echo = TRUE) 10 | ``` 11 | 12 | This script downloads and re-formats example data for spillover correction. 13 | As test data, we use the files that are provided by the following publication: 14 | 15 | [Chevrier, Stéphane, Helena L. Crowell, Vito R. T. Zanotelli, Stefanie Engler, Mark D. Robinson, and Bernd Bodenmiller. 2017. “Compensation of Signal Spillover in Suspension and Imaging Mass Cytometry.” Cell Systems 6: 612–20.](https://www.cell.com/cell-systems/fulltext/S2405-4712(18)30063-2) 16 | 17 | They can be accessed from [https://data.mendeley.com/datasets/v58yj49pfr/1](https://data.mendeley.com/datasets/v58yj49pfr/1). 18 | 19 | More specificaly, the spillover files are part of `Figure S5`. 20 | 21 | ## Download the data 22 | 23 | Here, we will first download the data. 24 | 25 | ```{r download-data} 26 | sm_url <- "https://data.mendeley.com/public-files/datasets/v58yj49pfr/files/b39223d2-2825-4e79-9875-86fa0e1c55d2/file_downloaded?dl=1" 27 | 28 | download.file(sm_url, "Figure_S5.zip") 29 | unzip("Figure_S5.zip", overwrite=TRUE) 30 | unlink("Figure_S5.zip") 31 | ``` 32 | 33 | ## Read in and subset the data 34 | 35 | We will now prepare a subsample of the data for testing purposes: 36 | 37 | ```{r subset-data, message=FALSE} 38 | library(readr) 39 | library(stringr) 40 | full_txt <- list.files("Figure_S5/Spillover_Matrix_1/", pattern = "Dy161|Dy162|Dy163|Dy164", full.names = TRUE) 41 | full_txt_names <- list.files("Figure_S5/Spillover_Matrix_1/", pattern = "Dy161|Dy162|Dy163|Dy164") 42 | full_txt_names <- str_extract(full_txt_names, "^Dy[1-9]{3}") 43 | 44 | full_txt <- lapply(full_txt, read_delim, delim = "\t") 45 | 46 | ## Subset to first 100 rows 47 | full_txt <- lapply(full_txt, function(x){x[seq_len(100),]}) 48 | 49 | ## Subset to specific channels 50 | full_txt <- lapply(full_txt, function(x){x[,colnames(x) %in% 51 | c("Start_push", "End_push", "Pushes_duration", 52 | "X", "Y", "Z", "161Dy(Dy161Di)", 53 | "162Dy(Dy162Di)", "163Dy(Dy163Di)", "164Dy(Dy164Di)")]}) 54 | ``` 55 | 56 | ## Write out files 57 | 58 | We will now save the processed files. 59 | 60 | ```{r save-files} 61 | dir.create("../extdata/spillover") 62 | for (i in seq_len(length(full_txt))) { 63 | write_delim(full_txt[[i]], 64 | file = paste0("../extdata/spillover/", full_txt_names[i], ".txt"), 65 | delim = "\t") 66 | } 67 | ``` 68 | 69 | ## Remove unnecessary files 70 | 71 | Finally, we remove all unneeded files: 72 | 73 | ```{r remove-files} 74 | unlink("Figure_S5/", recursive = TRUE) 75 | ``` -------------------------------------------------------------------------------- /man/aggregateNeighbors.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/aggregateNeighbors.R 3 | \name{aggregateNeighbors} 4 | \alias{aggregateNeighbors} 5 | \title{Function to aggregate all neighbors of each cell.} 6 | \usage{ 7 | aggregateNeighbors( 8 | object, 9 | colPairName, 10 | aggregate_by = c("metadata", "expression"), 11 | count_by = NULL, 12 | proportions = TRUE, 13 | assay_type = NULL, 14 | subset_row = NULL, 15 | statistic = c("mean", "median", "sd", "var"), 16 | name = NULL 17 | ) 18 | } 19 | \arguments{ 20 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 21 | object} 22 | 23 | \item{colPairName}{single character indicating the \code{colPair(object)} 24 | entry containing the neighbor information.} 25 | 26 | \item{aggregate_by}{character specifying whether the neighborhood should be 27 | summarized by cellular features stored in \code{colData(object)} 28 | (\code{aggregate_by = "metdata"}) or by marker expression of the 29 | neighboring cells (\code{aggregate_by = "expression"}).} 30 | 31 | \item{count_by}{for \code{summarize_by = "metadata"}, a single character 32 | specifying the \code{colData(object)} entry containing the cellular 33 | metadata that should be summarized across each cell's neighborhood.} 34 | 35 | \item{proportions}{single logical indicating whether aggregated metadata 36 | should be returned in form of proportions instead of absolute counts.} 37 | 38 | \item{assay_type}{for \code{summarize_by = "expression"}, single character 39 | indicating the assay slot to use.} 40 | 41 | \item{subset_row}{for \code{summarize_by = "expression"}, an integer, logical 42 | or character vector specifying the features to use. If NULL, defaults to 43 | all features.} 44 | 45 | \item{statistic}{for \code{summarize_by = "expression"}, a single character 46 | specifying the statistic to be used for summarizing the expression values 47 | across all neighboring cells. Supported entries are "mean", "median", "sd", 48 | "var". Defaults to "mean" if not specified.} 49 | 50 | \item{name}{single character specifying the name of the data frame to be 51 | saved in the \code{colData(object)}. Defaults to "aggregatedNeighbors" when 52 | \code{summarize_by = "metadata"} or "{statistic}_aggregatedExpression" when 53 | \code{summarize_by = "expression"}.} 54 | } 55 | \value{ 56 | returns an object of \code{class(object)} containing the aggregated 57 | values in form of a \code{DataFrame} object in 58 | \code{colData(object)[[name]]}. 59 | } 60 | \description{ 61 | Function to summarize categorical or expression values of all 62 | neighbors of each cell. 63 | } 64 | \examples{ 65 | library(cytomapper) 66 | data(pancreasSCE) 67 | 68 | sce <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 69 | type = "knn", k = 3) 70 | 71 | # Aggregating neighboring cell-types 72 | sce <- aggregateNeighbors(sce, colPairName = "knn_interaction_graph", 73 | aggregate_by = "metadata", 74 | count_by = "CellType") 75 | sce$aggregatedNeighbors 76 | 77 | # Aggregating neighboring expression values 78 | sce <- aggregateNeighbors(sce, colPairName = "knn_interaction_graph", 79 | aggregate_by = "expression", 80 | assay_type = "exprs", 81 | statistic = "mean") 82 | sce$mean_aggregatedExpression 83 | 84 | } 85 | \author{ 86 | Daniel Schulz (\email{daniel.schulz@uzh.ch}) 87 | } 88 | -------------------------------------------------------------------------------- /man/binAcrossPixels.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/binAcrossPixels.R 3 | \name{binAcrossPixels} 4 | \alias{binAcrossPixels} 5 | \title{Aggregate consecutive pixels per single-metal spot} 6 | \usage{ 7 | binAcrossPixels( 8 | object, 9 | bin_size, 10 | spot_id = "sample_id", 11 | assay_type = "counts", 12 | statistic = "sum", 13 | ... 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{a \code{SingleCellExperiment} object containing pixel 18 | intensities for all channels. Individual pixels are stored as columns and 19 | channels are stored as rows.} 20 | 21 | \item{bin_size}{single numeric indicating how many consecutive pixels per 22 | spot should be aggregated.} 23 | 24 | \item{spot_id}{character string indicating which \code{colData(object)} entry 25 | stores the isotope names of the spotted metal.} 26 | 27 | \item{assay_type}{character string indicating which assay to use.} 28 | 29 | \item{statistic}{character string indicating the statistic to use for 30 | aggregating consecutive pixels.} 31 | 32 | \item{...}{additional arguments passed to \code{aggregateAcrossCells}} 33 | } 34 | \value{ 35 | returns the binned pixel intensities in form of a 36 | \code{SingleCellExperiment} object 37 | } 38 | \description{ 39 | Helper function for estimating the spillover matrix. Per metal 40 | spot, consecutive pixels a aggregated (default: summed). 41 | } 42 | \examples{ 43 | path <- system.file("extdata/spillover", package = "imcRtools") 44 | # Read in .txt files 45 | sce <- readSCEfromTXT(path) 46 | dim(sce) 47 | 48 | # Visualizes heatmap before aggregation 49 | plotSpotHeatmap(sce) 50 | 51 | # Sum consecutive pixels 52 | sce <- binAcrossPixels(sce, bin_size = 10) 53 | dim(sce) 54 | 55 | # Visualizes heatmap after aggregation 56 | plotSpotHeatmap(sce) 57 | 58 | } 59 | \seealso{ 60 | \code{\link[scuttle]{aggregateAcrossCells}} for the aggregation 61 | function 62 | } 63 | \author{ 64 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 65 | } 66 | -------------------------------------------------------------------------------- /man/countInteractions.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/countInteractions.R 3 | \name{countInteractions} 4 | \alias{countInteractions} 5 | \title{Summarizes cell-cell interactions within grouping levels (e.g. images)} 6 | \usage{ 7 | countInteractions( 8 | object, 9 | group_by, 10 | label, 11 | colPairName, 12 | method = c("classic", "histocat", "patch"), 13 | patch_size = NULL 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 18 | object .} 19 | 20 | \item{group_by}{a single character indicating the \code{colData(object)} 21 | entry by which interactions are grouped. This is usually the image ID or 22 | patient ID.} 23 | 24 | \item{label}{single character specifying the \code{colData(object)} entry 25 | which stores the cell labels. These can be cell-types labels or other 26 | metadata.} 27 | 28 | \item{colPairName}{single character indicating the \code{colPair(object)} 29 | entry containing cell-cell interactions in form of an edge list.} 30 | 31 | \item{method}{which cell-cell interaction counting method to use 32 | (see details)} 33 | 34 | \item{patch_size}{if \code{method = "patch"}, a single numeric specifying 35 | the minimum number of neighbors of the same type to be considered a patch 36 | (see details)} 37 | } 38 | \value{ 39 | a DataFrame containing one row per \code{group_by} entry and unique 40 | \code{label} entry combination (\code{from_label}, \code{to_label}). The 41 | \code{ct} entry stores the interaction count as described in the details. 42 | \code{NA} is returned if a certain label is not present in this grouping 43 | level. 44 | } 45 | \description{ 46 | Function to calculate the average number of neighbors B that 47 | a cell of type A has using different approaches. 48 | } 49 | \section{Counting and summarizing cell-cell interactions}{ 50 | 51 | In principle, the \code{countInteractions} function counts the number 52 | of edges (interactions) between each set of unique entries in 53 | \code{colData(object)[[label]]}. Simplified, it counts for each cell of 54 | type A the number of neighbors of type B. 55 | This count is averaged within each unique entry 56 | \code{colData(object)[[group_by]]} in three different ways: 57 | 58 | 1. \code{method = "classic"}: The count is divided by the total number of 59 | cells of type A. The final count can be interpreted as "How many neighbors 60 | of type B does a cell of type A have on average?" 61 | 62 | 2. \code{method = "histocat"}: The count is divided by the number of cells 63 | of type A that have at least one neighbor of type B. The final count can be 64 | interpreted as "How many many neighbors of type B has a cell of type A on 65 | average, given it has at least one neighbor of type B?" 66 | 67 | 3. \code{method = "patch"}: For each cell, the count is binarized to 0 68 | (less than \code{patch_size} neighbors of type B) or 1 (more or equal to 69 | \code{patch_size} neighbors of type B). The binarized counts are averaged 70 | across all cells of type A. The final count can be interpreted as "What 71 | fraction of cells of type A have at least a given number of neighbors of 72 | type B?" 73 | } 74 | 75 | \examples{ 76 | library(cytomapper) 77 | data(pancreasSCE) 78 | 79 | pancreasSCE <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 80 | type = "knn", k = 3) 81 | 82 | # Classic style calculation 83 | (out <- countInteractions(pancreasSCE, 84 | group_by = "ImageNb", 85 | label = "CellType", 86 | method = "classic", 87 | colPairName = "knn_interaction_graph")) 88 | 89 | # Histocat style calculation 90 | (out <- countInteractions(pancreasSCE, 91 | group_by = "ImageNb", 92 | label = "CellType", 93 | method = "histocat", 94 | colPairName = "knn_interaction_graph")) 95 | 96 | # Patch style calculation 97 | (out <- countInteractions(pancreasSCE, 98 | group_by = "ImageNb", 99 | label = "CellType", 100 | method = "patch", 101 | patch_size = 3, 102 | colPairName = "knn_interaction_graph")) 103 | 104 | } 105 | \references{ 106 | \href{https://www.sciencedirect.com/science/article/pii/S2405471217305434}{ 107 | Schulz, D. et al., Simultaneous Multiplexed Imaging of mRNA and Proteins with 108 | Subcellular Resolution in Breast Cancer Tissue Samples by Mass Cytometry., 109 | Cell Systems 2018 6(1):25-36.e5} 110 | 111 | \href{https://www.nature.com/articles/nmeth.4391}{ 112 | Shapiro, D. et al., histoCAT: analysis of cell phenotypes and interactions in 113 | multiplex image cytometry data, Nature Methods 2017 14, p. 873–876} 114 | } 115 | \seealso{ 116 | \code{\link{testInteractions}} for testing cell-cell 117 | interactions per grouping level. 118 | } 119 | \author{ 120 | Vito Zanotelli 121 | 122 | Jana Fischer 123 | 124 | adapted by Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 125 | } 126 | -------------------------------------------------------------------------------- /man/detectCommunity.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/detectCommunity.R 3 | \name{detectCommunity} 4 | \alias{detectCommunity} 5 | \title{Detect the spatial community of each cell} 6 | \usage{ 7 | detectCommunity( 8 | object, 9 | colPairName, 10 | size_threshold = 0, 11 | group_by = NULL, 12 | name = "spatial_community", 13 | cluster_fun = "louvain", 14 | BPPARAM = SerialParam() 15 | ) 16 | } 17 | \arguments{ 18 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 19 | object} 20 | 21 | \item{colPairName}{single character indicating the \code{colPair(object)} 22 | entry containing the neighbor information.} 23 | 24 | \item{size_threshold}{single positive numeric that specifies the minimum 25 | number of cells per community. Defaults to 0.} 26 | 27 | \item{group_by}{single character indicating that spatial community 28 | detection will be performed separately for all unique entries to 29 | \code{colData(object)[,group_by]}.} 30 | 31 | \item{name}{single character specifying the name of the output saved in 32 | \code{colData(object)}. Defaults to "spatial_community".} 33 | 34 | \item{cluster_fun}{single character specifying the function to use for 35 | community detection. Options are all strings that contain the suffix of an 36 | \code{igraph} community detection algorithm (e.g. "walktrap"). 37 | Defaults to "louvain".} 38 | 39 | \item{BPPARAM}{a \code{\link[BiocParallel]{BiocParallelParam-class}} object 40 | defining how to parallelize computations. Applicable when \code{group_by} is 41 | specified and defaults to \code{SerialParam()}. 42 | For reproducibility between runs, we recommend defining \code{RNGseed} in the 43 | \code{\link[BiocParallel]{BiocParallelParam-class}} object.} 44 | } 45 | \value{ 46 | returns an object of \code{class(object)} containing a new column 47 | entry to \code{colData(object)[[name]]}. 48 | } 49 | \description{ 50 | Function to detect the spatial community of each cell as 51 | proposed by \href{https://www.nature.com/articles/s41586-019-1876-x}{ 52 | Jackson et al., The single-cell pathology landscape of breast cancer, Nature, 53 | 2020}. Each cell is clustered based on its interactions as defined by a 54 | spatial object graph. 55 | } 56 | \section{Spatial community detection procedure}{ 57 | 58 | 1. Create an igraph object from the edge list stored in 59 | \code{colPair(object, colPairName)}. 60 | 61 | 2. Perform community detection using the specified \code{cluster_fun} algorithm. 62 | 63 | 3. Store the community IDs in a vector and replace all communities with 64 | a size smaller than \code{size_threshold} by NA. 65 | 66 | Optional steps: Specify \code{group_by} to perform spatial community 67 | detection separately for all unique entries to \code{colData(object)[,group_by]} 68 | e.g. for tumor and non-tumor cells. 69 | } 70 | 71 | \examples{ 72 | library(cytomapper) 73 | library(BiocParallel) 74 | data(pancreasSCE) 75 | 76 | sce <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 77 | type = "expansion", 78 | name = "neighborhood", 79 | threshold = 20) 80 | 81 | ## Detect spatial community 82 | set.seed(22) 83 | sce <- detectCommunity(sce, 84 | colPairName = "neighborhood", 85 | size_threshold = 10) 86 | 87 | plotSpatial(sce, 88 | img_id = "ImageNb", 89 | node_color_by = "spatial_community", 90 | scales = "free") 91 | 92 | ## Detect spatial community - specify group_by 93 | sce <- detectCommunity(sce, 94 | colPairName = "neighborhood", 95 | group_by = "CellType", 96 | size_threshold = 10, 97 | BPPARAM = SerialParam(RNGseed = 22)) 98 | 99 | plotSpatial(sce, 100 | img_id = "ImageNb", 101 | node_color_by = "spatial_community", 102 | scales = "free") 103 | 104 | } 105 | \references{ 106 | \href{https://www.nature.com/articles/s41586-019-1876-x}{ 107 | Jackson et al., The single-cell pathology landscape of breast cancer, 108 | Nature, 2020} 109 | } 110 | \author{ 111 | Lasse Meyer (\email{lasse.meyer@uzh.ch}) 112 | } 113 | -------------------------------------------------------------------------------- /man/detectSpatialContext.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/detectSpatialContext.R 3 | \name{detectSpatialContext} 4 | \alias{detectSpatialContext} 5 | \title{Detect the spatial context of each cell based on its neighborhood} 6 | \usage{ 7 | detectSpatialContext( 8 | object, 9 | entry = "aggregatedNeighbors", 10 | threshold = 0.9, 11 | name = "spatial_context" 12 | ) 13 | } 14 | \arguments{ 15 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 16 | object} 17 | 18 | \item{entry}{single character specifying the \code{colData(object)} 19 | entry containing the \code{aggregateNeighbors} DataFrame output. 20 | Defaults to "aggregatedNeighbors".} 21 | 22 | \item{threshold}{single numeric between 0 and 1 that specifies the fraction 23 | threshold for SC assignment. Defaults to 0.9.} 24 | 25 | \item{name}{single character specifying the name of the output saved in 26 | \code{colData(object)}. Defaults to "spatial_context".} 27 | } 28 | \value{ 29 | returns an object of \code{class(object)} containing a new column 30 | entry to \code{colData(object)[[name]]} 31 | } 32 | \description{ 33 | Function to detect the spatial context (SC) of each cell. 34 | Based on its sorted (high-to-low) cellular neighborhood (CN) fractions in a 35 | spatial interaction graph, the SC of each cell is assigned as the set of CNs 36 | that cumulatively exceed a user-defined fraction threshold. 37 | 38 | The term was coined by \href{https://doi.org/10.1016/j.cels.2021.09.012}{ 39 | Bhate S. et al., Tissue schematics map the specialization of immune tissue 40 | motifs and their appropriation by tumors, Cell Systems, 2022} and describes 41 | tissue regions in which distinct CNs may be interacting. 42 | } 43 | \section{Spatial context background}{ 44 | 45 | The function relies on CN fractions for each cell in a 46 | spatial interaction graph (originally a k-nearest neighbor (KNN) graph). 47 | 48 | We can retrieve the CN fractions using the \link[imcRtools]{buildSpatialGraph} 49 | and \link[imcRtools]{aggregateNeighbors} functions. 50 | 51 | The window size (k for KNN) for \link[imcRtools]{buildSpatialGraph} should 52 | reflect a length scale on which biological signals can be exchanged and 53 | depends, among others, on cell density and tissue area. In view of their 54 | divergent functionality, we recommend to use a larger window size for SC 55 | (interaction between local processes) than for CN (local processes) detection. 56 | 57 | Subsequently, the CN fractions are sorted from high-to-low and the SC of 58 | each cell is assigned the minimal combination of SCs that additively 59 | surpass a user-defined threshold. The default threshold of 0.9 aims to 60 | represent the dominant CNs, hence the most prevalent signals, in a given window. 61 | 62 | For more details, please refer to: 63 | \href{https://doi.org/10.1016/j.cels.2021.09.012}{ Bhate S. et al., Tissue 64 | schematics map the specialization of immune tissue motifs and their 65 | appropriation by tumors, Cell Systems, 2022}. 66 | } 67 | 68 | \examples{ 69 | set.seed(22) 70 | library(cytomapper) 71 | data(pancreasSCE) 72 | 73 | ## 1. Cellular neighborhood (CN) 74 | sce <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 75 | type = "knn", 76 | name = "knn_cn_graph", 77 | k = 5) 78 | 79 | sce <- aggregateNeighbors(sce, colPairName = "knn_cn_graph", 80 | aggregate_by = "metadata", 81 | count_by = "CellType", 82 | name = "aggregatedCellTypes") 83 | 84 | cur_cluster <- kmeans(sce$aggregatedCellTypes, centers = 3) 85 | sce$cellular_neighborhood <- factor(cur_cluster$cluster) 86 | 87 | plotSpatial(sce, img_id = "ImageNb", 88 | colPairName = "knn_cn_graph", 89 | node_color_by = "cellular_neighborhood", 90 | scales = "free") 91 | 92 | ## 2. Spatial context (SC) 93 | sce <- buildSpatialGraph(sce, img_id = "ImageNb", 94 | type = "knn", 95 | name = "knn_sc_graph", 96 | k = 15) 97 | 98 | sce <- aggregateNeighbors(sce, colPairName = "knn_sc_graph", 99 | aggregate_by = "metadata", 100 | count_by = "cellular_neighborhood", 101 | name = "aggregatedNeighborhood") 102 | 103 | # Detect spatial context 104 | sce <- detectSpatialContext(sce, entry = "aggregatedNeighborhood", 105 | threshold = 0.9) 106 | 107 | plotSpatial(sce, img_id = "ImageNb", 108 | colPairName = "knn_sc_graph", 109 | node_color_by = "spatial_context", 110 | scales = "free") 111 | 112 | } 113 | \references{ 114 | \href{https://doi.org/10.1016/j.cels.2021.09.012}{ 115 | Bhate S. et al., Tissue schematics map the specialization of immune tissue 116 | motifs and their appropriation by tumors, Cell Systems, 2022} 117 | } 118 | \seealso{ 119 | \code{\link[imcRtools]{filterSpatialContext}} for the function to filter 120 | spatial contexts 121 | 122 | \code{\link[imcRtools]{plotSpatialContext}} for the function to plot 123 | spatial context graphs 124 | } 125 | \author{ 126 | Lasse Meyer (\email{lasse.meyer@uzh.ch}) 127 | } 128 | -------------------------------------------------------------------------------- /man/filterPixels.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/filterPixels.R 3 | \name{filterPixels} 4 | \alias{filterPixels} 5 | \title{Filter pixels based on their assigned masses} 6 | \usage{ 7 | filterPixels( 8 | object, 9 | bc_id = "bc_id", 10 | spot_mass = "sample_mass", 11 | minevents = 40, 12 | correct_pixels = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{object}{a \code{SingleCellExperiment} object containing pixel 17 | intensities per channel. Individual pixels are stored as columns and 18 | channels are stored as rows.} 19 | 20 | \item{bc_id}{character string indicating which \code{colData(object)} entry 21 | stores the estimated mass} 22 | 23 | \item{spot_mass}{character string indicating which \code{colData(object)} 24 | entry stores the true isotope mass of the spotted metal.} 25 | 26 | \item{minevents}{single numeric indicating the threshold under which pixel 27 | sets are excluded from spillover estimation.} 28 | 29 | \item{correct_pixels}{logical indicating if incorrectly assigned pixels 30 | should be excluded from spillover estimation.} 31 | } 32 | \value{ 33 | returns a SingleCellExperiment object in which 34 | \code{colData(object)$bc_id} has been adjusted based on the filter 35 | criteria. 36 | } 37 | \description{ 38 | Helper function for estimating the spillover matrix. After 39 | assigning each pixel to a spotted mass, this function will filter 40 | incorrectly assigned pixels and remove small pixel sets. 41 | } 42 | \examples{ 43 | path <- system.file("extdata/spillover", package = "imcRtools") 44 | sce <- readSCEfromTXT(path) 45 | assay(sce, "exprs") <- asinh(counts(sce)/5) 46 | 47 | # Pre-process via CATALYST 48 | library(CATALYST) 49 | 50 | bc_key <- as.numeric(unique(sce$sample_mass)) 51 | sce <- assignPrelim(sce, bc_key = bc_key) 52 | sce <- estCutoffs(sce) 53 | sce <- applyCutoffs(sce) 54 | 55 | sce <- filterPixels(sce) 56 | 57 | table(sce$sample_mass, sce$bc_id) 58 | 59 | } 60 | \author{ 61 | Vito Zanotelli, adapted by 62 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 63 | } 64 | -------------------------------------------------------------------------------- /man/filterSpatialContext.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/filterSpatialContext.R 3 | \name{filterSpatialContext} 4 | \alias{filterSpatialContext} 5 | \title{Filter spatial contexts} 6 | \usage{ 7 | filterSpatialContext( 8 | object, 9 | entry = "spatial_context", 10 | group_by = "sample_id", 11 | group_threshold = NULL, 12 | cells_threshold = NULL, 13 | name = "spatial_context_filtered" 14 | ) 15 | } 16 | \arguments{ 17 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 18 | object} 19 | 20 | \item{entry}{a single character specifying the \code{colData(object)} entry 21 | containing the \code{detectSpatialContext} output. Defaults to 22 | "spatial_context".} 23 | 24 | \item{group_by}{a single character indicating the \code{colData(object)} 25 | entry by which SCs are grouped. This is usually the image or patient ID. 26 | Defaults to "sample_id".} 27 | 28 | \item{group_threshold}{a single numeric specifying the minimum number of 29 | group entries in which a SC is detected.} 30 | 31 | \item{cells_threshold}{a single numeric specifying the minimum total number 32 | of cells in a SC.} 33 | 34 | \item{name}{a single character specifying the name of the output saved in 35 | \code{colData(object)}. Defaults to "spatial_context_filtered".} 36 | } 37 | \value{ 38 | returns an object of \code{class(object)} containing a new column 39 | entry to \code{colData(object)[[name]]} and a new \code{data.frame} entry to 40 | \code{metadata(object)[["filterSpatialContext"]]} containing the group and 41 | cell counts per SC. 42 | } 43 | \description{ 44 | Function to filter detected spatial contexts (SCs) based on a 45 | user-defined threshold for number of group entries and/or cells. 46 | } 47 | \examples{ 48 | set.seed(22) 49 | library(cytomapper) 50 | data(pancreasSCE) 51 | 52 | ## 1. Cellular neighborhood (CN) 53 | sce <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 54 | type = "knn", 55 | name = "knn_cn_graph", 56 | k = 5) 57 | 58 | sce <- aggregateNeighbors(sce, colPairName = "knn_cn_graph", 59 | aggregate_by = "metadata", 60 | count_by = "CellType", 61 | name = "aggregatedCellTypes") 62 | 63 | cur_cluster <- kmeans(sce$aggregatedCellTypes, centers = 3) 64 | sce$cellular_neighborhood <- factor(cur_cluster$cluster) 65 | 66 | plotSpatial(sce, img_id = "ImageNb", 67 | colPairName = "knn_cn_graph", 68 | node_color_by = "cellular_neighborhood", 69 | scales = "free") 70 | 71 | ## 2. Spatial context (SC) 72 | sce <- buildSpatialGraph(sce, img_id = "ImageNb", 73 | type = "knn", 74 | name = "knn_sc_graph", 75 | k = 15) 76 | 77 | sce <- aggregateNeighbors(sce, colPairName = "knn_sc_graph", 78 | aggregate_by = "metadata", 79 | count_by = "cellular_neighborhood", 80 | name = "aggregatedNeighborhood") 81 | 82 | # Detect spatial context 83 | sce <- detectSpatialContext(sce, entry = "aggregatedNeighborhood", 84 | threshold = 0.9) 85 | 86 | plotSpatial(sce, img_id = "ImageNb", 87 | colPairName = "knn_sc_graph", 88 | node_color_by = "spatial_context", 89 | scales = "free") 90 | 91 | # Filter spatial context 92 | # By group 93 | sce <- filterSpatialContext(sce, group_by = "ImageNb", 94 | group_threshold = 2) 95 | 96 | plotSpatial(sce, img_id = "ImageNb", 97 | colPairName = "knn_sc_graph", 98 | node_color_by = "spatial_context_filtered", 99 | scales = "free") 100 | 101 | # By cells 102 | sce <- filterSpatialContext(sce, group_by = "ImageNb", 103 | cells_threshold = 15) 104 | 105 | plotSpatial(sce, img_id = "ImageNb", 106 | colPairName = "knn_sc_graph", 107 | node_color_by = "spatial_context_filtered", 108 | scales = "free") 109 | 110 | } 111 | \references{ 112 | \href{https://doi.org/10.1016/j.cels.2021.09.012}{ 113 | Bhate S. et al., Tissue schematics map the specialization of immune tissue 114 | motifs and their appropriation by tumors, Cell Systems, 2022} 115 | } 116 | \seealso{ 117 | \code{\link[imcRtools]{detectSpatialContext}} for the function to detect 118 | spatial contexts 119 | 120 | \code{\link[imcRtools]{plotSpatialContext}} for the function to plot 121 | spatial context graphs 122 | } 123 | \author{ 124 | Lasse Meyer (\email{lasse.meyer@uzh.ch}) 125 | } 126 | -------------------------------------------------------------------------------- /man/findBorderCells.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/findBorderCells.R 3 | \name{findBorderCells} 4 | \alias{findBorderCells} 5 | \title{Find cells at the image border} 6 | \usage{ 7 | findBorderCells(object, img_id, border_dist, coords = c("Pos_X", "Pos_Y")) 8 | } 9 | \arguments{ 10 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 11 | object.} 12 | 13 | \item{img_id}{single character indicating the \code{colData(object)} entry 14 | containing the unique image identifiers.} 15 | 16 | \item{border_dist}{single numeric defining the distance to the image border. 17 | The image border here is defined as the minimum and maximum among the 18 | cells' x and y location.} 19 | 20 | \item{coords}{character vector of length 2 specifying the names of the 21 | \code{colData} (for a \code{SingleCellExperiment} object) or the 22 | \code{spatialCoords} entries indicating the cells' x and y locations.} 23 | } 24 | \value{ 25 | an object of \code{class(object)} containing the logical 26 | \code{border_cells} entry in the \code{colData} slot. 27 | } 28 | \description{ 29 | Detection of cells close to the image border for subsequent exclusion from 30 | downstream analyses. 31 | } 32 | \examples{ 33 | library(cytomapper) 34 | data("pancreasSCE") 35 | 36 | sce <- findBorderCells(pancreasSCE, img_id = "ImageNb", 37 | border_dist = 10) 38 | 39 | plotSpatial(sce, 40 | img_id = "ImageNb", 41 | node_color_by = "border_cells", 42 | scales = "free") 43 | 44 | } 45 | -------------------------------------------------------------------------------- /man/minDistToCells.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/minDistToCells.R 3 | \name{minDistToCells} 4 | \alias{minDistToCells} 5 | \title{Function to calculate minimal distance to cells of interest} 6 | \usage{ 7 | minDistToCells( 8 | object, 9 | x_cells, 10 | img_id, 11 | name = "distToCells", 12 | coords = c("Pos_X", "Pos_Y"), 13 | return_neg = TRUE, 14 | BPPARAM = SerialParam() 15 | ) 16 | } 17 | \arguments{ 18 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 19 | object} 20 | 21 | \item{x_cells}{logical vector of length equal to the number of cells 22 | contained in \code{object}. \code{TRUE} entries define the cells to which 23 | distances will be calculated.} 24 | 25 | \item{img_id}{single character indicating the \code{colData(object)} entry 26 | containing the unique image identifiers.} 27 | 28 | \item{name}{character specifying the name of the \code{colData} entry to safe 29 | the distances in.} 30 | 31 | \item{coords}{character vector of length 2 specifying the names of the 32 | \code{colData} (for a \code{SingleCellExperiment} object) or the 33 | \code{spatialCoords} entries of the cells' x and y locations.} 34 | 35 | \item{return_neg}{logical indicating whether negative distances are to be 36 | returned for the distances of patched/spatially clustered cells.} 37 | 38 | \item{BPPARAM}{a \code{\link[BiocParallel]{BiocParallelParam-class}} object 39 | defining how to parallelize computations.} 40 | } 41 | \value{ 42 | returns an object of \code{class(object)} containing a new column 43 | entry to \code{colData(object)[[name]]}. Cells in the object are grouped 44 | by entries in \code{img_id}. 45 | } 46 | \description{ 47 | Function to return the distance of the closest cell of interest 48 | for each cell in the data. In the case of patched/clustered cells negative 49 | distances are returned by default which indicate the distance of the cells 50 | of interest to the closest cell that is not of the type of cells of 51 | interest. 52 | } 53 | \section{Ordering of the output object}{ 54 | 55 | The \code{minDistToCells} function operates on individual images. 56 | Therefore the returned object is grouped by entries in \code{img_id}. 57 | This means all cells of a given image are grouped together in the object. 58 | The ordering of cells within each individual image is the same as the ordering 59 | of these cells in the input object. 60 | } 61 | 62 | \examples{ 63 | library(cytomapper) 64 | data(pancreasSCE) 65 | 66 | # Build interaction graph 67 | pancreasSCE <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 68 | type = "expansion",threshold = 20) 69 | 70 | # Detect patches of "celltype_B" cells 71 | pancreasSCE <- patchDetection(pancreasSCE, 72 | img_id = "ImageNb", 73 | patch_cells = pancreasSCE$CellType == "celltype_B", 74 | colPairName = "expansion_interaction_graph", 75 | min_patch_size = 20, 76 | expand_by = 1) 77 | 78 | plotSpatial(pancreasSCE, 79 | img_id = "ImageNb", 80 | node_color_by = "patch_id", 81 | scales = "free") 82 | 83 | # Distance to celltype_B patches 84 | pancreasSCE <- minDistToCells(pancreasSCE, 85 | x_cells = !is.na(pancreasSCE$patch_id), 86 | coords = c("Pos_X","Pos_Y"), 87 | img_id = "ImageNb") 88 | 89 | plotSpatial(pancreasSCE, 90 | img_id = "ImageNb", 91 | node_color_by = "distToCells", 92 | scales = "free") 93 | 94 | } 95 | \author{ 96 | Daniel Schulz (\email{daniel.schulz@uzh.ch}) 97 | } 98 | -------------------------------------------------------------------------------- /man/patchSize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/patchSize.R 3 | \name{patchSize} 4 | \alias{patchSize} 5 | \title{Function to compute the area of c3ll patches} 6 | \usage{ 7 | patchSize( 8 | object, 9 | patch_name = "patch_id", 10 | coords = c("Pos_X", "Pos_Y"), 11 | convex = FALSE 12 | ) 13 | } 14 | \arguments{ 15 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 16 | object} 17 | 18 | \item{patch_name}{single character indicating the \code{colData(object)} entry 19 | containing the patch cell identifiers.} 20 | 21 | \item{coords}{character vector of length 2 specifying the names of the 22 | \code{colData} (for a \code{SingleCellExperiment} object) or the 23 | \code{spatialCoords} entries of the cells' x and y locations.} 24 | 25 | \item{convex}{should the convex hull be computed to construct the polygon? 26 | Default: the concave hull is computed.} 27 | } 28 | \value{ 29 | A DataFrame object containing the patch identifier, the constructed 30 | polygon and the polygon size. 31 | } 32 | \description{ 33 | This function constructs polygons around patch cells and 34 | computes their area. 35 | } 36 | \examples{ 37 | library(cytomapper) 38 | data(pancreasSCE) 39 | 40 | # Build interaction graph 41 | pancreasSCE <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 42 | type = "expansion", threshold = 20) 43 | 44 | # Detect patches of "celltype_B" cells 45 | pancreasSCE <- patchDetection(pancreasSCE, 46 | patch_cells = pancreasSCE$CellType == "celltype_B", 47 | expand_by = 5, img_id = "ImageNb", 48 | colPairName = "expansion_interaction_graph") 49 | 50 | # Compute the patch area 51 | patchSize(pancreasSCE) 52 | 53 | } 54 | \author{ 55 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 56 | } 57 | -------------------------------------------------------------------------------- /man/plotSpatialContext.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plotSpatialContext.R 3 | \name{plotSpatialContext} 4 | \alias{plotSpatialContext} 5 | \title{Plot spatial context graph} 6 | \usage{ 7 | plotSpatialContext( 8 | object, 9 | entry = "spatial_context", 10 | group_by = "sample_id", 11 | node_color_by = NULL, 12 | node_size_by = NULL, 13 | node_color_fix = NULL, 14 | node_size_fix = NULL, 15 | node_label_repel = TRUE, 16 | node_label_color_by = NULL, 17 | node_label_color_fix = NULL, 18 | draw_edges = TRUE, 19 | edge_color_fix = NULL, 20 | return_data = FALSE 21 | ) 22 | } 23 | \arguments{ 24 | \item{object}{a \code{SingleCellExperiment} or \code{SpatialExperiment} 25 | object.} 26 | 27 | \item{entry}{single character specifying the \code{colData(object)} entry 28 | containing the \code{\link[imcRtools]{detectSpatialContext}} output. 29 | Defaults to "spatial_context".} 30 | 31 | \item{group_by}{a single character indicating the \code{colData(object)} 32 | entry by which SCs are grouped. This is usually the image or patient ID. 33 | Defaults to "sample_id".} 34 | 35 | \item{node_color_by}{single character either 36 | \code{NULL, "name","n_cells", "n_group"} by which the nodes should be 37 | colored.} 38 | 39 | \item{node_size_by}{single character either \code{NULL, "n_cells","n_group"} 40 | by which the size of the nodes are defined.} 41 | 42 | \item{node_color_fix}{single character specifying the color of all nodes.} 43 | 44 | \item{node_size_fix}{single numeric specifying the size of all nodes.} 45 | 46 | \item{node_label_repel}{should nodes be labelled? Defaults to TRUE.} 47 | 48 | \item{node_label_color_by}{single character either 49 | \code{NULL, "name","n_cells","n_group"} by which the node labels should be 50 | colored.} 51 | 52 | \item{node_label_color_fix}{single character specifying the color of all node 53 | labels.} 54 | 55 | \item{draw_edges}{should edges be drawn between nodes? Defaults to TRUE.} 56 | 57 | \item{edge_color_fix}{single character specifying the color of all edges.} 58 | 59 | \item{return_data}{should the edge list and vertex metadata for graph 60 | construction be returned as a \code{list} of two \code{data.frames}?} 61 | } 62 | \value{ 63 | returns a \code{ggplot} object or a \code{list} of two 64 | \code{data.frames}. 65 | } 66 | \description{ 67 | Function to plot directed spatial context graphs based on 68 | symbolic edge-lists and vertex metadata, which operates on the cohort-level. 69 | The user can specify node, node_label and edge aesthetics. 70 | } 71 | \examples{ 72 | set.seed(22) 73 | library(cytomapper) 74 | data(pancreasSCE) 75 | 76 | ## 1. Cellular neighborhood (CN) 77 | sce <- buildSpatialGraph(pancreasSCE, img_id = "ImageNb", 78 | type = "knn", 79 | name = "knn_cn_graph", 80 | k = 5) 81 | 82 | sce <- aggregateNeighbors(sce, colPairName = "knn_cn_graph", 83 | aggregate_by = "metadata", 84 | count_by = "CellType", 85 | name = "aggregatedCellTypes") 86 | 87 | cur_cluster <- kmeans(sce$aggregatedCellTypes, centers = 3) 88 | sce$cellular_neighborhood <- factor(cur_cluster$cluster) 89 | 90 | plotSpatial(sce, img_id = "ImageNb", 91 | colPairName = "knn_cn_graph", 92 | node_color_by = "cellular_neighborhood", 93 | scales = "free") 94 | 95 | ## 2. Spatial context (SC) 96 | sce <- buildSpatialGraph(sce, img_id = "ImageNb", 97 | type = "knn", 98 | name = "knn_sc_graph", 99 | k = 15) 100 | 101 | sce <- aggregateNeighbors(sce, colPairName = "knn_sc_graph", 102 | aggregate_by = "metadata", 103 | count_by = "cellular_neighborhood", 104 | name = "aggregatedNeighborhood") 105 | 106 | # Detect spatial context 107 | sce <- detectSpatialContext(sce, entry = "aggregatedNeighborhood", 108 | threshold = 0.9) 109 | 110 | plotSpatial(sce, img_id = "ImageNb", 111 | colPairName = "knn_sc_graph", 112 | node_color_by = "spatial_context", 113 | scales = "free") 114 | 115 | # Plot spatial context - default 116 | plotSpatialContext(sce, group_by = "ImageNb") 117 | 118 | # Plot spatial context - adjust aesthetics 119 | plotSpatialContext(sce, group_by = "ImageNb", 120 | node_color_by = "name", 121 | node_size_by = "n_cells", 122 | node_label_color_by = "name") 123 | 124 | plotSpatialContext(sce, group_by = "ImageNb", 125 | node_color_by = "n_cells", 126 | node_size_by = "n_group") 127 | 128 | # Plot spatial context - return data 129 | plotSpatialContext(sce, group_by = "ImageNb", 130 | return_data = TRUE) 131 | 132 | } 133 | \references{ 134 | \href{https://doi.org/10.1016/j.cels.2021.09.012}{ 135 | Bhate S. et al., Tissue schematics map the specialization of immune tissue 136 | motifs and their appropriation by tumors, Cell Systems, 2022} 137 | } 138 | \seealso{ 139 | \code{\link[imcRtools]{detectSpatialContext}} for the function to detect 140 | spatial contexts 141 | 142 | \code{\link[imcRtools]{filterSpatialContext}} for the function to filter 143 | spatial contexts 144 | } 145 | \author{ 146 | Lasse Meyer (\email{lasse.meyer@uzh.ch}) 147 | } 148 | -------------------------------------------------------------------------------- /man/plotSpotHeatmap.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plotSpotHeatmap.R 3 | \name{plotSpotHeatmap} 4 | \alias{plotSpotHeatmap} 5 | \title{Summarizes and visualizes the pixel intensities per spot and channel} 6 | \usage{ 7 | plotSpotHeatmap( 8 | object, 9 | spot_id = "sample_id", 10 | channel_id = "channel_name", 11 | assay_type = "counts", 12 | statistic = "median", 13 | log = TRUE, 14 | threshold = NULL, 15 | order_metals = TRUE, 16 | color = viridis(100), 17 | breaks = NA, 18 | legend_breaks = NA, 19 | cluster_cols = FALSE, 20 | cluster_rows = FALSE, 21 | ... 22 | ) 23 | } 24 | \arguments{ 25 | \item{object}{a \code{SingleCellExperiment} object containing pixel 26 | intensities per channel. Individual pixels are stored as columns and 27 | channels are stored as rows.} 28 | 29 | \item{spot_id}{character string indicating which \code{colData(object)} entry 30 | stores the isotope names of the spotted metal. Entries should be of the 31 | form (mt)(mass) (e.g. Sm152 for Samarium isotope with the atomic mass 152).} 32 | 33 | \item{channel_id}{character string indicating which \code{rowData(object)} 34 | entry contains the isotope names of the acquired channels.} 35 | 36 | \item{assay_type}{character string indicating which assay to use (default 37 | \code{counts}).} 38 | 39 | \item{statistic}{the statistic to use when aggregating channels per spot 40 | (default \code{median})} 41 | 42 | \item{log}{should the aggregated pixel intensities be \code{log10(x + 1)} 43 | transformed?} 44 | 45 | \item{threshold}{single numeric indicating a threshold after pixel 46 | aggregation. All aggregated values larger than \code{threshold} will be 47 | labeled as \code{1}.} 48 | 49 | \item{order_metals}{should the metals be ordered based on spotted mass?} 50 | 51 | \item{color}{see parameter in \code{\link[pheatmap]{pheatmap}}} 52 | 53 | \item{breaks}{see parameter in \code{\link[pheatmap]{pheatmap}}} 54 | 55 | \item{legend_breaks}{see parameter in \code{\link[pheatmap]{pheatmap}}} 56 | 57 | \item{cluster_cols}{see parameter in \code{\link[pheatmap]{pheatmap}}} 58 | 59 | \item{cluster_rows}{see parameter in \code{\link[pheatmap]{pheatmap}}} 60 | 61 | \item{...}{other arguments passed to \code{pheatmap}.} 62 | } 63 | \value{ 64 | a \code{\link[pheatmap]{pheatmap}} object 65 | } 66 | \description{ 67 | Helper function for estimating the spillover matrix. This 68 | function visualizes the median pixel intensities per spot (rows) and per 69 | channel (columns) in form of a heatmap. 70 | } 71 | \section{Quality control for spillover estimation}{ 72 | 73 | Visualizing the aggregated pixel intensities serves two purposes: 74 | 75 | \enumerate{ 76 | \item Small median pixel intensities (< 200 counts) might hinder the robust 77 | estimation of the channel spillover. In that case, consecutive pixels can be 78 | summed (see \code{\link{binAcrossPixels}}). 79 | \item Each spotted metal (row) should show the highest median pixel intensity 80 | in its corresponding channel (column). If this is not the case, either the 81 | naming of the .txt files was incorrect or the incorrect metal was spotted. 82 | } 83 | 84 | By setting the \code{threshold} parameter, the user can easily identify spots 85 | where pixel intensities are too low for robust spillover estimation. 86 | } 87 | 88 | \examples{ 89 | path <- system.file("extdata/spillover", package = "imcRtools") 90 | # Read in .txt files 91 | sce <- readSCEfromTXT(path) 92 | 93 | # Visualizes heatmap 94 | plotSpotHeatmap(sce) 95 | 96 | # Visualizes thresholding results 97 | plotSpotHeatmap(sce, log = FALSE, threshold = 200) 98 | 99 | } 100 | \seealso{ 101 | \code{\link[pheatmap]{pheatmap}} for visual modifications 102 | 103 | \code{\link[scuttle]{aggregateAcrossCells}} for the aggregation 104 | function 105 | } 106 | \author{ 107 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 108 | } 109 | -------------------------------------------------------------------------------- /man/readImagefromTXT.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/readImagefromTXT.R 3 | \name{readImagefromTXT} 4 | \alias{readImagefromTXT} 5 | \title{Reads one or multiple .txt files into a CytoImageList object} 6 | \usage{ 7 | readImagefromTXT( 8 | path, 9 | pattern = ".txt$", 10 | channel_pattern = "[A-Za-z]{1,2}[0-9]{2,3}Di", 11 | index_names = c("X", "Y"), 12 | BPPARAM = SerialParam() 13 | ) 14 | } 15 | \arguments{ 16 | \item{path}{Full path to where the individual .txt files are located. This is 17 | usualy the path where the .mcd file is located.} 18 | 19 | \item{pattern}{pattern to select which files should be read in (default 20 | \code{".txt$"}).} 21 | 22 | \item{channel_pattern}{regular expression to select the channel names from 23 | the files.} 24 | 25 | \item{index_names}{exact names of the columns storing the x and y coordinates 26 | of the image} 27 | 28 | \item{BPPARAM}{parameters for parallelized reading in of images. 29 | This is only recommended for very large images.} 30 | } 31 | \value{ 32 | returns a \code{\linkS4class{CytoImageList}} object containing one 33 | \code{\linkS4class{Image}} object per .txt file. 34 | } 35 | \description{ 36 | Reader function to generate \code{\linkS4class{Image}} objects 37 | in form of a \code{\linkS4class{CytoImageList}} container from .txt files. 38 | } 39 | \section{Imaging mass cytometry .txt files}{ 40 | 41 | As part of the raw data folder, the Hyperion imaging system writes out 42 | one .txt file per acquisition. These files store the ion counts per 43 | pixel and channel. 44 | 45 | This function reads these .txt files into a single 46 | \code{\linkS4class{CytoImageList}} object for downstream analysis. The 47 | \code{pattern} argument allows selection of all .txt files or a specific 48 | subset of files. The \code{\link[cytomapper]{channelNames}} of the 49 | \code{CytoImageList} object are determined by the \code{channel_pattern} 50 | argument. 51 | } 52 | 53 | \examples{ 54 | path <- system.file("extdata/mockData/raw", package = "imcRtools") 55 | 56 | # Read in all images 57 | x <- readImagefromTXT(path) 58 | x 59 | 60 | # Read in specific files 61 | y <- readImagefromTXT(path, pattern = "ROI_002") 62 | y 63 | 64 | # Read in other channelNames 65 | z <- readImagefromTXT(path, channel_pattern = "[A-Za-z]{2}[0-9]{3}") 66 | z 67 | 68 | } 69 | \seealso{ 70 | \code{\linkS4class{CytoImageList}} for the container 71 | 72 | \code{\link[BiocParallel]{MulticoreParam}} for parallelized processing 73 | 74 | \code{\linkS4class{Image}} for the multi-channel image object 75 | 76 | \code{vignette("cytomapper")} for visualization of multi-channel images 77 | } 78 | \author{ 79 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 80 | } 81 | -------------------------------------------------------------------------------- /man/readSCEfromTXT.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/readSCEfromTXT.R 3 | \name{readSCEfromTXT} 4 | \alias{readSCEfromTXT} 5 | \title{Generates a SingleCellExperiment from .txt files} 6 | \usage{ 7 | readSCEfromTXT( 8 | x, 9 | pattern = ".txt$", 10 | metadata_cols = c("Start_push", "End_push", "Pushes_duration", "X", "Y", "Z"), 11 | verbose = TRUE, 12 | read_metal_from_filename = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{x}{input can be of different types: 17 | \describe{ 18 | \item{A path}{Full path to where the single stain .txt files are located.} 19 | \item{A list object}{A named list object where each entry is a 20 | \code{data.frame} or coercible to one. The names of each entry indicate the 21 | spotted metals (see details).} 22 | }} 23 | 24 | \item{pattern}{pattern to select which files should be read in (default 25 | \code{".txt$"}). Only used when \code{x} is a path.} 26 | 27 | \item{metadata_cols}{character vector indicating which column entries of the 28 | .txt files should be saved in the \code{colData(sce)} slot.} 29 | 30 | \item{verbose}{logical indicating if additional information regarding the 31 | spotted and acquired masses should be shown.} 32 | 33 | \item{read_metal_from_filename}{should the sample metal and mass be extracted 34 | from the file/object names?} 35 | } 36 | \value{ 37 | returns a SCE object where pixels are stored as columns and acquired 38 | channels are stored as rows. 39 | } 40 | \description{ 41 | Helper function to process raw .txt files acquired by the 42 | Hyperion imaging system into a \code{\linkS4class{SingleCellExperiment}} 43 | object. This function is mainly used to read-in data generated from a 44 | "spillover slide". Here, each .txt file contains the measurements of 45 | multiple pixels for a single stain across all open channels. 46 | } 47 | \section{Reading in .txt files for spillover correction}{ 48 | 49 | 50 | As described in the original publication, single metal spots are acquired 51 | using the Hyperion imaging system. Each acquisition corresponds to one spot. 52 | All acquisitions are stored in a single .mcd file and individual acquisitions 53 | are stored in single .txt files. 54 | 55 | This function aggregates these measurements into a single 56 | \code{SingleCellExperiment} object. For this, two inputs are possible: 57 | 58 | \enumerate{ 59 | \item \code{x} is a path: 60 | By default all .txt files are read in from the specified path. Here, the path 61 | should indicate the location of the spillover slide measurement. The file 62 | names of the .txt file must contain the spotted metal isotope name in the 63 | format \code{(mt)(mass)} (e.g. \code{Sm152} for Samarium isotope with the 64 | atomic mass 152). Internally, the last occurrence of such a pattern is read 65 | in as the metal isotope name and stored in the \code{colData(sce)$sample_id} 66 | slot. 67 | 68 | \item \code{x} is a named list: 69 | If there are issues with reading in the metal isotope names from the .txt 70 | file names, the user can provide a list for which each entry contains the 71 | contents of a single .txt file. The names of the list must indicate the 72 | spotted metal in the format \code{(mt)(mass)}. These names will be stored in 73 | the \code{colData(sce)$sample_id} slot. 74 | } 75 | 76 | When \code{read_metal_from_filename = FALSE}, the function will not attempt 77 | to read in the spotted metal isotopes from the file or list names. Therefore, 78 | only the \code{sample_id} will be set based on the file/list names. 79 | } 80 | 81 | \examples{ 82 | # Read files from path 83 | path <- system.file("extdata/spillover", package = "imcRtools") 84 | 85 | sce <- readSCEfromTXT(path) 86 | sce 87 | 88 | # Read files as list 89 | cur_file_names <- list.files(path, pattern = ".txt", full.names = TRUE) 90 | cur_files <- lapply(cur_file_names, read.delim) 91 | names(cur_files) <- sub(".txt", "", basename(cur_file_names)) 92 | 93 | sce <- readSCEfromTXT(cur_files) 94 | sce 95 | 96 | } 97 | \references{ 98 | \href{https://www.sciencedirect.com/science/article/pii/S1550413118306910}{Chevrier, 99 | S. et al. 2017. “Compensation of Signal Spillover in Suspension and Imaging 100 | Mass Cytometry.” Cell Systems 6: 612–20.} 101 | } 102 | \author{ 103 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 104 | } 105 | -------------------------------------------------------------------------------- /man/read_steinbock.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/read_steinbock.R 3 | \name{read_steinbock} 4 | \alias{read_steinbock} 5 | \title{Reads in single-cell data generated by the steinbock pipeline} 6 | \usage{ 7 | read_steinbock( 8 | path, 9 | intensities_folder = "intensities", 10 | regionprops_folder = "regionprops", 11 | graphs_folder = "neighbors", 12 | pattern = NULL, 13 | extract_cellid_from = "Object", 14 | extract_coords_from = c("centroid-1", "centroid-0"), 15 | image_file = "images.csv", 16 | extract_imagemetadata_from = c("width_px", "height_px"), 17 | panel_file = "panel.csv", 18 | extract_names_from = "name", 19 | return_as = c("spe", "sce"), 20 | BPPARAM = SerialParam() 21 | ) 22 | } 23 | \arguments{ 24 | \item{path}{full path to the steinbock output folder} 25 | 26 | \item{intensities_folder}{name of the folder containing the intensity 27 | measurements per image} 28 | 29 | \item{regionprops_folder}{name of the folder containing the cell-specific 30 | morphology and spatial measurements per image. Can be set to \code{NULL} to 31 | exclude reading in morphology measures.} 32 | 33 | \item{graphs_folder}{name of the folder containing the spatial connectivity 34 | graphs per image. Can be set to \code{NULL} to exclude reading in graphs.} 35 | 36 | \item{pattern}{regular expression specifying a subset of files that should 37 | be read in.} 38 | 39 | \item{extract_cellid_from}{single character indicating which column entry in 40 | the intensity files contains the integer cell id.} 41 | 42 | \item{extract_coords_from}{character vector indicating which column entries 43 | in the regionprops files contain the x (first entry) and y (second entry) 44 | coordinates.} 45 | 46 | \item{image_file}{single character indicating the file name storing meta data 47 | per image (can be \code{NULL}).} 48 | 49 | \item{extract_imagemetadata_from}{character vector indicating which 50 | additional image specific metadata to extract from the \code{image_file}. 51 | These will be stored in the \code{colData(x)} slot as object/cell-specific 52 | entries.} 53 | 54 | \item{panel_file}{single character containing the name of the panel file. 55 | This can either be inside the steinbock path (recommended) or located 56 | somewhere else.} 57 | 58 | \item{extract_names_from}{single character indicating the column of the panel 59 | file containing the channel names.} 60 | 61 | \item{return_as}{should the object be returned as 62 | \code{\linkS4class{SpatialExperiment}} (\code{return_as = "spe"}) or 63 | \code{\linkS4class{SingleCellExperiment}} (\code{return_as = "sce"}).} 64 | 65 | \item{BPPARAM}{parameters for parallelised processing.} 66 | } 67 | \value{ 68 | returns a \code{SpatialExperiment} or \code{SingleCellExperiment} 69 | object markers in rows and cells in columns. 70 | } 71 | \description{ 72 | Reader function to generate a 73 | \code{\linkS4class{SpatialExperiment}} or 74 | \code{\linkS4class{SingleCellExperiment}} object from single-cell data 75 | obtained by the 76 | \href{https://github.com/BodenmillerGroup/steinbock}{steinbock} 77 | pipeline. 78 | } 79 | \section{The returned data container}{ 80 | 81 | In the case of both containers \code{x}, intensity features are stored in 82 | the \code{counts(x)} slot. Morphological features are stored in the 83 | \code{colData(x)} slot. The graphs are stored as 84 | \code{\link[S4Vectors]{SelfHits}} object in the 85 | \code{colPair(x, "neighborhood")} slot. 86 | 87 | In the case of a returned \code{SpatialExperiment} object, the cell 88 | coordinates are stored in the \code{spatialCoords(x)} slot. 89 | 90 | In the case of a returned \code{SingleCellExperiment} object, the cell 91 | coordinates are stored in the \code{colData(x)} slot named as \code{Pos_X} 92 | and \code{Pos_Y}. 93 | } 94 | 95 | \examples{ 96 | path <- system.file("extdata/mockData/steinbock", package = "imcRtools") 97 | 98 | # Read in as SpatialExperiment object 99 | x <- read_steinbock(path) 100 | x 101 | 102 | # Read in as SingleCellExperiment object 103 | x <- read_steinbock(path, return_as = "sce") 104 | x 105 | 106 | # Read in a subset of files 107 | x <- read_steinbock(path, pattern = "mockData1") 108 | x 109 | 110 | # Only read in intensities 111 | x <- read_steinbock(path, graphs_folder = NULL, regionprops_folder = NULL) 112 | x 113 | 114 | # Parallelisation 115 | x <- read_steinbock(path, BPPARAM = BiocParallel::bpparam()) 116 | 117 | } 118 | \seealso{ 119 | \url{https://github.com/BodenmillerGroup/steinbock} for the pipeline 120 | 121 | \code{\link{read_cpout}} for reading in single-cell data as produced by the 122 | ImcSegmentationPipeline 123 | 124 | \code{\link[SingleCellExperiment]{SingleCellExperiment}} and 125 | \code{\link[SpatialExperiment]{SpatialExperiment}} for the constructor 126 | functions. 127 | 128 | \code{\link[SingleCellExperiment]{colPair}} for information on how to work 129 | with the cell-cell interaction graphs 130 | 131 | \code{\link[BiocParallel]{bpparam}} for the parallelised backend 132 | } 133 | \author{ 134 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 135 | } 136 | -------------------------------------------------------------------------------- /man/show_cpout_features.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/show_cpout_features.R 3 | \name{show_cpout_features} 4 | \alias{show_cpout_features} 5 | \title{Display all features measured by CellProfiler.} 6 | \usage{ 7 | show_cpout_features( 8 | path, 9 | display = c("cell_features", "image_features"), 10 | cell_features = "var_cell.csv", 11 | image_features = "var_Image.csv" 12 | ) 13 | } 14 | \arguments{ 15 | \item{path}{full path to the CellProfiler output folder} 16 | 17 | \item{display}{single character indicating which features to display. 18 | Accepted entries are \code{cell_features} to display extracted single-cell 19 | features or \code{image_features} to display extracted image-level features.} 20 | 21 | \item{cell_features}{single character indicating the name of the file storing 22 | the extracted cell features.} 23 | 24 | \item{image_features}{single character indicating the name of the file 25 | storing the extracted image features.} 26 | } 27 | \value{ 28 | a \code{\link[DT]{datatable}} object 29 | } 30 | \description{ 31 | Searchable datatable object of cell and image features as 32 | extracted by CellProfiler. 33 | } 34 | \examples{ 35 | path <- system.file("extdata/mockData/cpout", package = "imcRtools") 36 | 37 | # Display cell features 38 | show_cpout_features(path) 39 | 40 | # Display image features 41 | show_cpout_features(path, display = "image_features") 42 | 43 | } 44 | \seealso{ 45 | \code{\link{read_cpout}} for the CellProfiler reader function 46 | } 47 | \author{ 48 | Nils Eling (\email{nils.eling@dqbm.uzh.ch}) 49 | } 50 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(imcRtools) 3 | 4 | test_check("imcRtools") 5 | -------------------------------------------------------------------------------- /tests/testthat/test_readImagefromTXT.R: -------------------------------------------------------------------------------- 1 | test_that("readImagefromTXT function works.", { 2 | path <- system.file("extdata/mockData/raw", package = "imcRtools") 3 | 4 | # Works 5 | expect_silent(cur_cil <- readImagefromTXT(path)) 6 | 7 | expect_s4_class(cur_cil, "CytoImageList") 8 | expect_equal(length(cur_cil), 3) 9 | expect_equal(channelNames(cur_cil), c("Ag107Di", "Pr141Di", "Sm147Di", "Eu153Di", "Yb172Di")) 10 | expect_equal(names(cur_cil), c("20210305_NE_mockData2_ROI_001_1", 11 | "20210305_NE_mockData2_ROI_002_2", 12 | "20210305_NE_mockData2_ROI_003_3")) 13 | 14 | # Test for numerical correctness 15 | cur_tiff <- system.file("extdata/mockData/tiffs/20210305_NE_mockData2_s0_a1_ac_fullFiltered.tiff", package = "imcRtools") 16 | test_cil <- cytomapper::loadImages(cur_tiff, as.is = TRUE) 17 | 18 | expect_equal(dim(cur_cil[[1]]), dim(test_cil[[1]])) 19 | test_1 <- floor(as.array(cur_cil[[1]][,,1])) 20 | dimnames(test_1) <- NULL 21 | test_2 <- as.array(test_cil[[1]][,,1]) 22 | expect_equal(test_1, 23 | test_2) 24 | 25 | test_1 <- floor(as.array(cur_cil[[1]][,,2])) 26 | dimnames(test_1) <- NULL 27 | test_2 <- as.array(test_cil[[1]][,,2]) 28 | expect_equal(test_1, 29 | test_2) 30 | 31 | test_1 <- floor(as.array(cur_cil[[1]][,,2])) 32 | dimnames(test_1) <- NULL 33 | test_2 <- as.array(test_cil[[1]][,,2]) 34 | expect_equal(test_1, 35 | test_2) 36 | 37 | test_1 <- floor(as.array(cur_cil[[1]][,,2])) 38 | dimnames(test_1) <- NULL 39 | test_2 <- as.array(test_cil[[1]][,,2]) 40 | expect_equal(test_1, 41 | test_2) 42 | 43 | test_1 <- floor(as.array(cur_cil[[1]][,,2])) 44 | dimnames(test_1) <- NULL 45 | test_2 <- as.array(test_cil[[1]][,,2]) 46 | expect_equal(test_1, 47 | test_2) 48 | 49 | # Read in individual files 50 | expect_silent(cur_cil <- readImagefromTXT(path, pattern = "ROI_002")) 51 | expect_equal(length(cur_cil), 1) 52 | expect_equal(channelNames(cur_cil), c("Ag107Di", "Pr141Di", "Sm147Di", "Eu153Di", "Yb172Di")) 53 | expect_equal(names(cur_cil), c("20210305_NE_mockData2_ROI_002_2")) 54 | 55 | # Read in different channelNames 56 | expect_silent(cur_cil <- readImagefromTXT(path, channel_pattern = "[A-Za-z]{2}[0-9]{3}")) 57 | expect_equal(length(cur_cil), 3) 58 | expect_equal(channelNames(cur_cil), c("Ag107", "Pr141", "Sm147", "Eu153", "Yb172")) 59 | expect_equal(names(cur_cil), c("20210305_NE_mockData2_ROI_001_1", 60 | "20210305_NE_mockData2_ROI_002_2", 61 | "20210305_NE_mockData2_ROI_003_3")) 62 | 63 | # Read in single channel 64 | expect_silent(cur_cil <- readImagefromTXT(path, channel_pattern = "Ag107")) 65 | expect_equal(length(cur_cil), 3) 66 | expect_equal(channelNames(cur_cil), c("Ag107")) 67 | expect_equal(names(cur_cil), c("20210305_NE_mockData2_ROI_001_1", 68 | "20210305_NE_mockData2_ROI_002_2", 69 | "20210305_NE_mockData2_ROI_003_3")) 70 | 71 | test_1 <- floor(as.array(cur_cil[[1]][,,1])) 72 | dimnames(test_1) <- NULL 73 | test_2 <- as.array(test_cil[[1]][,,1]) 74 | expect_equal(test_1, 75 | test_2) 76 | 77 | # parallelisation 78 | expect_silent(cur_cil <- readImagefromTXT(path, 79 | BPPARAM = BiocParallel::bpparam())) 80 | expect_equal(length(cur_cil), 3) 81 | expect_equal(channelNames(cur_cil), c("Ag107Di", "Pr141Di", "Sm147Di", "Eu153Di", "Yb172Di")) 82 | expect_equal(names(cur_cil), c("20210305_NE_mockData2_ROI_001_1", 83 | "20210305_NE_mockData2_ROI_002_2", 84 | "20210305_NE_mockData2_ROI_003_3")) 85 | 86 | # Error 87 | expect_error(cur_cil <- readImagefromTXT("test"), 88 | regexp = "The indicated path does not exist", 89 | fixed = TRUE) 90 | 91 | expect_error(cur_cil <- readImagefromTXT(1), 92 | regexp = "Please provide a string input indicating a path.", 93 | fixed = TRUE) 94 | 95 | expect_error(cur_cil <- readImagefromTXT(path, pattern = 1), 96 | regexp = "'pattern' must be indicated as single character", 97 | fixed = TRUE) 98 | 99 | expect_error(cur_cil <- readImagefromTXT(path, pattern = "test"), 100 | regexp = "The pattern does not match any\nof the files in the provided directory.", 101 | fixed = TRUE) 102 | 103 | expect_error(cur_cil <- readImagefromTXT(path, index_names = c("test", "test2")), 104 | regexp = "'index_names' not in the names of the .txt files.", 105 | fixed = TRUE) 106 | 107 | expect_error(cur_cil <- readImagefromTXT(path, channel_pattern = "test"), 108 | regexp = "'channel_pattern' does not match any entries in the .txt files.", 109 | fixed = TRUE) 110 | 111 | }) 112 | -------------------------------------------------------------------------------- /tests/testthat/test_show_cpout_features.R: -------------------------------------------------------------------------------- 1 | test_that("show_cpout_features function works", { 2 | path <- system.file("extdata/mockData/cpout", package = "imcRtools") 3 | 4 | # Works 5 | expect_silent(show_cpout_features(path)) 6 | expect_silent(cur_tab <- show_cpout_features(path)) 7 | expect_s3_class(cur_tab, "datatables") 8 | 9 | cur_df <- cur_tab$x$data 10 | expect_equal(colnames(cur_df), c(" ", "column_name", "category", "image_name", "object_name", "feature_name", "channel", 11 | "parameters", "channel_id", "data_type")) 12 | expect_equal(unique(cur_df$channel_id), c(NA, "Ag107", "Pr141", "Sm147", "Eu153", "Yb172", "CellCenter", 13 | "CellBorder", "Background")) 14 | expect_equal(head(cur_df$column_name), c("Location_Center_X", "Location_Center_Y", "Location_Center_Z", 15 | "Number_Object_Number", "Neighbors_NumberOfNeighbors_8", 16 | "Neighbors_PercentTouching_8")) 17 | 18 | expect_silent(show_cpout_features(path, display = "image_features")) 19 | expect_silent(cur_tab <- show_cpout_features(path, display = "image_features")) 20 | expect_s3_class(cur_tab, "datatables") 21 | 22 | cur_df <- cur_tab$x$data 23 | expect_equal(colnames(cur_df), c(" ", "column_name", "category", "image_name", "object_name", "feature_name", "channel", 24 | "parameters", "channel_id", "data_type")) 25 | expect_equal(unique(cur_df$channel_id), c(NA, "Ag107", "Pr141", "Sm147", "Eu153", "Yb172", "CellCenter", 26 | "CellBorder", "Background")) 27 | expect_equal(head(cur_df$column_name), c("Group_Number", "Group_Index", "ModuleError_01Images", "ExecutionTime_01Images", 28 | "Metadata_", "Metadata_template")) 29 | 30 | 31 | # Error 32 | expect_error(show_cpout_features("test"), 33 | regexp = "'var_cell.csv' does not exist in test", 34 | fixed = TRUE) 35 | expect_error(show_cpout_features(path, cell_features = "test"), 36 | regexp = paste0("'test' does not exist in ", path), 37 | fixed = TRUE) 38 | expect_error(show_cpout_features("test", display = "image_features"), 39 | regexp = "'var_Image.csv' does not exist in test", 40 | fixed = TRUE) 41 | expect_error(show_cpout_features(path, image_features = "test", display = "image_features"), 42 | regexp = paste0("'test' does not exist in ", path), 43 | fixed = TRUE) 44 | expect_error(show_cpout_features(path, display = "test")) 45 | }) 46 | -------------------------------------------------------------------------------- /vignettes/imcRtools_sticker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BodenmillerGroup/imcRtools/abc2ed7a7fec178049a251a626a13b2f2cdc23e4/vignettes/imcRtools_sticker.png --------------------------------------------------------------------------------