getTable: getTable

Description Usage Arguments Details Value Author(s) Examples

View source: R/getTable.R

Description

Summarize sortGenes and getPValues results in one data frame.

Usage

1
2
3
4
5
6
7
8
getTable(
  gs,
  pp,
  fc_cutoff = 0,
  adjpval_cutoff = 0.05,
  islog = TRUE,
  pseudocount = 1
)

Arguments

gs

The output of sortGenes.

pp

The output of getPValues.

fc_cutoff

Default is 0, which means only genes that have an average fold-change higher than 0 for a given cluster are reported. Positive and negative numbers are allowed. Set to FALSE to switch off filtering on the average fold-change value.

adjpval_cutoff

A numeric adjusted p-value cutoff value. Default is 0.05.

islog

A logical value. TRUE (default) means the expression matrix supplied previously to sortGenes is in log space.

pseudocount

A numeric value. A pseudocount to add to the expression matrix before taking the log if islog is FALSE.

Details

getTable combines the results of sortGenes and getPValues in one table and also calculates the average fold-change of expression, allowing to select a fold-change cutoff and a p-value cutoff to determine variable genes.

Value

getTable returns a data frame containing the gene name, the average log fold change, the adjusted p-value and the specificity score for all variable genes in each cluster. The data frame is sorted by the specificity score. Note that a gene may appear multiple times for multiple clusters.

Author(s)

Mahmoud M Ibrahim <mmibrahim@pm.me>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(kidneyTabulaMuris)
gs = sortGenes(kidneyTabulaMuris$exp, kidneyTabulaMuris$cellType)
pp = getPValues(gs)
tab = getTable(gs, pp)

#A quick diagnostic plot (fold change correlates with specificity score)
plot(tab$Average.Log.Fold.Change, tab$Specificity.Score, col = as.factor(tab$Cluster), pch = 20)

#all variable genes
unique(tab$Gene.Name)

#To get all genes without any cutoffs, set adjpval_cutoff to >1 and fc_cutoff to FALSE
tab = getTable(gs, pp, fc_cutoff = FALSE, adjpval_cutoff = 1.1)

mahmoudibrahim/genesorteR documentation built on April 20, 2021, 4:07 p.m.