Learn R Programming

ddgraph (version 1.16.0)

convertPvalueToColorIndex: Convert P-values to color index...

Description

Convert P-values to color index

Usage

convertPvalueToColorIndex(p.vals, scale="auto", max.color.index, minimal.p.value=1e-04)

Arguments

p.vals
the P-values (after any multiple testing correction)
scale
the color is calculated liked -log10( p.value) * scale, thus scale is used to scale the -log10 to the desired range. Either a number or "auto" for automatic
max.color.index
the maximal color index to return
minimal.p.value
the minimal P-value we accept (since from Monte Carlo we can get 0)

Value

list with following elements: col - the color indexes, zlim - the actual scale range (in log10) over the colors

Details

Convert p values to a color index to color nodes in a graph. The P-values are fit into a range from 1 to max.color.index by applying a scale. Before fitting, P-value are transformed by taking a log10, and a minimal P-value is needed to avoid -Inf results for very small P-values. Scale can either be a number or "auto" in which case color coding is such that all P-values fit into the range.

Examples

Run this code
convertPvalueToColorIndex(c(0.01, 0.2, 0.3), scale="auto", max.color.index=6, minimal.p.value=1e-3)

Run the code above in your browser using DataLab