Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot_precision

GWAS Precision Plot


Description

This function generates the precision plot created by QC_series. Precision is defined as:

1 / median standard-error.

Usage

plot_precision(SE, N,
               labels = NULL,
               save_name = "Graph_precision",
               save_dir = getwd(), ...)

Arguments

SE, N

numeric vectors containing the median standard-error and sample size of the datasets, respectively.

labels

vector containing names or other identifiers for the datapoints, to be plotted in the graph. Note: it's best to keep these very short. To disable labeling, set to NULL (default).

save_name

character string; the filename, without extension, for the graph file.

save_dir

character string; the directory where the graph is saved. Note that R uses forward slash (/) where Windows uses backslash (\).

...

arguments passed to plot.

Details

When running a QC over multiple files, QC_series collects the values of the SE_HQ_median and sample_size_HQ outputs of QC_GWAS in a table, which is then passed to this function to convert it to a plot.

The plot is to provide a visual estimate whether the standard errors are within the expected range. As sample size increases, the median standard error is expected to decrease, so the plot should show a linear relation.

Value

An invisible NULL.

See Also

Examples

value_SE <- c(0.078, 0.189, 0.077, 0.040, 0.021, 0.072)
  value_N <- c(870, 830, 970, 690, 2200, 870)
  value_labels <- paste("cohort", 1:6)
  
  plot_precision(SE = value_SE, N = value_N,
                 labels = value_labels,
                 save_name = "sample_precision")

QCGWAS

Quality Control of Genome Wide Association Study results

v1.0-8
GPL (>= 3)
Authors
Peter J. van der Most and Ilja M. Nolte
Initial release
2014-02-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.