runPathwaySplice {PathwaySplice} | R Documentation

## runPathwaySplice

### Description

This function identifies pathways that are enriched with signficant genes, while accounting for different number of gene features (e.g. exons) associated with each gene

### Usage

    runPathwaySplice(genewise.table, genome, id, gene2cat = NULL,
      test.cats = c("GO:CC", "GO:BP", "GO:MF"), go.size.limit = c(10, 200),
      method = "Wallenius", repcnt = 2000, use.genes.without.cat = FALSE,
      binsize = "auto", output.file = tempfile())

### Arguments

`genewise.table` | data frame returned from function `makeGeneTable`
`genome` | Genome to be used, options are 'hg19' or 'mm10'
`id` | GeneID, options are 'entrezgene' or 'ensembl_gene_id'
`gene2cat` | Get sets to be tested, these are defined by users, can be obtained from `gmtGene2Cat` function
`test.cats` | Default gene ontology gene sets to be tested if `gene2cat` is not defined
`go.size.limit` | Size limit of the gene sets to be tested
`method` | the method used to calculate pathway enrichment p value. Options are 'Wallenius', 'Sampling', and 'Hypergeometric'
`repcnt` | Number of random samples to be calculated when 'Sampling' is used, this argument ignored unless `method='Sampling'`
`use.genes.without.cat` | Whether genes not mapped to any gene_set tested are included in the analysis. Default is set to FALSE, where genes not mapped to any tested categories are ignored in analysis. Set this option to TRUE if it's desired that all genes in `genewise.table` to be counted towards the total number of genes outside the category.
`binsize` | The number of genes in each gene bin in the bias plot
`output.file` | File name for the analysis result in .csv format.

### Details

This function implements the methodology described in Young et al. (2011) to adjust for different number of gene features (column `numFeature` in `gene.based.table`). For example, gene features can be non-overlapping exon counting bins associated with each gene (Fig 1 in Anders et al. 2012). In the bias plot, the genes are grouped by `numFeature` in `genewise.table` into gene bins, the proportions of signficant genes are then plotted against the gene bins.

### Value

runPathwaySplice returns a tibble with the following information:

`gene_set` | Name of the gene set. Note in this document we used the terms gene_set, category, and pathway interchangeably
`over_represented_pvalue` | P-vaue for the associated gene_set being over-represented among significant genes
`under_represented_pvalue` | P-vaue for the associated gene_set being under-represented among significant genes
`numSIGInCat` | The number of significant genes in the gene_set
`numInCat` | The total number of genes in the gene_set
`description` | Description of the gene gene_set
`ontology` | The domain of the gene ontology terms if GO categories were tested. Go categories can be classified into three domains: cellular component, biological process, molecular function.
`SIGgene_ensembl` | Ensembl gene ID of significant genes in the gene_set
`SIGgene_symbol` | Gene symbols of signficant genes in the gene_set
`Ave_value_all_gene` | The average value for `numFeature` for all the genes in the gene_set, note that `numFeature` is the bias factor adjusted by PathwaySplice

These information are also saved in the file `output.file`

### References

Young MD, Wakefield MJ, Smyth GK, Oshlack A (2011) Gene ontology analysis for RNA-seq: accounting for selection bias. Genome Biology 11:R14

Anders S, Reyes A, Huber W (2012) Dececting differential usage of exons from RNA-seq data. Genome Research 22(10): 2008-2017

### Examples

    gene.based.table <- makeGeneTable(featureBasedData)

    res <- runPathwaySplice(gene.based.table,genome='hg19',id='ensGene',
                             test.cats=c('GO:BP'),
                             go.size.limit=c(5,30),
                             method='Wallenius',binsize=20)
    ## Not run:

    # demonstrate how output file can be specified
    res <- runPathwaySplice(gene.based.table,genome='hg19',id='ensGene',
                           test.cats=c('GO:BP'),
                           go.size.limit=c(5,30),
                           method='Wallenius',binsize=800,
                           output.file=tempfile())

    # demonstrate using customized gene sets
    dir.name <- system.file('extdata', package='PathwaySplice')
    hallmark.local.pathways <- file.path(dir.name,'h.all.v6.0.symbols.gmt.txt')
    hlp <- gmtGene2Cat(hallmark.local.pathways, genomeID='hg19')

    res <- runPathwaySplice(gene.based.table,genome='hg19',id='ensGene',
                           gene2cat=hlp,
                           go.size.limit=c(5,200),
                           method='Wallenius',binsize=20,
                           output.file=tempfile())

    ## End(Not run)

[Package PathwaySplice version 1.8.0 Index]