formatRACER: Formating Data for Regional Association ComparER

View source: R/formatRACER.R

formatRACERR Documentation

Formating Data for Regional Association ComparER

Description

This group of functions 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. This function carries out the formatting necessary for your association data to be compatible with the plotting functions.

Usage

formatRACER(assoc_data, chr_col, pos_col, p_col = NULL,
  log10p_col = NULL, ld_col = NULL, rs_col = NULL)

Arguments

assoc_data

required. A dataframe that has columns containing the chromosome, physical position, and p-values or -log10(p-values) of the association, and can optionally have columns containing R2 information for LD in the region, or rsID numbers for the associated SNPs.

chr_col

required. numeric. index of column in assoc_data containing chromosome information.

pos_col

required. numeric. index of column in assoc_data containing genomic position information.

p_col

required, if no log10p_col column specified. numeric. index of column in assoc_data containing p-values.

log10p_col

required, if no p_col specified. numeric. index of column in assoc_data containing -log10(p-value)s.

ld_col

optional. numeric. Required if you want to use the LD data in your data set in your plot, index of column in assoc_data containing LD information, e.g. R2 or D' values

rs_col

optional. numeric. Required if you want to use the use ldRACER to pull LD information from the 1000 genomes phase III project, or if you want to make a scatter comparison plot

Examples

data(mark3_bmd_gwas)
head(formatRACER(assoc_data = mark3_bmd_gwas, chr_col = 3, pos_col = 4, p_col = 11, rs_col = 2))

oliviasabik/mirrorplot documentation built on Dec. 20, 2024, 11:11 p.m.