Description Usage Arguments Details Author(s) Examples
Discretize a Continuous Matrix to a Discrete Matrix
1 | discretize(mat, rule, right_closed = FALSE)
|
mat |
A normalize matrix from |
rule |
A list of intervals which provide mapping between continuous values to discrete values. Note the order of intervals determines the order of corresponding discrete levels. |
right_closed |
Is the interval right closed? |
Assuming we have a normalized matrix with both positive values and negative values, we only want to see the enrichment of the windows/regions showing significant positive values and negative values and we are only interested in the direction of the values while not the value itself, then we can define the rule as:
1 2 3 4 |
And we can convert the continuous matrix to a discrete matrix and visualize it:
1 2 | mat2 = discretize(mat, rule)
EnrichedHeatmap(mat2, col = c("positive" = "red", "negative" = "green"))
|
Another example is to discretize the signals to discrete levels according to the intensities:
1 2 3 4 5 6 |
Zuguang Gu <z.gu@dkfz.de>
1 2 | # There is no example
NULL
|
Loading required package: grid
Loading required package: ComplexHeatmap
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, basename, cbind, colMeans, colSums, colnames,
dirname, 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
Loading required package: locfit
locfit 1.5-9.1 2013-03-22
Attaching package: 'EnrichedHeatmap'
The following object is masked from 'package:ComplexHeatmap':
+.AdditiveUnit
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.