# NOT RUN {
# Load the XGR package and specify the location of built-in data
library(XGR)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata/"
# }
# NOT RUN {
data(Haploid_regulators)
## IRF1 regulators
data <- subset(Haploid_regulators, Phenotype=='IRF1')
xGraphML2AA(query="AA:hsa04630", RData.location=RData.location,
color.gene='#dde8f1',size.gene=11)
## load GWAS genes
GWAS_Gene <- xRDataLoader(RData.customised='GWAS_Gene',
RData.location=RData.location)
data <- GWAS_Gene %>% filter(Odds_Ratio!='NULL',Disease_ID=='RA')
%>%
transmute(label=Symbol,lfc=log2(as.numeric(Odds_Ratio)),fdr=Pvalue)
%>% group_by(label) %>% summarise(lfc=max(lfc),fdr=min(fdr))
## manual one (the same as curation='any')
xGraphML2AA(data, query="AA:hsa04630", curation='manual',
node.label="label", node.color="lfc", node.highlight='fdr',
node.highlight.cutoff=5e-8, filename='xGraphML2AA',
legend.title='log2(Odds ratio)', zlim=c(-1,1),
RData.location=RData.location)
## automatic one
xGraphML2AA(data, query="AA:hsa04630", curation='automatic',
node.label="label", node.color="lfc", node.highlight='fdr',
node.highlight.cutoff=5e-8, filename='xGraphML2AA',
legend.title='log2(Odds ratio)', zlim=c(-1,1),
RData.location=RData.location)
## key words
xGraphML2AA(data, query="Asthma", curation='any', node.label="label",
node.color="lfc", node.highlight='fdr', node.highlight.cutoff=5e-8,
filename='xGraphML2AA', RData.location=RData.location,
legend.title='log2(Odds ratio)', zlim=c(-1,1))
# }
Run the code above in your browser using DataLab