Description Usage Arguments Value Author(s) See Also Examples
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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 = |
spike.conc |
Vector of theoretical count for each spike-in transcript in one cell (ONLY needed if RNAspike.use = |
CE.range |
Two-element vector representing the lower and upper limits for the estimated range of capture efficiencies
(ONLY needed if RNAspike.use = |
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. |
A data frame containing the parameters from the EM algorithm for each gene, rows are genes and columns contain the following items:
1 totalMean_1, totalMean_2, Adj_Mean_1, Adj_Mean_2, AdjNormMean_1, AdjNormMean_2 are the total mean, adjusted mean, normalized mean for cellular groups 1 and 2 respectively.
2 Mean, ZeroInflation, Dispersion are the MLE of the parameters of whole cellular population characetrized by the ZINB model.
3 Intercept, Group2 are the co-efficients of the intercept and group effect on mean of non-zero counts.
4 Cellcluster 2, Cellcluster 3, .., Cellcluster M are the effects of cell clusters on mean of non-zero counts.
5 CellAuxil 2, CellAuxil 3, ..., CellAuxil N are the effects of cell-level auxiliary information on mean of non-zero counts (if included in the model).
6 Intercept.0 Group2.0 are the co-efficients of the intercept and group effect on zero inflation probability.
7 Cellcluster 2.0, Cellcluster 3.0, .., Cellcluster M.0 are the effects of cell clusters on zero-inflation probability.
8 CellAuxil 2.0, CellAuxil 3.0, ..., CellAuxil N.0 are the effects of cell-level auxiliary information on zero-inflation probability (if included in the model).
9 #iteration number of iteration required for convergence for each gene.
Samarendra Das
TestData
, a test dataset for SwarnSeq.
dzinb
, dzinb funcion in SwarnSeq.
ZINBEM
, Expected-Maximization (EM) algorithm in SwarnSeq.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.