Are the ordering of outputs of methylation matrix and coordinates from predictedMeth() the same?
0
0
Entering edit mode
AishaD • 0
@aishad-23531
Last seen 4.5 years ago

I have run predictedMeth() on filtered rrbs data. However, I want to pull out the methylation matrix where each row is a region and column is sample. The issue is that the rownames are numeric values rather than positions. I did pull out the coordinates from the predictedMeth object but I am not sure that the order match between the rows of the methylation matrix and coordinates. I want to confirm that they are in the same order and that I am referring each region to the right position on the genome. Below is the code I have used.

> betas <- as.matrix(methLevel(predictedMeth))
> betas[1:2,1:2]
   A1       A2
1   1 0.97
2   1 0.98
> coordinates <- as.data.frame(predictedMeth@rowRanges)
> coordinates[1:2,]
  seqnames   start     end width strand cluster.id
1     chr5 3020638 3020638     1      *     chr5_1
2     chr5 3020656 3020656     1      *     chr5_1
biseq R methylation • 796 views
ADD COMMENT
0
Entering edit mode

Yes the order is the same.

ADD REPLY

Login before adding your answer.

Traffic: 816 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