plot_precision: GWAS Precision Plot

Description Usage Arguments Details Value See Also Examples

View source: R/plot_precision.R

Description

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

1 / median standard-error.

Usage

1
2
3
4
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

plot_distribution and plot_skewness.

Examples

1
2
3
4
5
6
7
  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 documentation built on May 2, 2019, 3:19 p.m.