# NOT RUN {
# Load the library
library(XGR)
# }
# NOT RUN {
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) prepare a data frame
df <- data.frame(name=names(data), value=data, stringsAsFactors=FALSE)
# c) do correlation
ls_res <- xCorrelation(df, data, method="pearson", p.type="empirical",
nperm=2000, plot=TRUE)
# }
Run the code above in your browser using DataLab