compareResults {PathwaySplice} | R Documentation

## compareResults

### Description

This function helps with visualizing the effects of bias adjustment in pathway analysis, by comparing the distributions of bias factors (e.g. number of exon bins) in genes associated with the most significant gene sets, before and after adjusting for bias factors in splicing pathway analysis.

### Usage

    compareResults(n.go, adjusted, unadjusted, gene.based.table,
      output.dir = tempdir(), type.boxplot = c("All", "Only3"))

### Arguments

`n.go` | Distributions of bias factor in genes associated with the most significant `n.go` gene sets will be compared
`adjusted` | An object returned by `runPathwaySplice`, should correspond to gene set anlaysis results adjusting for biases in splicing analysis
`unadjusted` | An object returned by `runPathwaySplice`, should correspond to gene set analysis results NOT adjusting for biases
`gene.based.table` | An object returned by `makeGeneTable`, should correspond to a table with one p-value for each gene
`output.dir` | Directory for output files
`type.boxplot` | Options are 'All' and 'Only3', corresponding to drawing 5 boxplots or 3 boxplots. 5 boxplots: `all genesets`, `sig.adjusted` (sig gene sets in adjusted analysis), `sig.unadjusted` (sig gene sets in unadjusted analysis), `sig.adjusted.only` (sig gene sets in adjusted analysis only), `sig.unadjusted.only` (sig gene sets in unadjusted analysis only) 3 boxplots: `all genesets`, `adjusted.sig`, `unadjusted.sig`

### Value

The output include 3 files in `output.dir`: (1) a venn diagram comparing significant gene sets before and after adjusting for bias factors (2) a .csv file with gene set names belonging to different sections of the venn diagram (3) a box plot showing the distributions of number of features within all genes in significant gene sets, with or without adjusting for bias factors

### Examples

    dir.name <- system.file('extdata', package='PathwaySplice')
    hallmark.pathway.file <- file.path(dir.name,'h.all.v6.0.symbols.gmt.txt')

    hallmark <- gmtGene2Cat(hallmark.pathway.file,genomeID='hg19')

    gene.based.table <- makeGeneTable(featureBasedData)

    res.adj <- runPathwaySplice(gene.based.table,genome='hg19',
                             id='ensGene',gene2cat=hallmark,
                             go.size.limit = c(5, 200),
                             method='Wallenius')

    res.unadj <- runPathwaySplice(gene.based.table,genome='hg19',
                             id='ensGene',gene2cat=hallmark,go.size.limit = c(5, 200),
                             method='Hypergeometric')

    compareResults(20, res.adj, res.unadj, gene.based.table, type.boxplot='Only3')

    ## Not run:
    # illustrate specification of output directory on windows systems
    compareResults(20, res.adj, res.unadj, gene.based.table, type.boxplot='Only3',output.dir=tempdir())

    output.dir <- '~/OutputTestPathwaySplice' #linux system
    compareResults(20,res.adj, res.unadj,gene.based.table, output.dir, type.boxplot='Only3')

    ## End(Not run)

[Package PathwaySplice version 1.8.0 Index]