deTest: Perform differential testing of the distribution measurements...

Description Usage Arguments Value

View source: R/deTest.R


Permutation test is used to get the p-values in differential testing. To keep the possible correlation structure between genes. We run ceiling(N.genes.null/nrow(count.matrix)) rounds of permutation. For each round, we permute cell label once and deconvolve the true expression distribution for all the selected genes with the permuted cell labels. One may need more rounds of permutation to get smaller p-values. See deTest.more. For examples, see descendMultiPop


deTest(descend.multipop.output, de.pair.names, count.matrix, labels,
  N.genes.null = 10000, alternative = c("two.sided", "less", "greater"),
  n.cores = 1, cl = NULL, type = "FORK", verbose = T,
  show.message = T, params = NULL, compare.covariates = T)



the returned value of descendMultiPop


a vector of length 2 showing the two cell population names for differential testing. The names should match the values in labels


the observed UMI count matrix. It should be an R object of class matrix or dgeMatrix. Each row is a gene and each column is a cell. The column sums (which should be the library sizes) are used as the input for scaling.consts when both ercc.matrix and scaling.consts are NULL.


a vector of factors or characters, indicating the cell popluation label of each cell. The length of labels should be the same as the number of columns of count.matrix


number of permuted genes. The larger the value is, the longer it takes and the smaller the minimum p-value can be (the minimum p-value can be as small as 0.5/N.genes.null)


the alternative hypotheses for differential testing


the number of cores used for parallel computing. Default is 1. Used only when parallel computing is done in a single machine. For using multi-machine cores, need to assign cl explicitly. If verbose is TRUE, then a separated file is created to store the progress of each slave cores.


an object of class "cluster". See more details in makeCluster


Default is "FORK" to save memory. Change it to "PSOCK" if you are using Windows and cl is NULL. More details see makeCluster


verbose the estimation and testing procedures or not. Default is True.


whether show messages for the computing progresses. Default is TRUE


by default, it is descend.multipop.output$params, but users can provide their own in special cases


whether also perform differential testing on the coefficients of the covaraites Z and Z0. Need to set to FALSE if the number of covariates is not the same in the two cell populations


a list with elements


a matrix of p-values calculated from permutation tests. Each row is a gene and each column is a distribution measurement of coefficient (if Z or Z0 is presented)


the z-scores matrix in differential testing. Each row is a gene and each column is a distribution measurement of coefficient (if Z or Z0 is presented)


the permuted z-scores matrix used as the null distribution of the z-scores in each column. The number of rows equals to N.genes.null

jingshuw/descend documentation built on Sept. 2, 2018, 11:10 a.m.