Sigma: Calculate the variance covariance matrix used in the...

View source: R/CARD.imputation.R

SigmaR Documentation

Calculate the variance covariance matrix used in the imputation of the new grided locations

Description

Calculate the variance covariance matrix used in the imputation of the new grided locations

Usage

Sigma(locationOrig, trainInd, testInd, OptimalPhi, ineibor)

Arguments

locationOrig

Data frame, spatial location data frame of the original spatial resolved transcriptomics dataset, stored in the CARD_object@spatial_location

trainInd

Vector, index of the original spatial locations

testInd

Vector, index of the newly grided spatial locations

OptimalPhi

Numeric, the optimal phi value stored in CARD_object

ineibor

Numeric, number of neighbors used in the imputation on newly grided spatial locations, default is 10.

Value

Return a list with the imputed Cell type composition Vtest matrix on the newly grided spatial locations and predicted normalized gene expression


YingMa0107/CARD documentation built on Feb. 14, 2024, 12:23 p.m.