qsTable: Summary of QSarray Results

Description Usage Arguments Details Value Examples

View source: R/QSarray.R

Description

Print a table with a summary of the information on the most significant gene sets in QSarray.

Usage

1
2
qsTable(QSarray, number=20, sort.by=c("fdr","p","logFC"))
 

Arguments

QSarray

A QSarray object

number

The number of gene sets to include in the table

sort.by

character vector; a list of metrics to be used to sort the gene sets in QSarray. Can be any combination and order of c("fdr","p","logFC"), or NULL to specify no re-ordering of gene sets.

Details

This method will return a table with a summary of the results of qusage.

Value

A data frame containing the following columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 ##create example data
  eset = matrix(rnorm(500*20),500,20, dimnames=list(1:500,1:20))
  labels = c(rep("A",10),rep("B",10))
   
  geneSets = list()

##create a number of gene sets with varying levels of differential expression.
  for(i in 0:10){
    genes = ((30*i)+1):(30*(i+1))
    eset[genes,labels=="B"] = eset[genes,labels=="B"] + rnorm(1)
    
    geneSets[[paste("Set",i)]] = genes
  }
   
   
##calculate qusage results
  results = qusage(eset,labels, "B-A", geneSets)
   
  qsTable(results)
  
##show the first 5 sets, sorted by log fold change
  qsTable(results, number=5, sort.by="logFC")
 

qusage documentation built on Nov. 8, 2020, 8:09 p.m.