R: Perform a Permutation Test to fit the null distribution of...

perform_permutation_ds {GPseq} | R Documentation

## Perform a Permutation Test to fit the null distribution of the test statistic to a Gamma Distribution

### Description

This function calculates the shape and scale parameters for a Gamma Distribution which is used to fit the null distribution of the test statistic calculated for the Differential Splicing of an exon in a gene between two conditions/samples.

### Usage

    perform_permutation_ds(x,y,exon_start,exon_end,n,num_permute)

### Arguments

`x` | Vector for counts of gene in sample 1
`y` | Vector for counts of gene in sample 2
`exon_start` | Start position of the exon in the gene
`exon_end` | End position of the exon in the gene
`n` | Length of the exon
`num_permute` | Number of times the permutation is done

### Value

`shape` | The shape parameter of the Gamma distribution
`scale` | The scale parameter of the Gamma distribution

### Author(s)

Sudeep Srivastava, Liang Chen

### References

Consul, P. C. (1989) Generalized Poisson Distributions: Properties and Applications. New York: Marcel Dekker.
Sudeep Srivastava, Liang Chen A two-parameter generalized Poisson model to improve the analysis of RNA-Seq data Nucleic Acids Research Advance Access published July 29,2010 doi : 10.1093/nar/gkq670

### See Also

`generalized_poisson_likelihood`

### Examples

    x = rpois(100,10);
    y = rpois(100,5);

    exon_start = 1;
    exon_end = 50;
    gamma = perform_permutation_ds(x,y,exon_start,exon_end,50,60);

    cat("Shape parameter = ",gamma$shape,"Scale parameter = ",gamma$scale);

[Package GPseq version 0.5 Index]