CytoKProc: CytoKProc

Description Usage Arguments Value Examples

View source: R/CytoKProc.R

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

1
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

1
2
3
4
5
6
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 Dec. 17, 2021, 9:32 p.m.