plotPairedTraits: Scatterplot of genetic correlations for two traits

Description Usage Arguments Value See Also Examples

Description

Given the atlas of genetic correlations or a valid subset, plus two trait names, this function produces a scatterplot of the genetic correlations of one trait against the genetic correlations of the other. Correlations that are statistically significant at a given level can be highlighted.

Usage

1
plotPairedTraits(xtr, ytr, data = gcatlas, co = NA)

Arguments

xtr, ytr

The names of the traits to be displayed on the x- and y-axis; 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.

co

A numerical cutoff below which p-values are considered statistically significant. NA (the default) indicates that no highlighting should take place.

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: no highlighting
plotPairedTraits("ADHD", "Alz")

## Correlations with p-values less than 0.01 are highlighted
plotPairedTraits("ADHD", "Alz", co=0.01)

## Extract the data
x = plotPairedTraits("Cor", "T2D", co=0.05)
x$data
## Useful extra attributes
attributes(x$data)

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