Description Usage Arguments Details Value See Also Examples
View source: R/plot.GGInetwork.R
GGI.plot
is a graphical function that allow a heatmap-like or a network-like visualization of a Gene-Gene Interaction study based on a set of genes.
1 2 3 4 5 6 7 | ## S3 method for class 'GGInetwork'
plot(x,method=c("heatmap","network"),threshold=NULL,
col=c("#D6604D","#104E8B"),colbar.width=0.15, title=NULL,hclust.order=FALSE,
use.log=FALSE,NA.col="#D3D3D3",draw.pvals=NULL,
draw.names=NULL,interact=FALSE,
method.adjust=c("none","holm","hochberg","hommel","Bonferroni","BH","BY","fdr"),
genes=seq_len(ncol(x$p.value)), plot.nointer=TRUE, ...)
|
x |
|
method |
Output graph ("heatmap" for heatmap-like, "network" for network-like). Default is |
threshold |
A numeric between 0 and 1. All p-value strictly greater than
that |
method.adjust |
correction method for multiple testing as proposed in the |
genes |
Numeric vector allowing a selection of the genes that will be included in the relations. Default is set to all genes. |
col |
(Only for |
colbar.width |
(Only for |
title |
(Only for |
hclust.order |
(Only for |
use.log |
(Only for |
NA.col |
(Only for |
draw.pvals |
(Only for |
draw.names |
(Only for |
interact |
(Only for |
plot.nointer |
(Only for |
... |
further arguments passed to or from other methods. |
If method=heatmap
, this function draw the upper half of a Gene-Gene Interaction results matrix without its diagonal. A gradient is created from 0 to 1 (by default from crimson to white) and the matrix cells are colored according to the corresponding p-value.
By default, when draw.pvals==NULL
and draw.names==NULL
, p-values and names are drawn to make matrix reading easier, but
in case parameter GGI
is large, p-values (and eventually gene names as
GGI
grows bigger) are not drawn. In that case, the default behavior
of the function is to start an interactive process where user can click on a
cell of interest to open a tooltip displaying which genes are involved in
selected interaction and the p-value of the interaction test. Tooltips can
be closed if user clicks anywhere else than on a cell. This process stops
when the user presses the escape button (or terminates the locator procedure
in general) or when the user clicks on any place other than a cell when no
tooltip window is open.
To improve plot clarity, user may set a threshold above which cells are colored with a distinct color. By default, threshold is set to 1 and no cell is colored differently (as values must be strictly above the threshold).
If method=network
, this function plots a graph representing the significative interactions between genes of a Gene-Gene Interaction study.
The form of the value returned by plot
depends on the class of its argument. See Details.
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 40 41 42 43 44 45 46 | ## Not run:
## Dataset is included in the package
ped <- system.file("extdata/example.ped", package="GeneGeneInteR")
info <- system.file("extdata/example.info", package="GeneGeneInteR")
posi <- system.file("extdata/example.txt", package="GeneGeneInteR")
## Importation of the genotypes
data.imported <- importFile(file=ped, snps=info, pos=posi, pos.sep="\t")
## Filtering of the data: SNPs with MAF < 0.05 or p.value for HWE < 1e-3 or
## call rate < 0.9 are removed.
data.scour <- snpMatrixScour(snpX=data.imported$snpX,genes.info=data.imported$genes.info,
min.maf=0.05,min.eq=1e-3,call.rate=0.9)
## Imputation of the missing genotypes
data.imputed <- imputeSnpMatrix(data.scour$snpX, genes.info = data.scour$genes.info)
## Importation of the phenotype
resp <- system.file("extdata/response.txt", package="GeneGeneInteR")
Y <- read.csv(resp, header=FALSE)
## plot of the interaction between the 17 genes with the CLD method -- can take a few minutes
GGI.res <- GGI(Y=Y, snpX=dta$snpX, genes.info=dta$genes.info,method="CLD")
plot(GGI.res,threshold=0.05)
## Selection of 12 genes among 17
data.select <- selectSnps(data.imputed$snpX, data.imputed$genes.info, c("bub3","CDSN","Gc","GLRX",
"PADI1","PADI2","PADI4","PADI6","PRKD3","PSORS1C1","SERPINA1","SORBS1"))
GGI.res <- GGI(Y=Y, snpX=data.select$snpX, genes.info=data.select$genes.info,method="PCA")
## End(Not run)
## Equivalent importation of the GGI.res object
load(system.file("extdata/GGIRes.Rdata", package="GeneGeneInteR"))
## Plot of the results with default values
plot(GGI.res)
## Plot of the results with a threshold and an ordering of the genes.
## Default method is an heatmap-like representation
plot(GGI.res,threshold=0.1,hclust.order=TRUE)
## Example of network with default threshold 0.05
plot(GGI.res,method="network")
## Example of network with threshold 0.01 where genes with no interaction are not plotted
# (plot.nointer=FALSE)
plot(GGI.res,method="network",threshold=0.1,plot.nointer=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.