plot_distribution: GWAS effect-Size distribution plot

Description Usage Arguments Details Value See Also Examples

View source: R/plot_distribution.R

Description

This function generates the effect-size distribution boxplot created by QC_series.

Usage

1
2
3
4
5
6
7
plot_distribution(data_table,
                  names = 1:ncol(data_table),
                  include = TRUE,
                  plot_order = 1:ncol(data_table),
                  quantile_lines = FALSE,
                  save_name = "Graph_distribution",
                  save_dir = getwd(), ...)

Arguments

data_table

table with a column of effect sizes for every dataset.

names

vector; the names for the datasets, for use in the graph. Note: it's best to keep these very short, as long labels won't be plotted. The default is the column numbers of data_table.

include

logical vector indicating which columns of data_table are included in the plot. The default setting is to include all.

plot_order

numeric vector determining the left-to-right order of plotting the datasets (columns). QC_series uses the sample size for this.

quantile_lines

logical; should lines representing the median and quartile values be included?

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 boxplot.

Details

When running a QC over multiple files, QC_series collects the values of the effectsize_HQ output of QC_GWAS in a table, which is then passed to this function. If there are significant differences in the distribution of effect sizes, it usually indicates that the datasets did not use the same model or unit.

Value

An invisible NULL.

See Also

For comparing reported to expected effect-size distribution: QC_histogram.

For other plots comparing GWAS results files: plot_precision and plot_skewness.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  data("gwa_sample")

  chunk1 <- gwa_sample$EFFECT[1:1000]
  chunk2 <- gwa_sample$EFFECT[1001:2000]
  chunk3 <- gwa_sample$EFFECT[2001:3000]

  plot_distribution(
    data_table = data.frame(chunk1, chunk2, chunk3),
    names = c("chunk 1", "chunk 2", "chunk 3"),
    quantile_lines = TRUE,
    save_name = "sample_distribution")

Example output

QCGWAS library, version 1.0-8

A quick start guide (and other documentation)
can be found in the 'R/library/QCGWAS/doc' folder

QCGWAS documentation built on May 2, 2019, 3:19 p.m.