This function allows to plot the heatmap of the overlap enrichments in several genomic regions obtained by chromHMM.

This function takes the x_n_overlaps.txt file as input, where x is the contition specified in the ChromHMM design matrix and n 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/

overlap2hm(data, regions = c("fregion1", "region2", ...), states = c("E1", "E2", ...), title = "Main title", subtitle = "Subtitle", color = "cornflowerblue", scale_color = "scale", legend = F, label_size =2)

Arguments

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()

regions

a not-null character vector with the names of the regions where the chromatin states have been overlapped.

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.

color

character vector of length 1 with the color to be used to color the heatmap. Default: "Cornflowerblue".

scale_color

character vector of length 1 indicating which option to use to color the heatmap. One of 'scale', 'percent' or 'value'. Default: 'scale'.

legend

logical of length 1 indicating wether to show the legend or not. Default = F.

score_size

numeric of length 1 with the size of the likelihood labels to draw in the heatmap. Default: 2.

show_score

logical of length 1 indicating whether to show or not the enrichment score to find a certain feature in a certain state. Default: T

Author

amitjavilaventura