Description Usage Arguments Value Note Author(s) See Also Examples
The function creates a graphical summary of the Interval-Wise Testing results. In particular, it draws a heatmap of the adjusted p-value curves at the chosen scale thresholds, grouped by the region datasets tested (test) or by the features tested (feature). Different raws in the heatmap correspond to different features (when grouping by locations) or to different tests (when grouping by feature). Color intensity is proportional to -log(p-value), i.e. darker colors correspond to lower p-values. Red means that the test statistics is higher in the first dataset tested than in the second one (or is positive in one sample test), while blue means that the test statistics is lower in the first datset tested than in the second one (or is negative in one sample test).
1 2 3 4 5 6 | plotSummary(regionsFeatures, alpha=0.05, only_significant=FALSE,
scale_threshold=NULL, nlevel=100, groupby='test',
test=1:nTests(regionsFeatures), gaps_tests=NULL,
id_features_subset=idFeaturesTest(regionsFeatures), gaps_features=NULL,
ask=TRUE, filenames=NA, align_lab=NA, cellwidth=NA, cellheight=NA,
xlab='Windows', ylab=ifelse(groupby=='test','Features','Tests'), ...)
|
regionsFeatures |
|
alpha |
level of the hypothesis test used to select and display significant
results. Default |
only_significant |
if |
scale_threshold |
threshold on the test scale (maximum interval length for
the p-value adjustment) to be used in the adjusted p-value plot. Can be either
a scalar (the same length for all features) or a vector (a length for each feature)
or a list of vectors (a vector for each test). If |
nlevel |
number of desired color levels for the adjusted p-value heatmap. |
groupby |
how tests should be grouped for the summary plot. Possible types are:
|
test |
vector of indices of the tests to be plotted. |
gaps_tests |
vector of |
id_features_subset |
vector with the identifiers of the features to be plotted. |
gaps_features |
vector of id_features_subset indices that show where to put gaps
in the heatmap between features. Only used if |
ask |
if |
filenames |
file paths where to save the plots (one for each group of tests as defined
by |
align_lab |
a title for the alignment point. Ignored if region alignment is |
cellwidth |
individual cell width in points. |
cellheight |
individual cell height in points. |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
... |
additional plot parameters. |
No value returned. The function produces a graphical output.
This function uses a modified version of pheatmap package (https://cran.r-project.org/package=pheatmap).
Marzia A Cremona, Alessia Pini, Francesca Chiaromonte, Simone Vantini
IWTomicsData
for "IWTomicsData"
class, constructors, accessors and methods;
IWTomicsTest
function to perform the Interval-wise Testing;
plotTest
to draw detailed plots of the test results.
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 56 57 58 59 60 61 62 63 64 65 66 | ## -------------------------------------------------------------------------------------------
## CURVE ALIGNMENT CENTER
## -------------------------------------------------------------------------------------------
data(regionsFeatures_center)
## One sample test for different regions and features
regionsFeatures_test=IWTomicsTest(regionsFeatures_center,
id_region1=c('elem1','elem2','elem3','control'),mu=1)
## Summary plots grouped by feature
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature')
## Set scale thresholds for the different features
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
scale_threshold=c(25,30))
## Add a title for the alignment point
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
scale.threshold=c(25,30),align_lab='Center')
## Plot only significant tests
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
scale.threshold=c(25,30),align_lab='Center',
only_significant=TRUE)
## Summary plots grouped by test
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='test')
## Two sample test for all possible region comparisons (mu=0),
## and one sample test for 'elem3' (mu=1) for feature 'ftr1'
regionsFeatures_test=IWTomicsTest(regionsFeatures_center,
id_region1=c('elem1','elem2','elem3',
'elem1','elem1','elem2','elem1'),
id_region2=c('control','control','control',
'elem2','elem3','elem3',''),
id_features_subset='ftr1')
## Summary plots grouped by feature
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature')
## Put gaps between different types of test and add a title for the alignment point
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
gaps_tests=c(3,6),align_lab='Center')
## Plot only significant tests
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
gaps_tests=c(3,6),align_lab='Center',only_significant=TRUE)
## Plot only the first three tests
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
test=1:3,align_lab='Center')
## Change scale threshold for the first test
## x11(10,5)
plotSummary(regionsFeatures_test,groupby='feature',
test=1:3,align_lab='Center',scale_threshold=list(t1=8,t2=50,t3=50))
|
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colMeans, colSums, colnames, do.call,
duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: IRanges
Loading required package: GenomeInfoDb
Attaching package: 'IWTomics'
The following object is masked from 'package:stats':
smooth
Performing IWT for 'Elements 1'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for feature 'Feature 2'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 2'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for feature 'Feature 2'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 3'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for feature 'Feature 2'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Controls'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for feature 'Feature 2'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 1' vs. 'Controls'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Warning: p-value not fully computable in some points, because of too many NAs present.
Performing IWT for 'Elements 2' vs. 'Controls'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 3' vs. 'Controls'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 1' vs. 'Elements 2'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Warning: p-value not fully computable in some points, because of too many NAs present.
Performing IWT for 'Elements 1' vs. 'Elements 3'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 2' vs. 'Elements 3'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Performing IWT for 'Elements 1'...
Performing IWT for feature 'Feature 1'...
Point-wise tests...
Interval-wise tests...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.