Description Usage Arguments Value Note See Also Examples
xPierCor
is supposed to calculate correlation between
prioritised genes and user-defined external data.
1 2 3 4 5 6 7 8 9 10 11 |
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 |
a list with two componets:
df_summary
: a data frame of n x 4, where n is the number
of named vectors, and the 4 columns are "name", "cor" (i.e.
"correlation"), "pval" (i.e. p-value), "fdr"
ls_gp
: NULL if the plot is not drawn; otherwise, a list of
'ggplot' objects
none
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.