xSNP2eGenes: Function to define eQTL genes given a list of SNPs or a...

Description Usage Arguments Value Note See Also Examples

View source: R/xSNP2eGenes.r

Description

xSNP2eGenes is supposed to define eQTL genes given a list of SNPs or a customised eQTL mapping data. The eQTL weight is calcualted as Cumulative Distribution Function of negative log-transformed eQTL-reported signficance level.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
xSNP2eGenes(data, include.eQTL = c(NA, "JKscience_CD14",
"JKscience_LPS2",
"JKscience_LPS24", "JKscience_IFN", "JKscience_TS2A",
"JKscience_TS2A_CD14",
"JKscience_TS2A_LPS2", "JKscience_TS2A_LPS24", "JKscience_TS2A_IFN",
"JKscience_TS2B", "JKscience_TS2B_CD14", "JKscience_TS2B_LPS2",
"JKscience_TS2B_LPS24", "JKscience_TS2B_IFN", "JKscience_TS3A",
"JKng_bcell",
"JKng_bcell_cis", "JKng_bcell_trans", "JKng_mono", "JKng_mono_cis",
"JKng_mono_trans", "JKpg_CD4", "JKpg_CD4_cis", "JKpg_CD4_trans",
"JKpg_CD8",
"JKpg_CD8_cis", "JKpg_CD8_trans", "JKnc_neutro", "JKnc_neutro_cis",
"JKnc_neutro_trans", "WESTRAng_blood", "WESTRAng_blood_cis",
"WESTRAng_blood_trans", "JK_nk", "JK_nk_cis", "JK_nk_trans",
"GTEx_V4_Adipose_Subcutaneous", "GTEx_V4_Artery_Aorta",
"GTEx_V4_Artery_Tibial", "GTEx_V4_Esophagus_Mucosa",
"GTEx_V4_Esophagus_Muscularis", "GTEx_V4_Heart_Left_Ventricle",
"GTEx_V4_Lung", "GTEx_V4_Muscle_Skeletal", "GTEx_V4_Nerve_Tibial",
"GTEx_V4_Skin_Sun_Exposed_Lower_leg", "GTEx_V4_Stomach",
"GTEx_V4_Thyroid",
"GTEx_V4_Whole_Blood", "eQTLdb_NK", "eQTLdb_CD14", "eQTLdb_LPS2",
"eQTLdb_LPS24", "eQTLdb_IFN"), eQTL.customised = NULL,
cdf.function = c("empirical", "exponential"), plot = FALSE,
verbose = TRUE, RData.location =
"http://galahad.well.ox.ac.uk/bigdata")

Arguments

data

a input vector containing SNPs. SNPs should be provided as dbSNP ID (ie starting with rs). Alternatively, they can be in the format of 'chrN:xxx', where N is either 1-22 or X, xxx is number; for example, 'chr16:28525386'

include.eQTL

genes modulated by eQTL (also Lead SNPs or in LD with Lead SNPs) are also included. By default, it is 'NA' to disable this option. Otherwise, those genes modulated by eQTL will be included. Pre-built eQTL datasets are detailed in the section 'Note'

eQTL.customised

a user-input matrix or data frame with 3 columns: 1st column for SNPs/eQTLs, 2nd column for Genes, and 3rd for eQTL mapping significance level (p-values or FDR). It is designed to allow the user analysing their eQTL data. This customisation (if provided) has the high priority over built-in eQTL data.

cdf.function

a character specifying a Cumulative Distribution Function (cdf). It can be one of 'exponential' based on exponential cdf, 'empirical' for empirical cdf

plot

logical to indicate whether the histogram plot (plus density or CDF plot) should be drawn. By default, it sets to false for no plotting

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display

RData.location

the characters to tell the location of built-in RData files. See xRDataLoader for details

Value

a data frame with following columns:

Note

Pre-built eQTL datasets are described below according to the data sources.
1. Context-specific eQTLs in monocytes: resting and activating states. Sourced from Science 2014, 343(6175):1246949

2. eQTLs in B cells. Sourced from Nature Genetics 2012, 44(5):502-510

3. eQTLs in monocytes. Sourced from Nature Genetics 2012, 44(5):502-510

4. eQTLs in neutrophils. Sourced from Nature Communications 2015, 7(6):7545

5. eQTLs in NK cells. Unpublished

6. Tissue-specific eQTLs from GTEx (version 4; incuding 13 tissues). Sourced from Science 2015, 348(6235):648-60

7. eQTLs in CD4 T cells. Sourced from PLoS Genetics 2017

8. eQTLs in CD8 T cells. Sourced from PLoS Genetics 2017

9. eQTLs in blood. Sourced from Nature Genetics 2013, 45(10):1238-1243

See Also

xRDataLoader

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# Load the library
library(Pi)

## End(Not run)

RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev"
# a) provide the SNPs with the significance info
## get lead SNPs reported in AS GWAS and their significance info (p-values)
#data.file <- "http://galahad.well.ox.ac.uk/bigdata/AS.txt"
#AS <- read.delim(data.file, header=TRUE, stringsAsFactors=FALSE)
ImmunoBase <- xRDataLoader(RData.customised='ImmunoBase',
RData.location=RData.location)
gr <- ImmunoBase$AS$variants
AS <- as.data.frame(GenomicRanges::mcols(gr)[, c('Variant','Pvalue')])

## Not run: 
# b) define eQTL genes
df_eGenes <- xSNP2eGenes(data=AS[,1], include.eQTL="JKscience_TS2A",
RData.location=RData.location)

## End(Not run)

Pi documentation built on May 31, 2017, 3:07 a.m.