CytoKProc: CytoKProc

View source: R/CytoKProc.R

CytoKProcR Documentation

CytoKProc

Description

This function is a helper function that computes the shrunk effective size mean, shrunk effective size standard deviation (sd), p value and adjusted p value of each feature for the function CytoK.

Usage

CytoKProc(object, group_factor, lowerRho = 2, upperRho = 12, gridRho = 4)

Arguments

object

an object which is a matrix or data.frame with features (e.g. cluster-marker combinations or genes) on the rows and samples (group factors) as the columns. Alternatively, a user can provide a SummarizedExperiment object and the assay(object) will be used as input for the CytoK procedure.

group_factor

a group level binary categorical response associated with each sample or column in the object. The order of the group_factor must match the order of the columns in object.

lowerRho

(Optional) lower bound of the kernel parameter.

upperRho

(Optional) upper bound of the kernel parameter.

gridRho

(Optional) number of grid points in the interval [lowerRho, upperRho].

Value

A list of CytoK statistics including

shrunkEffectSizeMean

the shrunk effective size posterior mean per feature

shrunkEffectSizeSD

the shrunk effective size posterior sd per feature

vec_pValue

the unadjusted p value per feature

AdjPvalue_features

the adjusted p value per feature using the Benjamini-Hochberg procedure.

Examples

data <- cbind(matrix(rnorm(1200,mean=2, sd=1.5),
nrow=200, ncol=6), matrix(rnorm(1200,mean=5, sd=1.9),
nrow=200, ncol=6))
data_CytoKProc <- CytoKProc(object=data,
group_factor = rep(c(0,1), each=6), lowerRho=2,
upperRho=12,gridRho=4)


Ghoshlab/cytoKernel documentation built on Nov. 24, 2024, 9:17 a.m.