Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/plot.minPtest.R
plot method for an object of class 'minPtest'. Plots allowing to get an impression of important genes or/and SNPs.
1 2 3 4 5 |
x |
an object of class |
type |
by default, permutation-based p-values for each gene are plotted ( |
level |
a numeric threshold that specifies which genes or/and SNPs are highlighted in the plot. I.e. not depending on the used |
lambda |
only useful for |
gene.name |
only useful for |
sigPch |
Type of plotting for significant permutation-based p-values ( |
nonsigPch |
Type of plotting for non significant permutation-based p-values ( |
pch |
Set type of plotting for both |
sigLty |
only used for |
nonsigLty |
only used for |
lty |
only used for |
sigCol |
Color for significant genes or/and significant SNPs (if neither |
nonsigCol |
Color for non significant genes or/and non significant SNPs (if neither |
col |
Set color for both |
xlab |
xlab (Default: Gene if |
... |
Further arguments for the plot function. |
The function plots either (-log_{10})
transformed permutation-based p-values for each gene or (-log_{10})
transformed marginal p-values for each SNP in a basic scatterplot. The y-axis is (-log_{10})
transformed to obtain a disposition as a Manhattan plot for the points of the marginal p-values of the SNPs. Furthermore, an alternative given by the function is to display the marginal p-values for each SNP and the transformed permutation-based p-values for each gene in a combined plot. The (-log_{10})
transformed marginal p-values for each SNP are plotted as points. In addition, horizontal lines of (-lambda*log_{10})
transformed permutation-based p-values of each gene, covering all SNPs located on that gene, are plotted. The composed plot is indicated by two separated y-axes ((-log_{10}(psnp))
at left hand side and (-lambda*log_{10}(minp))
at the right hand side). After correction for multiple hypothesis testing depending on the level
and the argument adj.method
in the minPtest
function, but not depending on the used type of plot, significant genes and SNPs are by default highlighted in red, i.e. each permutation-based p-value or/and marginal p-value smaller than or equal to the level
, respectively, is highlighted in red.
No value returned
The default for gene.name=FALSE
, used for type="SNP"
and type="both"
, should kept for performance reasons, if a large number of genes are included in the fit. For type="both"
no ylim
should be specified as the plot is indicated by two separate y-axes.
Stefanie Hieke hieke@imbi.uni-freiburg.de
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 | ## Continuing the example from minPtest and generateSNPs:
# generate a data set consisting of 100 subjects and 200 SNPs on 5 genes.
SNP <- c(6,26,54,135,156,186)
BETA <- c(0.9,0.7,1.5,0.5,0.6,0.8)
SNPtoBETA <- matrix(c(SNP,BETA),ncol=2,nrow=6)
colnames(SNPtoBETA) <- c("SNP.item","SNP.beta")
set.seed(191)
sim1 <- generateSNPs(n=100,gene.no=5,block.no=4,block.size=10,p.same=0.9,
p.different=0.75,p.minor=c(0.1,0.4,0.1,0.4),
n.sample=80,SNPtoBETA=SNPtoBETA)
# Cochran Armitage Trend Test without covariates and default permutations.
# Example: Run R sequential
### Seed
set.seed(10)
seed1 <- sample(1:1e7,size=1000)
###
minPtest.object <- minPtest(y=sim1$y, x=sim1$x, SNPtoGene=sim1$SNPtoGene,
seed=seed1)
### Combined plot for permutation-based p-values and marginal p-values.
plot(minPtest.object,type="both",lambda=0.5,gene.name=TRUE)
## Combined plot for permutation-based p-values and marginal
## p-values. Plot permutation-based p-values and significant marginal
## p-values as blue dotted lines and blue points
## plot(minPtest.object,type="both",lambda=0.5,
## gene.name=TRUE,sigCol="blue",sigLty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.