plot_regional: Regional Association Plot

Description Usage Arguments Details Value See Also Examples

View source: R/plot_regional.R

Description

A regional association plot is essentially a zoomed-in Manhattan plot, allowing the researcher to look at associations in a small, pre-defined area of the genome.

Usage

1
2
3
4
5
6
7
8
9
plot_regional(dataset,
              chr, start_pos, end_pos,
              plot_cutoff_p = 1,
              name_cutoff_p,
              data_name = NULL,
              save_name = "regional_association_plot",
              save_dir = getwd(),
              header_translations,
              main = "Regional association plot", ...)

Arguments

dataset

data frame containing the SNPs chromosome number, position, p-value and (if a name_cutoff_p is specified) their SNP IDs.

chr

character or numeric value indicating the chromosome of interest.

start_pos, end_pos

Numeric; the position values of the beginning and end of the region of interest.

plot_cutoff_p

numeric - the threshold of p-values to be shown in the QQ & Manhattan plots. Higher (less significant) p-values are not included in the plot. Note that, unlike in QC_GWAS or QC_plots, the default value is 1 (i.e. includes everything), rather than 0.05. Setting it to 0.05 excludes 95% of data-points, which significantly reduces running time and memory usage in larger datasets.

name_cutoff_p

numeric; SNPs with p-values lower than or equal to this value will have their names plotted in the graph. If set to NULL (default), no names will be plotted.

data_name

character string; the subtitle for the plot.

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 (\).

header_translations

translation table for column names. See translate_header for more information. If the argument is left empty, dataset is assumed to use the standard column-names of QC_GWAS.

main, ...

arguments passed to plot.

Details

By default, plot_regional expects dataset to use the standard column-names used by QC_GWAS. A translation table can be specified in header_translations to allow non-standard names. See translate_header for more information.

Value

An invisible NULL.

See Also

For creating a Manhattan plot: QC_plots.

Examples

1
2
3
4
5
6
  data("gwa_sample")

  plot_regional(dataset = gwa_sample,
          chr = 2, start_pos = 55000000, end_pos = 75000000,
          data_name = "QC GWAS sample data",
          save_name = "sample_regional_association")

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.