deepTools computeMatrix output import into R for enrichment calculations
0
0
Entering edit mode
6 weeks ago
eeb74 • 0

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!

R deeptools computeMatrix deepTools • 267 views
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY

Login before adding your answer.

Traffic: 1621 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6