rankByT {ADAPTS}R Documentation

Rank genes for each cell type

Description

Use a t-test to rank to features for each cell type

gList <- rankByT(geneExpr, qCut=0.3)

Usage

rankByT(
  geneExpr,
  qCut = 0.3,
  oneCore = FALSE,
  secondPval = TRUE,
  remZinf = FALSE,
  reqRatGT1 = FALSE
)

Arguments

geneExpr

The gene expression data

qCut

(DEFAULT: 0.3)

oneCore

Set to TRUE to disable paralellization (DEFAULT: FALSE)

secondPval

Set to TRUE to use p-Values as a second sort criteria (DEFAULT: TRUE)

remZinf

Set to TRUE to remove any ratio with zero or infinity. Good for scRNAseq. (DEFAULT: FALSE)

reqRatGT1

Set to TRUE to remove any gene with a ratio with less than 1. Good for scRNAseq. (DEFAULT: FALSE)

Value

a list of cell types with data frames ranking genes

Examples

#This toy example treats the LM22 deconvolution matrix as if it were all of the data
#  For a real example, look at the vignette or comments in exprData, fullLM22, small LM22
library(ADAPTS)
fullLM22 <- ADAPTS::LM22[1:200, 1:8]
#Make a fake signature matrix out of 100 genes and the first 8 cell types
smallLM22 <- fullLM22[1:100, 1:8] 

#Make fake data representing two replicates of purified Mast.cells 
exprData <- ADAPTS::LM22[1:200, c("Mast.cells.resting","Mast.cells.activated")]
colnames(exprData) <- c("Mast.cells", "Mast.cells")

#Fake source data with replicates for all purified cell types.
#  Note in this fake data set, many cell types have exactly one replicate
fakeAllData <- cbind(fullLM22, as.data.frame(exprData)) 
gList <- rankByT(geneExpr = fakeAllData, qCut=0.3, oneCore=TRUE, reqRatGT1=FALSE)

[Package ADAPTS version 1.0.22 Index]