Hi,
I am trying to compute average enrichment scores over a region of bins from a computeMatrix output in R. I used the scale-regions option for computeMatrix and have been planning to use the colMeans() function to do the average enrichment calculation.
I am following Devon's advice from a previous post to import my deepTools matrix output the following way:
m = read.delim("*.mat.gz", skip = 1, header = F)
But am getting a matrix with characters and lacking dimensions when I try to use as.matrix downstream of this. Could you help me with this and provide advice for how to work with a deepTools computeMatrix output to do this kind of calculation? Thanks in advance!
To follow up, this is the code I am trying to run to generate a matrix from the deepTools output matrix object:
scoreMatrix <- matrix(data = mat_clean, nrow = 178177, ncol = 250, byrow = TRUE)
And I get the following error in my console when I run this line:
Warning: data length [251] is not a sub-multiple or multiple of the number of rows [178177]
I am thinking it might be an issue with my extraction of the data?