Identify BioQC leading-edge genes of one gene-set

wmwLeadingEdge(
  matrix,
  indexVector,
  valType = c("p.greater", "p.less", "p.two.sided", "U", "abs.log10p.greater",
    "log10p.less", "abs.log10p.two.sided", "Q", "r", "f", "U1", "U2"),
  thr = 0.05,
  reference = c("background", "geneset")
)

Arguments

matrix

A numeric matrix

indexVector

An integer vector, giving indices of a gene-set of interest

valType

Value type, consistent with the types in wmwTest

thr

Threshold of the value, greater or less than which the gene-set is considered significantly enriched in one sample

reference

Character string, which reference is used? If background, genes with expression higher than the median of the background are reported. Otherwise in the case of geneset, genes with expression higher than the median of the gene-set is reported. Default is background, which is consistent with the results of the Wilcoxon-Mann-Whitney tests.

Value

A list of integer vectors.

BioQC leading-edge genes are defined as those features whose expression is higher than the median expression of the background in a sample. The function identifies leading-edge genes of a given dataset (specified by the index vector) in a number of samples (specified by the matrix, with genes/features in rows and samples in columns) in three steps. The function calls wmwTest to run BioQC and identify samples in which the gene-set is significantly enriched. The enrichment criteria is specified by valType and thr. Then the function identifies genes in the gene-set that have greater or less expresion than the median value of the reference in those samples showing significant enrichment. Finally, it reports either leading-edge genes in individual samples, or the intersection/union of leading-edge genes in multiple samples.

See also

Examples

myProfile <- c(rnorm(5, 3), rnorm(15, -3), rnorm(100, 0))
myProfile2 <- c(rnorm(15, 3), rnorm(5, -3), rnorm(100, 0))
myProfile3 <- c(rnorm(10, 5), rnorm(10, 0), rnorm(100, 0))
myProfileMat <- cbind(myProfile, myProfile2, myProfile3)
wmwLeadingEdge(myProfileMat, 1:20, valType="p.greater")
#> $myProfile2
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
#> 
#> $myProfile3
#>  [1]  1  2  3  4  5  6  7  8  9 10 15 16 17 19
#> 
wmwLeadingEdge(myProfileMat, 1:20, valType="log10p.less")
#> $myProfile
#>  [1]  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
#> 
#> $myProfile2
#> [1] 16 17 18 19 20
#> 
#> $myProfile3
#> [1] 11 12 13 14 18 20
#> 
wmwLeadingEdge(myProfileMat, 1:20, valType="U", reference="geneset")
#> $myProfile
#>  [1]  1  2  3  4  5  9 12 13 17 20
#> 
#> $myProfile2
#>  [1]  1  2  4  6  7  9 10 13 14 15
#> 
#> $myProfile3
#>  [1]  1  2  3  4  5  6  7  8  9 10
#> 
wmwLeadingEdge(myProfileMat, 1:20, valType="abs.log10p.greater")
#> $myProfile2
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
#> 
#> $myProfile3
#>  [1]  1  2  3  4  5  6  7  8  9 10 15 16 17 19
#>