Skip to contents

This function identifies differentially expressed repertoire levels between groups of samples.

Usage

diffExpGroup(
  x,
  colGrp,
  level = c("aaClone", "ntClone", "V", "J", "VJ", "ntCDR3", "aaCDR3"),
  group
)

Arguments

x

an object of class RepSeqExperiment

colGrp

a vector of character specifying the column names in the mData slot corresponding to the experimental condition to be analyzed.

level

a character specifying the level of the repertoire to be compared. Should be one of "aaClone","ntClone", "V", "J", "VJ", "ntCDR3" or "aaCDR3".

group

a vector of character indicating the column name in the mData slot, as well as the two groups to be compared.

Value

a data.frame with 6 columns: the repertoire level in rownames, and the baseMean, log2FoldChange, lfcSE, stat, pvalue and padj in columns. The table is ordered by adjusted p-values.

Details

This function uses the DESeq2 package. Briefly, it estimates the size factors using the poscounts method which deals with zero counts. It then performs a default analysis by estimating the dispersion using a local regression of log dispersions over log base mean. Finally, a generalized linear model is fitted using a Negative Binomial distribution and Wald statistics.

References

Hill, M.O. (1973). Diversity and evenness: a unifying notation and its consequences. Ecology 54, 427–473. Kindt, R., Van Damme, P., Simons, A.J. (2006). Tree diversity in western Kenya: using profiles to characterise richness and evenness. Biodiversity and Conservation 15, 1253–1270.

Examples

if (requireNamespace("DESeq2", quietly = TRUE)) {
dds1 <- diffExpGroup(x = RepSeqData,
                    colGrp = "cell_subset" ,
                    level = "V",
                    group = c("cell_subset", "amTreg", "nTreg"))
}
#> Warning: some variables in design formula are characters, converting to factors
#> using pre-existing size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing