normalize.scran: scran

Description Usage Arguments Value Examples

Description

The most recent version of scran depends on R > 3.4. I use scran 1.2.2, which depeneds on R.3.3.0. One difference that I have found so far is about SCESet - in the older version, the spike-in variable is a binary vector of yes/no, and in the newer version, the spike-in variable is a numeric vector specifying which genes is spike-in controls.

Usage

1
2
normalize.scran(counts, control = list(save_modelFit = FALSE,
  get_cell_clusters = FALSE, min.size = 50))

Arguments

counts

Gene by sample expression count matrix (G by N).

control

List with control arguments, including save_modelFit TRUE to output the complete SCnorm output. get_cell_clusters TRUE/FALSE to use scran to cluster cells and then estimate size factors by cell clusters. min.size scran internal argument. Integer scalar specifying the minimum size of each cluster. Default to be 50.

Value

libsize_factors numeric vector of the scale factors for library size.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ipsc_eset <- get(load(system.file("testdata", "HumanTungiPSC.rda", package = "ashbun")))
counts <- exprs(ipsc_eset)[sample(nrow(exprs(ipsc_eset)), ), ]

#---- generat simulated datasets
simdata_list <- simulationWrapper(counts, Nsim = 5, Nsample = 100, Ngene = 500)

#---- extract a single dataset as an example
#---- take pi0 = .9, the first simulated data
simdata <- simdata_list[[3]][[1]]

#---- normalize
output <- normalize.scran(simdata$counts)

jhsiao999/ashbun documentation built on May 8, 2019, 11:17 p.m.