diffPatternTestExon: Main function for differential pattern analysis of...

View source: R/package.R

diffPatternTestExonR Documentation

Main function for differential pattern analysis of exon-binned Ribo-seq data

Description

An alternative version of diffPatternTest for exon level binning. Both data binning and differential pattern analysis are implemented. Instead of a fixed width or adaptive method, the positions of exons in the genome are used as bins. Therefore the number of exons per gene and their relative sizes determines the bins used for differential pattern testing.

Usage

diffPatternTestExon(psitemap, classlabel, 
    method = c("gtxr", "qvalue"))

Arguments

psitemap

A list object from value of psiteMapping function. In psitemap, list elements coverage and exons are required.

classlabel

For matrix input: a DataFrame or data.frame with at least a column comparison. In comparison, 1s stand for the reference condition, 2s stand for target condtion, 0s represent replicates not invloved in the test, if present. Rows of classlabel correspond to rows of data.

method

For a 2-component character vector input: the first argument is the multiplicity correction method for exon-level p-value adjustment. The second argument is the multiplicity correction method for gene-level p-value adjustment. Methods include: "qvalue" for q-value from qvalue pacakge, "gtxr", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none" from elitism package.

Details

For mammalian species, when the reads are sparse, it’s more meaningful to perform a exon level pattern analysis. diffPatternTestExon() provides the option of exon level pattern differentiation analysis by treating each exon as one bin. But for organisms such as yeast, as most genes only contain one exon, the exon-level analysis is not meaningful since the analysis will simply result in the RNA-seq type of analysis, i.e. differential abundance test instead of the pattern analysis. Using diffPatternTestExon() on yeast data is not for organisms with minimal alternative splicing or multiple exons. For a given gene, the normalizing constant is estimated at codon level.

Value

bin

A List object of exon-level results. Each element of list is of a gene, containing exon results columns: pvalue, log2FoldChange, and the adjusted p-value named by the first string in method.

gene

A DataFrame object of gene-level results. It contains columns: tvalue, pvalue, and the adjusted p-value named by the second string in method.

small

Names of genes without sufficient reads

classlabel

The same as input classlabel.

data

A list of exon-binned P-site footprint matrices: in each matrix, rows corrspond to replicates, columns corrspond to exons. All genes reported in bin and gene are included.

method

The same as input method.

See Also

diffPatternTest

Examples

data(data.psite)
classlabel <- data.frame(condition = c("mutant", "mutant", 
    "wildtype", "wildtype"), comparison=c(2, 2, 1, 1))
rownames(classlabel) <- c("mutant1", "mutant2", "wildtype1", "wildtype2")
result.exon <- diffPatternTestExon(psitemap = data.psite, 
    classlabel = classlabel, method = c('gtxr', 'qvalue'))

jipingw/RiboDiPA documentation built on Dec. 10, 2024, 8:46 p.m.