al2na / methylKit

R package for DNA methylation analysis
https://bioconductor.org/packages/release/bioc/html/methylKit.html
210 stars 96 forks source link

Error with creating methylkit object #242

Closed hchetia closed 2 years ago

hchetia commented 2 years ago

Hi, I am trying to create a methylkit object using the methread function and CPG counts from Bismark as input. Command used- myobj=methRead(file.list,

I am getting the foll. error- Error in data[, 5] * data[, 6] : non-numeric argument to binary operator.

Thanks for the help.

Best, Hasna

alexg9010 commented 2 years ago

Hi @hchetia,

Could you please also include how the file.list object was created. Especially, which files are you providing? It seems that the given files do not match the format methRead is expecting.

Best, Alex

hchetia commented 2 years ago

Hi @alexg9010 I used these cmd to create file list. file.list=as.list(list.files(pattern = ".*.txt")) file.list

The files I am providing are CpG count files generated by Bismark using the Bismark methylation extractor function. Head of a CpG txt file is shown below image

Best, Hasna

alexg9010 commented 2 years ago

Thanks @hchetia,

The file format that you are showing, does not look like the default format. You need to change the pipeline argument of the methRead function to match the correct format. My advice is to look at the details section to check out the supported formats ;).

Best, Alex