Learn R Programming

sgRSEA (version 0.1)

sgRSEA: Perform a permutation test which computes gene scores and their significance

Description

Given normalized sgRNA read counts under treatment and control, this function computes sgRNA and gene level statistics. P-values of the gene scores are calculated by a permutation method to identify genes where some or all of the sgRNA read counts in treatment are significantly higher/lower compared to control, that is, genes with positive/negative treatment effect.

Usage

sgRSEA(dat, multiplier = 50, r.seed = NULL)

Arguments

dat
A data.frame where rows represent sgRNAs and columns are the sgRNA name (1st), targeting gene name (2nd), and sgRNA read counts under treatment (3rd) and control (4th) condition.
multiplier
The number of permutations. The default value is $R=50$. A normalized null distribution for the gene score is constructed based on $R \times$(total number of genes) permutation gene scores.
r.seed
A random seed to control the randomness of the permutation.

Value

  • Returns a list containing:
  • gene.posTest results for the alternative hypothesis of positive treatment effect. Rows represent genes and columns are the numbers of sgRNAs within genes, normalized gene scores, P-values, adjusted P-values (FDRs) by the Bejamini-Hochberg method, and ranks of genes.
  • gene.negTest results for the alternative hypothesis of negative treatment effect.
  • stdTmatNormalized observed gene scores.
  • stdNullTmatNormalized permutation gene scores.
  • TmatObserved gene scores.
  • NullTmatPermutation gene scores.
  • sgRNA.statThe input data.frame added with the sgRNA/gene scores and the numbers of sgRNAs within genes.

Details

sgRNA level statistics within genes are summarized by using the maxmean statistic (Efron and Tibshirani, 2007).

References

Efron, B. and Tibshirani, R. (2007). On testing the significance of sets of genes. The Annals of Applied Statistics, 1(1):107--129. Noh, J., Chen, B., Xiao, G. and Xie, Y. (2015+). A robust test for identification of essential genes from CRISPR/Cas9 knockout screens.

See Also

UQnormalize, melanoma808, plotScores, plotNScores

Examples

Run this code
data(melanoma808)
dat = UQnormalize(melanoma808, trt=c('PLX7_R1','PLX7_R2'), ctrl=c('D7_R1','D7_R2'))
results = sgRSEA(dat=dat, multiplier=30)
##	To see the top 10 genes with positive/negative treatment effect
results$gene.pos[1:10,]
results$gene.neg[1:10,]

##	histograms of permutation and observed gene scores
##	plotNScores(results)
##	plotScores(results, m=8)

Run the code above in your browser using DataLab