Description Usage Arguments Details Value Author(s) See Also Examples
Generate transition matrix from chromHMM results
1 2 |
gr_list_1 |
a list of |
gr_list_2 |
a list of |
window |
window size which was used to do chromHMM states prediction. If it is not specified, the greatest common divisor of the width of all regions is used. |
min_1 |
If there are multiple samples in group 1, the state assigned to reach region should have recurrency larger or equal to this value. |
min_2 |
same as |
The whole genome is segmentated by size of window
and states with highest occurence among samples are assigned to segments.
To make the function run successfully, number of segments in all samples should be all the same and there should not be gaps between regions.
A transition matrix in which values represent total width of regions that transite from one state to the other. Rows correspond to group 1 and columns correspond to group 2.
Zuguang Gu <z.gu@dkfz.de>
The matrix can be sent to chromatin_states_transition_chord_diagram
to visualize.
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(123)
gr_list_1 = lapply(1:5, function(i) {
pos = sort(c(0, sample(1:9999, 99), 10000))*200
GRanges(seqnames = "chr1", ranges = IRanges(pos[-101] + 1, pos[-1]),
states = paste0("state_", sample(1:9, 100, replace = TRUE)))
})
gr_list_2 = lapply(1:5, function(i) {
pos = sort(c(0, sample(1:9999, 99), 10000))*200
GRanges(seqnames = "chr1", ranges = IRanges(pos[-101] + 1, pos[-1]),
states = paste0("state_", sample(1:9, 100, replace = TRUE)))
})
mat = make_transition_matrix_from_chromHMM(gr_list_1, gr_list_2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.