Description Usage Arguments Examples
View source: R/mirrorPlotRACER.R
This function allows you to creat a plot of -log10(P-values) for two sets of association data. Mirror plots illustrate the two associations on a common x-axis, with the first association inverted, mirroring the two associations against one another.
1 2 3 4 5 |
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 LD information. If your data set has been processed using the formatRACER function and the ldRACER function, these columns will be appropriately named in your data. |
assoc_data2 |
required. identifcal in format to assoc_data1 |
chr |
required. chromosome you wish to plot |
build |
optional. indicates the genome build to use to plot the genes below the association plot. default = "hg19", but can be changed to "hg38" |
set |
optional. default = "protein_coding", however can be set to "all" to plot all RNAs in the genome |
name1 |
optional. name of association set 1 |
name2 |
optional. name of association set 2 |
plotby |
required. "coord", "gene", or "snp". Which parameter to use to determine the reigon to be plotted. |
gene_plot |
optional. If "gene" selected for plotby, then plot will be +/- 50kb of gene, should be a human gene symbol |
snp_plot |
optional. If "snp" selected for plotby, then plot will be +/- 50kb of snp |
start_plot |
optional. If "coord" selected for plotby, then this will be lower bound of x-axis |
end_plot |
optional. 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. Labels both plots. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(mark3_bmd_gwas)
data(mark3_eqtl)
mark3_bmd_gwas_f = RACER::formatRACER(assoc_data = mark3_bmd_gwas, chr_col = 3,
pos_col = 4, p_col = 11)
mark3_eqtl_f = RACER::formatRACER(assoc_data = mark3_eqtl, chr_col = 10,
pos_col = 11, p_col = 7)
mark3_bmd_gwas_f_ld = RACER::ldRACER(assoc_data = mark3_bmd_gwas_f,
rs_col = 2, pops ="EUR", lead_snp = "rs11623869")
mark3_eqtl_f_ld = RACER::ldRACER(assoc_data = mark3_eqtl_f,
rs_col = 15, pops = "EUR", lead_snp = "rs11623869")
mirrorPlotRACER(assoc_data1 = mark3_bmd_gwas_f_ld, assoc_data2 = mark3_eqtl_f_ld,
chr = 14, plotby = "gene", gene_plot = "MARK3")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.