casc: Sample, Train, and Predict logistic regression model using...

Description Usage Arguments Value Examples

Description

Sample, Train, and Predict logistic regression model using singleCellExperiment and glmnet.

Usage

1
casc(sce, clusters, marker_num = 2000, alpha = 0.5, cv = 5)

Arguments

sce

a singleCellExperiment

clusters

A list of clusters, an array or list of integers of same length as number of cells in sce.

marker_num

The top variable genes that will be used to filter the SCE by to reduce runtime.

alpha

A parameter for logistic regression where 0 is ridge regression and 1 is lasso regression.

cv

The number of folds for cross validation

Value

A list of casc objects with predicted classes, aucs, responses, and truths.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(SingleCellExperiment)

counts <- matrix(rnorm(40000, 10, 10), ncol=200, nrow=200)
sce <- SingleCellExperiment(assays = list(logcounts = counts))
colnames(sce) <- stringi::stri_rand_strings(200, 5)
rownames(sce) <- stringi::stri_rand_strings(200, 5)

cluster_1 <- rep(c(0, 1, 1, 1, 1, 0, 1, 1, 1, 1), 20)
cluster_2 <- rep(c(0, 1, 1, 0, 1, 0, 1, 1, 0, 1), 20)

casc_list <- casc(sce, list(cluster_1, cluster_2), marker_num=1500)

jamez-eh/casc documentation built on June 12, 2019, 1:43 a.m.