qsTable {qusage} | R Documentation

## Summary of QSarray Results

### Description

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

### Usage

    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:

- `pathway.name` - The name of the pathway

- `log.fold.change` - Average log2 fold change value of the genes in the pathway

- `p.Value` - The p-value for the gene set, as calculated using `pdf.pVal`

- `FDR` - The Benjamini-Hochberg False Discovery rate. Calculated using R's built-in `p.adjust` method.

### Examples

     ##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")

[Package qusage version 2.14.0 Index]