singlePlotRACER: Single Regional Association Plot Function

Description Usage Arguments Examples

View source: R/singlePlotRACER.R

Description

This function allows you to creat a plot of -log10(P-values) of an association study by their genomic position, for example, the results of a GWAS or eQTL study. Be sure your input association data has been formatted using formatRACER. If you want to include linkage disequilibirum data, you can use the ldRACER function to use the 1000 genomes project to calculate LD for your data.

Usage

1
2
3
singlePlotRACER(assoc_data, chr, build = "hg19",
  set = "protein_coding", plotby, gene_plot = NULL, snp_plot = NULL,
  start_plot = NULL, end_plot = NULL, label_lead = FALSE)

Arguments

assoc_data

required. A dataframe that has been produced by formatRACER and has columns named CHR, POS

chr

required. numeric. chromosome to plot

build

optional. default = "hg19", can also optionally be set to "hg38", depending on the build of your input data

set

optional. default = "protein_coding", however can be set to "all" to plot all RNAs in the genome

plotby

required. "coord", "gene", or "snp". Which parameter to use to determine the reigon to be plotted.

gene_plot

optional. Required if "gene" selected for plotby, then plot will be +/- 50kb of gene

snp_plot

optional. Required if "snp" selected for plotby, then plot will be +/- 50kb of snp

start_plot

optional. Required if "coord" selected for plotby, then this will be lower bound of x axis

end_plot

optional. Required if "coord" selected for plotby, then this will be upper bound of x axis

label_lead

optional. default = FALSE, set = TRUE if you wish to add a label to your graph of the SNP used to calculate LD. If the SNP used to calculate LD is not in your data set, the SNP with the greatest -LOG10(P) will be labeled.

Examples

1
2
3
4
5
6
7
data(mark3_bmd_gwas)
mark3_bmd_gwas_f = formatRACER(assoc_data = mark3_bmd_gwas, chr_col = 3,
pos_col = 4, p_col = 11)
mark3_bmd_gwas_f_ld = ldRACER(assoc_data = mark3_bmd_gwas_f,
rs_col = 2, pops = c("EUR"), lead_snp = "rs11623869")
singlePlotRACER(assoc_data = mark3_bmd_gwas_f_ld, chr = 14,
build = "hg19", plotby = "coord", start_plot = 103500000, end_plot = 104500000)

oliviasabik/RACER documentation built on Aug. 12, 2020, 4:04 p.m.