gRNA signal aggregation via RRAa, optionally using multiple cores.

Share:

Description

This is a wrapper function implementing the RRAalpha p-value aggregation algorithm. Takes in a set of gRNA rank scores (formatted as a single-column numeric matrix with row.names indicating the guide names) and a list object of gRNA annotations (names are the gene targets, and each element of the list contains a vector of the corresponding guide names). The rank scores are converted to gene-level statistics that are thenm transformed into empirical p-values by permutation.

Usage

1
2
ct.RRAaPvals(p, g.key, alpha, permute, multicore = TRUE, core.perm = 100,
  permutation.seed = NULL)

Arguments

p

A single column matrix of ranking scores, with row.names indicating the gRNA labels

g.key

An annotation data frame of gRNAs, minimally containing a factorized "geneSymbol" column indicating the target names. This is typically generated by calling the ct.buildKeyFromAnnotation() function.

alpha

The alpha cutoff parameter, corresponding to the P-value threshold or fold change proportion at which gRNAs should no longer be considered to be differentially expressed. Alternatively, this can be provided as a logical vector of the same length as the number of rows in p, containing only TRUE and FALSE elements indicating whether the element should be included during the aggeregation step.

permute

Number of permutations to be used during empirical p-value estimation. In a multicore context the exact number of permutations may vary somewhat to accomodate the corresponding system archetecture but should be close to the specified permutation number.

multicore

Logical indicating whether to use multiple cores to calculate p-values.

core.perm

Maximum number of permutations to run on each core (only relevant when multicore is TRUE).

permutation.seed

numeric seed for permutation reproducibility. Default: NULL means to not set any seed.

Value

A named list of target-level empirical P-values.

Author(s)

Russell Bainer

Examples

1
2
3
4
data('fit')
data('ann')
genePvals <- ct.RRAaPvals(fit$p.value, ann, alpha = 0.1, permute = 100, multicore = FALSE)
genePvals <- ct.RRAaPvals(fit$p.value, ann, alpha = 0.1, permute = 100, multicore = TRUE, core.perm = 10)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.