xMEplotR Documentation

Function to visualise eQTL analysis using violin plot

Description

xMEplot is supposed to visualise eQTL analysis using violin plot.

Usage

xMEplot(gene = 580484, snp = "rs13182119", summary, expression,
genotype, contexts = c("CD14", "LPS2", "LPS24", "IFN", "Bcell", "NK",
"Neutrophil", "Monocyte", "shared_CD14", "shared_IFN", "shared_LPS2",
"shared_LPS24"), colormap = "sci_jco", ncolumns = NULL)

Arguments

gene

an integer specifying ArrayAddress or a character specifying a gene symbol (possibly several ArrayAddress queried returning a list of ggplot objects)

snp

a dbSNP

summary

a data frame storing eQTL summary statistics. It must contain columns 'context', 'gene', 'snps', 'FDR', 'statistic'

expression

a data matrix/frame with genes in rows and samples in columns

genotype

a data (sparse) matrix/frame with SNPs in rows and samples in columns

contexts

a vector specifying contexts included

colormap

the colormap ("sci_jco")

ncolumns

an integer specifying the number of columns for contexts. By defaul, it is NULL (decided on according to the number of contexts that will be visualised)

Value

a ggplot object (or a list of ggplot objects)

Note

none

See Also

xME

Examples

## Not run: 
# Load the library
library(XGR)
library(ggpubr)
summary <- xRDataLoader('JK_cohort_xMEdb',
RData.location=RData.location)
genotype <- xRDataLoader('JK_cohort_genotype',
RData.location=RData.location)
expression <- xRDataLoader('JK_cohort_expression_cis',
RData.location=RData.location)
gp <- xMEplot(gene="MED7", snp='rs13182119', summary, expression,
genotype,
contexts=c("CD14","LPS2","LPS24","IFN","Bcell","NK","Neutrophil","Monocyte"))

## End(Not run)