SwarnSeq: This function is used to estimate the parameters for genes...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SwarnSeq.R

Description

This function is used to estimate the parameters for genes between two specified groups of cells in a raw read counts matrix of single-cell RNA-seq (scRNA-seq) data. It takes a non-negative integer matrix of scRNA-seq raw read counts as input. So users should map the reads (obtained from sequencing libraries of the samples) to the corresponding genome and count the reads mapped to each gene according to the gene annotation to get the raw read counts matrix in advance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
SwarnSeq(
  CountData,
  RNAspike.use,
  spikes,
  spike.conc,
  CE.range,
  parallel,
  norm.method,
  group,
  CellCluster,
  CellAuxil,
  maxit,
  eps,
  muoffset,
  phioffset,
  weights
)

Arguments

CountData

Observed count data matrix for genes, rows represent genes, columns represent cells.

RNAspike.use

Logical value indicating TRUE/FALSE, if TRUE, spikes and spike.conc information must be provided.

spikes

Observed count matrix for spike-in transcripts, rows represent spike-in transcripts, columns represent cells. Only needed if RNAspike.use = TRUE).

spike.conc

Vector of theoretical count for each spike-in transcript in one cell (ONLY needed if RNAspike.use = TRUE).

CE.range

Two-element vector representing the lower and upper limits for the estimated range of capture efficiencies (ONLY needed if RNAspike.use = FALSE, default [0.1, 0.40]).

parallel

If FALSE (default), no parallel computation is used; if TRUE, parallel computation is performed.

norm.method

Method for normalizing the scRNA-seq count expression data, either 'DESeq2' (maximum likelihood, Ye et al., 2017) or 'TMM' (Robinson et al., 2010).

group

Vector which specifies the membership of the cells, i.e. two groups to be compared, corresponding to the columns in the count data matrix.

CellCluster

Vector which specifies the cluster memberships of the cells, i.e. each entry represents memberships of the columns of the count data matrix.

CellAuxil

Vector of cell level auxiliary information, corresponding to the columns in the counts matrix, default is NULL.

maxit

Maximum number of iterations for Expected-Maximization (EM) algorithm.

eps

Convergennce criteria for EM algorithm.

muoffset

Offset parameter for mean (mu) parameter, default is NULL.

phioffset

Offset parameter for zero inflation (phi) parameter, default is NULL.

weights

Observation wise weights for the cells, default is unity vector.

Value

A data frame containing the parameters from the EM algorithm for each gene, rows are genes and columns contain the following items:

Author(s)

Samarendra Das

See Also

TestData, a test dataset for SwarnSeq.

dzinb, dzinb funcion in SwarnSeq.

ZINBEM, Expected-Maximization (EM) algorithm in SwarnSeq.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Load the test count data, spike-in counts and spike-in concentration data for SwarnSeq.
data(TestData)
counts <- TestData$CountData
Spikes <- TestData$SpikeCounts
SpikeConc <- TestData$SpikeConc

#specifying the group information, the group 1 and 2 have two hundred cells each.
group <- c(rep(1, 200), rep(2, 200))
#Specifying the cluster memberships of the cells in columns of countData.
cellcluster <- c(rep(1, 60), rep(2, 40), rep(3, 50),
                    rep(4, 50), rep(5, 30),
                    rep(6, 90),
                    rep(7, 80))

#parameters from EM algorithm for each gene (when Spike-in information available).
#results <- SwarnSeq(CountData=counts, RNAspike.use=TRUE, spikes=Spikes, spike.conc=SpikeConc,
                      #parallel=FALSE, norm.method="TMM", group=group, CellCluster=cellcluster,
                          #CellAuxil=NULL, maxit=500, eps=1e-10,
                          #muoffset=NULL, phioffset=NULL, weights=NULL)

#When Spike-in information not available.
#results <- SwarnSeq(CountData=counts, RNAspike.use=FALSE, CE.range=c(0.1, 0.4)
                      #parallel=FALSE, norm.method="TMM", group=group, CellCluster=cellcluster,
                          #CellAuxil=NULL, maxit=500, eps=1e-10,
                          #muoffset=NULL, phioffset=NULL, weights=NULL)

sam-uofl/SwarnSeq documentation built on Sept. 6, 2020, 12:09 a.m.