Description Usage Arguments Value Note See Also Examples
xGraphML2AA
is supposed to generate a graphml file from a
pathway upon query. If data is provided, pathway gene members are
color-coded.
1 2 3 4 5 6 7 8 9 10 11 12 | xGraphML2AA(data = NULL, org = c("human", "mouse"),
query = "AA:hsa04672", curation = c("manual", "automatic", "any"),
node.label = "label", node.color = "lfc",
colormap = "deepskyblue-lightyellow-darkorange", ncolors = 64,
nlegend = 9, zlim = NULL, legend.title = "",
title.thispath = NULL, node.tooltip = "tooltip",
node.highlight = "fdr", node.highlight.cutoff = 0.05,
edge.color = "#00000033", edge.width = 1, color.gene = "#dddddd",
color.thispath = "#dddddd", color.otherpath = "#eeeeee",
size.gene = 10, size.gene.found = 11, size.gene.highlight = 12,
filename = "xGraphML2AA", verbose = TRUE,
RData.location = "http://galahad.well.ox.ac.uk/bigdata")
|
data |
a data frame |
org |
a character specifying an organism. Currently supported organisms are 'human' and 'mouse' |
query |
the identity of a pathway in query. The full list of pathways can be found at http://www.genome.jp/kegg-bin/show_organism?menu_type=pathway_maps&org=hsa for human and at http://www.genome.jp/kegg-bin/show_organism?menu_type=pathway_maps&org=mmu for mouse. For example, 'AA:hsa04672' for 'NOD-like receptor signaling pathway', where the prefix 'AA:' can be ignored. Alternatively, it can be key words describing the pathway |
curation |
the type of curation. It can be one of "manual" (the manual one 'AA' followed by the semi-manual one 'AT'), "automatic" (only the automatic one) or "any" (first the manual one then the automatic one) |
node.label |
a character specifying which column used for node labelling. By default, it is 'label' |
node.color |
a character specifying which column used for node coloring. By default, it is 'lfc' |
colormap |
short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta), and "ggplot2" (emulating ggplot2 default color palette). Alternatively, any hyphen-separated HTML color names, e.g. "lightyellow-orange" (by default), "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names |
ncolors |
the number of colors specified over the colormap |
nlegend |
the number of colors specified in the legend. By default, it is 11 |
zlim |
the minimum and maximum z/patttern values for which colors should be plotted, defaulting to the range of the finite values of z. Each of the given colors will be used to color an equispaced interval of this range. The midpoints of the intervals cover the range, so that values just outside the range will be plotted |
legend.title |
the legend title. By default, it is ” |
title.thispath |
the appended title for this pathway. By default, it is NULL |
node.tooltip |
a character specifying which column used for node tooltip. By default, it is 'tooltip'. If not found, it will be 'Symbol-Name-Color' |
node.highlight |
a character specifying which column used for node highlighting. By default, it is 'fdr'. If so, those highlighted will have bold and larger labels |
node.highlight.cutoff |
a numeric specifying the cutoff for node highlighting. By default, it is 0.05 meaninght those less than this cutoff will be highlighted |
edge.color |
a character specifying the edge colors. By default, it is '#00000033' |
edge.width |
the edge width. By default, it is 1 |
color.gene |
a character specifying the gene node colors. By default, it is '#dddddd' |
color.thispath |
a character specifying the color for this pathway node. By default, it is '#dddddd' |
color.otherpath |
a character specifying the color for other pathway nodes. By default, it is '#eeeeee' |
size.gene |
an integer character specifying the gene label fontsize. By default, it is 10 |
size.gene.found |
an integer character specifying the label fontsize for genes found/matched. By default, it is 11 |
size.gene.highlight |
an integer character specifying the label fontsize for genes highlighted. By default, it is 12 |
filename |
the without-extension part of the name of the output file. By default, it is 'xGraphML2AA' |
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 |
invisible (a string storing graphml-formatted content). If the filename is not NULL, a graphml-formatted file is also output.
none
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Load the XGR package and specify the location of built-in data
library(XGR)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata/"
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 %>% dplyr::filter(Odds_Ratio!='NULL' &
Disease_ID=='RA') %>% dplyr::transmute(label=Symbol,
lfc=log2(as.numeric(Odds_Ratio)), fdr=Pvalue) %>%
dplyr::group_by(label) %>% dplyr::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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.