This function allows to plot the heatmap of the transition states obtained by the chromHMM learnModel function.
This function takes the transitions_x.txt file as input, where x is the number of states used in the learnModel function.
Go to the chromHMM main page to get more information about chromHMM: http://compbio.mit.edu/ChromHMM/
transition2hm(data, states = c("S1", "S2", ...), title = "Main title", subtitle = "Subtitle", xlab = "To", ylab = "From", color = "Tomato", label_size = 2, show_lh = T)
data | either a character vector with the file to be loaded or an object of class data.frame obtained by reading the input file with read.delim() |
---|---|
states | a not-null haracter vector with the names of the states defined by crhomHMM. Initially should be set to something as paste("S", 1:n, sep=""), where n is the number of states defined in chromHMM. |
title | character vector of length 1 with the title of the heatmap. |
subtitle | character vector of lenght 1 with the subtitle of the heatmap. |
ylab | character vector of length 1 with the label to be shown in the y-axis of the heatmap. Default: "From". |
xlab | character vector of length 1 with the label to be shown in the x-axis of the heatmap. Default: "To". |
color | character vector of length 1 with the color to be used to color the heatmap. Default: "Cornflowrblue". |
lh_size | numeric of length 1 with the size of the labels. Default: 2. |
show_lh | logical of length 1 indicating whether to show the numbers used to plot the heatmap. |
amitjavilaventura