Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/Matrix_eQTL_engine.R
This method plots a histogram or QQ-plot of p-values
for all tests performed by Matrix_eQTL_engine
.
1 2 3 4 5 6 7 8 9 |
x |
An object returned by |
cex |
A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default. |
pch |
Plotting "character", i.e., symbol to use.
See |
xlim |
Set the range of the horisontal axis. |
ylim |
Set the range of the vertical axis. |
main |
Plot title. |
... |
Further graphical parameters passed to
|
The plot type (histogram vs. QQ-plot) is determined by the
pvalue.hist
parameter in the call of
Matrix_eQTL_engine
function.
The method does not return any value.
The sample code below produces figures like these:
Histogram:
QQ-plot:
Andrey A Shabalin andrey.shabalin@gmail.com
The package website: http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/
See Matrix_eQTL_engine
for reference and sample code.
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 47 48 49 50 51 52 53 54 55 | library(MatrixEQTL)
# Number of samples
n = 100
# Number of variables
ngs = 2000
# Common signal in all variables
pop = 0.2*rnorm(n)
# data matrices
snps.mat = matrix(rnorm(n*ngs), ncol = ngs) + pop
gene.mat = matrix(rnorm(n*ngs), ncol = ngs) + pop + snps.mat*((1:ngs)/ngs)^9/2
# data objects for Matrix eQTL engine
snps1 = SlicedData$new( t( snps.mat ) )
gene1 = SlicedData$new( t( gene.mat ) )
cvrt1 = SlicedData$new( )
rm(snps.mat, gene.mat)
# Slice data in blocks of 500 variables
snps1$ResliceCombined(500)
gene1$ResliceCombined(500)
# Produce no output files
filename = NULL # tempfile()
# Perform analysis recording information for a histogram
meh = Matrix_eQTL_engine(
snps = snps1,
gene = gene1,
cvrt = cvrt1,
output_file_name = filename,
pvOutputThreshold = 1e-100,
useModel = modelLINEAR,
errorCovariance = numeric(),
verbose = TRUE,
pvalue.hist = 100)
plot(meh, col="grey")
# Perform analysis recording information for a QQ-plot
meq = Matrix_eQTL_engine(
snps = snps1,
gene = gene1,
cvrt = cvrt1,
output_file_name = filename,
pvOutputThreshold = 1e-6,
useModel = modelLINEAR,
errorCovariance = numeric(),
verbose = TRUE,
pvalue.hist = "qqplot")
plot(meq)
|
Processing covariates
Task finished in 0.001 seconds
Processing gene expression data (imputation, residualization, etc.)
Task finished in 0.019 seconds
Creating output file(s)
Task finished in 0.006 seconds
Performing eQTL analysis
6.25% done, 0 eQTLs
12.50% done, 0 eQTLs
18.75% done, 0 eQTLs
25.00% done, 0 eQTLs
31.25% done, 0 eQTLs
37.50% done, 0 eQTLs
43.75% done, 0 eQTLs
50.00% done, 0 eQTLs
56.25% done, 0 eQTLs
62.50% done, 0 eQTLs
68.75% done, 0 eQTLs
75.00% done, 0 eQTLs
81.25% done, 0 eQTLs
87.50% done, 0 eQTLs
93.75% done, 0 eQTLs
100.00% done, 0 eQTLs
No significant associations were found.
Task finished in 0.655 seconds
Processing covariates
Task finished in 0 seconds
Processing gene expression data (imputation, residualization, etc.)
Task finished in 0.01 seconds
Creating output file(s)
Task finished in 0.013 seconds
Performing eQTL analysis
6.25% done, 8 eQTLs
12.50% done, 10 eQTLs
18.75% done, 10 eQTLs
25.00% done, 11 eQTLs
31.25% done, 14 eQTLs
37.50% done, 23 eQTLs
43.75% done, 23 eQTLs
50.00% done, 25 eQTLs
56.25% done, 25 eQTLs
62.50% done, 26 eQTLs
68.75% done, 32 eQTLs
75.00% done, 35 eQTLs
81.25% done, 35 eQTLs
87.50% done, 37 eQTLs
93.75% done, 38 eQTLs
100.00% done, 47 eQTLs
Task finished in 0.605 seconds
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.