scatterPlotRACER: Scatter Plot - Regional Association ComparER Plot

Description Usage Arguments Examples

View source: R/scatterPlotRACER.R

Description

This function allows you to create a scatter plot of -log10(P-values) from two association studies.

Usage

1
2
3
scatterPlotRACER(assoc_data1, assoc_data2, chr,
  name1 = "Association Dataset #1", name2 = "Association Dataset #2",
  region_start, region_end, ld_df = NULL, label = FALSE)

Arguments

assoc_data1

required. A dataframe that has columns named POS representing the position of the SNP on the chromosome, LOG10P which contains the -log10(P-values), CHR, which contains the chromosome number, RS_ID, which contains rsIDs for the SNPs in the data frame. If you have processed your data using formatRACER() these columns will be properly labeled.

assoc_data2

required. identifcal in format to assoc_data1

chr

required. chromosome you wish to plot

name1

optional. name of association set 1

name2

optional. name of association set 2

region_start

required. start coordinates on chr to be compared

region_end

required. end coordinates on the chr to be compared

ld_df

required. numeric. 1 or 2, indicating which data frame containing the LD data to use to color the points on the plot

label

optional. If TRUE, will add a label to a the maximum combined LOG10P of the plot

Examples

1
2
3
4
5
6
7
8
9
data("mark3_eqtl")
data("mark3_bmd_gwas")
df1_f = formatRACER(assoc_data = mark3_bmd_gwas, chr_col = 3, pos_col = 4, p_col = 11,rs_col = 2)
df2_f = formatRACER(assoc_data = mark3_eqtl, chr_col = 10, pos_col = 11, p_col = 7,rs_col = 15)
df1_f_ld = ldRACER(assoc_data = df1_f, rs_col = 2, pops = "EUR", lead_snp = "rs11623869")
df2_f_ld = ldRACER(assoc_data = df2_f, rs_col = 15, pops = "EUR", lead_snp = "rs11623869")
scatterPlotRACER(assoc_data1 = df1_f_ld, assoc_data2 = df2_f_ld, chr = 14,
name1 = "Mark3_GWAS", name2 = "Mark3_eQTL",
region_start = 103750000, region_end = 104250000, ld_df = 1)

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