xPierCor: Function to calculate correlation between prioritised genes...

Description Usage Arguments Value Note See Also Examples

View source: R/xPierCor.r

Description

xPierCor is supposed to calculate correlation between prioritised genes and user-defined external data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
xPierCor(
pNode,
list_vec,
method = c("pearson", "spearman"),
pvalue.type = c("nominal", "empirical"),
seed = 825,
nperm = 2000,
p.adjust.method = c("BH", "BY", "bonferroni", "holm", "hochberg",
"hommel"),
plot = FALSE
)

Arguments

pNode

an object of class "pNode" (or "sTarget" or "dTarget"). Alternatively, it can be a data frame with two columns ('name' and 'priority')

list_vec

a named vector containing numeric values for genes (gene symbols). Alternatively it can be a list of named vectors

method

the method used to calcualte correlation. It can be 'pearson' for Pearson's correlation or 'spearman' for Spearman rank correlation

pvalue.type

the type of the p-value calcualted. It can be 'nominal' for nominal p-value or 'empirical' for empirical p-value

seed

an integer specifying the seed

nperm

the number of random permutations

p.adjust.method

the method used to adjust p-values. It can be one of "BH", "BY", "bonferroni", "holm", "hochberg" and "hommel". The first two methods "BH" (widely used) and "BY" control the false discovery rate (FDR: the expected proportion of false discoveries amongst the rejected hypotheses); the last four methods "bonferroni", "holm", "hochberg" and "hommel" are designed to give strong control of the family-wise error rate (FWER). Notes: FDR is a less stringent condition than FWER

plot

logical to indicate whether scatter plot is drawn

Value

a list with two componets:

Note

none

See Also

xCorrelation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
## Not run: 
# a) provide the seed nodes/genes with the weight info
## load ImmunoBase
ImmunoBase <- xRDataLoader(RData.customised='ImmunoBase',
RData.location=RData.location)
## get genes within 500kb away from AS GWAS lead SNPs
seeds.genes <- ImmunoBase$AS$genes_variants
## seeds weighted according to distance away from lead SNPs
data <- 1- seeds.genes/500000

# b) perform priority analysis
pNode <- xPierGenes(data=data, network="PCommonsDN_medium",restart=0.7,
RData.location=RData.location)

# c) do correlation
data <- pNode$priority$priority[1:100]
name(data) <- pNode$priority$name[1:100]
ls_res <- xPierCor(pNode, data, method="pearson",
pvalue.type="empirical", nperm=2000, plot=TRUE)

## End(Not run)

Pi documentation built on Nov. 29, 2021, 3 p.m.