ct.rankSimple: Rank Signals in a Simplified Pooled Screen Result Object

View source: R/fileutilities.R

ct.rankSimpleR Documentation

Rank Signals in a Simplified Pooled Screen Result Object

Description

This function takes in a supplied results data.frame, optionally transforms it into a 'simplifiedResult', and returns the ranks of the target-level signals.

Usage

ct.rankSimple(df, top = c("enrich", "deplete"))

Arguments

df

A results data.frame, in either raw or simplified form. Will be converted to simplified form if necessary.

top

Determines the directionality of the ranking. 'enrich' defines ranks from the most enriched to the most depleted target; 'deplete' does the opposite

Value

A numeric vector of ranks, with length equal to the number of rows in the simplified data.frame.

Author(s)

Russell Bainer

Examples

data('resultsDF')
df.simple <- ct.simpleResult(resultsDF) 
sr <- ct.rankSimple(resultsDF)
all((df.simple$best.p[sr == 1] == 0), (df.simple$direction[sr == 1] == 'enrich'))

sr <- ct.rankSimple(resultsDF, 'deplete')
all((df.simple$best.p[sr == 1] == 0), (df.simple$direction[sr == 1] == 'deplete'))

OscarBrock/gCrisprTools documentation built on Oct. 25, 2022, 7:29 a.m.