importanceADT: importanceADT

View source: R/importanceADT.R

importanceADTR Documentation

importanceADT

Description

A function to calculate the importance score of ADT

Usage

importanceADT(
  sce,
  altExp_name = "ADT",
  exprs_value = "logcounts",
  method = c("randomForest", "PCA"),
  group = NULL,
  subsample = TRUE,
  times = 10,
  prop = 0.8,
  k_pca = 5,
  remove_first_PC = TRUE,
  ...
)

Arguments

sce

A singlecellexperiment object

altExp_name

A character indicates which expression matrix is used. by default is none (i.e. RNA).

exprs_value

A character indicates which expression value in assayNames is used.

method

A character indicates the method of ADT importance calculation, either randomForest or PCA

group

A vector indicates the grouping of the data (for random forest)

subsample

Whether perform subsampling (for random forest)

times

A numeric indicates the times of subsampling is performed (for random forest)

prop

A numeric indicates the proportion of cells are subsampled from the whole data (for random forest)

k_pca

Number of principal component will be used to calculate the loading scores (for PCA)

remove_first_PC

A logical input indicates whether the first component will be removed from calculation (for PCA).

...

other arguments to 'randomForest()' or 'prcomp()' function

Details

For random forest, the importance scores are based on features importance. For PCA, it implements the method proposed in Levin et al (based on the loading of features).

Value

A SingleCellExperiment object

References

Levine, J.H., Simonds, E.F., Bendall, S.C., Davis, K.L., El-ad, D.A., Tadmor, M.D., Litvin, O., Fienberg, H.G., Jager, A., Zunder, E.R. and Finck, R., 2015. Data-driven phenotypic dissection of AML reveals progenitor-like cells that correlate with prognosis. Cell, 162(1), pp.184-197.

Examples

data("sce_control_subset", package = "CiteFuse")
sce_control_subset <- importanceADT(sce_control_subset,
group = sce_control_subset$SNF_W_louvain,
subsample = TRUE)


SydneyBioX/CiteFuse documentation built on Feb. 13, 2023, 6:04 a.m.