extentBuffer: Find optimal number of buffer for extent

View source: R/extentBuffer.R

extentBufferR Documentation

Find optimal number of buffer for extent

Description

When we create the rasterlayer, there will be a rectangular range. It is often necessary to provide a buffer to ensure that subsequent functions do not result in blank or missed pixels. This function is to find the right buffer for the sample coordinates so that each cluster is not lost in the process of converting a spot to a pixel.

Usage

extentBuffer(sampleInfo)

Arguments

sampleInfo

A data.frame contains the pixel information and cluster labels for each barcode of a human breast cancer sample. The index contains barcodes, and at least three other columns that have these information are required and the column names should be the same as following: "imagerow": The row pixel coordinate of the center of the spot "imagecol": The column pixel coordinate of the center of the spot "Cluster": The label that corresponding to this barcode This data.frame can be produced by "dataPrepFromSeurat()/dataPrepFromSpE" functions

Value

optimal number of buffer for extent

Examples

fpath <- system.file("extdata", "dataframe.rda", package="stJoincount")
load(fpath)
n <- extentBuffer(humanBC)

Nina-Song/stJoincount documentation built on Oct. 23, 2022, 4:55 p.m.