plotTrait: Plot all correlations with a specific trait

Description Usage Arguments Value See Also Examples

Description

Given the atlas of genetic correlations or a valid subset, plus a trait name, this function plots all correlations of the specified trait and all other traits in the correlation set. The plotting data (including confidence intervals) is returned invisibly.

Usage

1
2
plotTrait(trait, data = gcatlas, conf = 0.95, sort = TRUE,
  rlim = c(-0.5, 1))

Arguments

trait

The name of the trait for which to plot the correlations; can be abbreviated, but must be unique.

data

Either the full atlas of genetic correlations (gcatlas, the default), or a valid subset, from which to draw correlations.

conf

The confidence level for the confidence intervals

sort

Logical switch indicating whether to sort the traits by by correlation (default: TRUE)

rlim

Cutoff values for plotting the confidence limits, so that wide confidence limits do not dominate the plot

Value

The plot as an ggplot2 object. Note that the plotting data can be easily extracted for further processing, see Examples.

See Also

gcatlas, sel_trt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Default invocation
plotTrait("ADHD")

## Subset of the full atlas
plotTrait("Alz", sel_trt("Obesity"))

## Extract the plotting data
x = plotTrait("Cor")
x$data
## Useful extra attributes
attributes(x$data)

alexploner/GeneCorrAtlas documentation built on May 12, 2019, 2:32 a.m.