This function allows to plot the heatmap of the emission states obtained by the chromHMM learnModel function.
This function takes the emissions_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/
emission2hm(data, features = c("feature1", "feature2", ...), states = c("E1", "E2", ...), title = "Main title", subtitle = "Subtitle", xlab = "Features", color = "Tomato", label_size =2)
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() |
---|---|
features | a not-null character vector with the names of the features used in the chromHMM learnModel function. Must have a length() == (ncol(data)-1). |
states | a not-null haracter vector with the names of the states defined by crhomHMM. Initially should be set at paste("E", 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. |
xlab | character vector of length 1 with the label to be shown in the x-axis of the heatmap. Default: "Features". |
color | character vector of length 1 with the color to be used to color the heatmap. Default: "Tomato". |
lh_size | numeric of length 1 with the size of the likelihood labels to draw in the heatmap. Default: 2 |
show_lh | logical of length 1 indicating whether to show or not the likelihood to find a certain feature in a certain state. |
amitjavilaventura