I am trying to perform a methylation analysis from a txt file which contains the m values.
The RNA samples were taken to a company that performed an Illumina EPIC array.
They performed the first steps of the analysis which consisted of the pre-processing and quality control of the data using minfi package.
Then, they sent us two txt files one with the m-values and the other with the b-values.
The structure of these data in the txt file is (I am showing only the first 2 lines of17.000)
island patient1 patient2 patient3 control1 control2 control3
cg14817997 3.09546 2.11941 2.90160 1.91566 2.45522 2.36514
My doubt is when it comes to start the analysis from these data. I understand that I have to use the function:
makeGenomicRatioSetFromMatrix(mat, rownames = NULL, pData = NULL,
array = "IlluminaHumanMethylation450k",
annotation = .default.450k.annotation,
mergeManifest = FALSE, what = c("Beta", "M"))
It creates a GenomicRatioSet object that stores the methylation data along with additional information such as genomic coordinates of regions, genomic annotations and sample meta-information.
This function requires a matrix and I don't know how to set it up.
I also think that I need to say R which are my groups so I create this:
df <- data.frame( test=1, d=c(rep('patient', 3 ), rep('control', 3)) )
df$d <- factor( df$d, levels = c('patient', 'control'))
However, I need help constructing the matrix correctly so that the function makeGenomicRatioSetFromMatrix works correctly and can search for differentially methylated positions.
Any help is welcome.
Thank u
Thank you very much @JamesW.MacDonald, it worked!
Now I need to obtain the different methylation positions (DMPs)
I think that the function needed is "dmpFinder":
However, I don't know if I am using the function correctly. In my case, I substitute the arguments in the following way, but when I run the function, I get the following error
Maybe I'm not using the right function either...
Thank u