xPierSMRheatmapR Documentation

Function to visualise SMR evidence using heatmap

Description

xPierSMRheatmap is supposed to visualise SMR evidence using heatmap. It returns an object of class "ggplot".

Usage

xPierSMRheatmap(data, xTarget, type = c("Gene", "Gene_SNP"),
colormap = "steelblue-lightyellow-orange", zlim = c(-0.5, 0.5))

Arguments

data

an input vector containing gene symbols

xTarget

a "dTarget" or "sTarget" object with the componet 'list_pNode' related to 'eGene' predictors. Alternatively, it can be a data frame with columns ('Context','mode','probeID','Gene','ProbeChr','Probe_bp','topSNP','topSNP_chr','topSNP_bp','A1','A2','b_GWAS','b_eQTL','b_SMR','p_GWAS','p_eQTL','p_SMR','fdr_SMR')

type

the type of the heatmap. It can be "Gene" (gene-centric heatmap) or "Gene_SNP" (heatmap for the gene-snp pair)

colormap

short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), and "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta). Alternatively, any hyphen-separated HTML color names, e.g. "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names

zlim

the minimum and maximum z values for which colors should be plotted

Value

an object of class "ggplot" appended with 'mat' (the matrix colored by 'b_SMR') and 'df' (a data frame with columns 'priority','code','Context','mode','probeID','Gene','ProbeChr','Probe_bp','topSNP','topSNP_chr','topSNP_bp','A1','A2','b_GWAS','b_eQTL','b_SMR','p_GWAS','p_eQTL','p_SMR','fdr_SMR','direction_GWAS','direction_eQTL','direction_SMR', and optionally, 'p_HEIDI','fdr_HEIDI','nsnp_HEIDI'). Only those fdr_SMR<0.05 (and fdr_HEIDI>=0.05) are visualised.

Note

none

See Also

xPierSMRheatmap

Examples

## Not run: 
# Load the library
library(Pi)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata/"

gp <- xPierSMRheatmap(data, dTarget)

## End(Not run)