Title: | Extract Cell Density and Nearest Distance Based on 'PerkinElmer InForm' Software Output |
---|---|
Description: | Reads the output of the 'PerkinElmer InForm' software <http://www.perkinelmer.com/product/inform-cell-analysis-one-seat-cls135781>. In addition to cell-density count, it can derive statistics of intercellular spatial distance for each cell-type. |
Authors: | Minyu Wang,Yu Sun,Yu-Kuan Huang |
Maintainer: | Minyu Wang <[email protected]> |
License: | GPL-2 |
Version: | 1.0.5 |
Built: | 2025-01-26 03:56:44 UTC |
Source: | https://github.com/cran/ISAT |
Find the nearest neighbour (NN) given a cell and a group of cells;
findNN(cell, cellList, XY_LABELS = c("Cell.X.Position", "Cell.Y.Position"))
findNN(cell, cellList, XY_LABELS = c("Cell.X.Position", "Cell.Y.Position"))
cell |
An object cell |
cellList |
A list of cell types to be calculated for |
XY_LABELS |
x and y positions of the cell |
The Nearest Neibour Cell distance and calculate the distance
Cell.X.Position=sample (1:100,1) Cell.Y.Position=sample (1:100,1) Tcell=data.frame(Cell.X.Position,Cell.Y.Position) Cell.X.Position=sample(1:500,5,replace=TRUE) Cell.Y.Position=sample(1:500,5,replace=TRUE) Tumor.cells=data.frame(Cell.X.Position,Cell.Y.Position) findNN(Tcell,Tumor.cells,XY_LABELS=c('Cell.X.Position', 'Cell.Y.Position'))
Cell.X.Position=sample (1:100,1) Cell.Y.Position=sample (1:100,1) Tcell=data.frame(Cell.X.Position,Cell.Y.Position) Cell.X.Position=sample(1:500,5,replace=TRUE) Cell.Y.Position=sample(1:500,5,replace=TRUE) Tumor.cells=data.frame(Cell.X.Position,Cell.Y.Position) findNN(Tcell,Tumor.cells,XY_LABELS=c('Cell.X.Position', 'Cell.Y.Position'))
Read a file and compute the NN through permutations;
findNNs(filename, cell_names = NULL)
findNNs(filename, cell_names = NULL)
filename |
the file to be processed |
cell_names |
A list of cell types |
The Nearest Neibour Cell distance in the file
Get the count number of each phenotype for each tissue category
getFileCount(dataFile)
getFileCount(dataFile)
dataFile |
File path to the data file |
a data frame summary of count
Extract the statistics from the result given by findNNs
procDist(distResult, thred = 30)
procDist(distResult, thred = 30)
distResult |
A distance result file from findNNs |
thred |
a threshold distance as cut-off |
The statistics extracted from the distace result file
Cell.X.Position=sample(1:1000, 20, replace=TRUE) Cell.Y.Position=sample(1:1000, 20, replace=TRUE) distance = runif(20,min=0,max=100) distResult = data.frame (Cell.X.Position,Cell.Y.Position,distance) thred=30 procDist(distResult,thred)
Cell.X.Position=sample(1:1000, 20, replace=TRUE) Cell.Y.Position=sample(1:1000, 20, replace=TRUE) distance = runif(20,min=0,max=100) distResult = data.frame (Cell.X.Position,Cell.Y.Position,distance) thred=30 procDist(distResult,thred)