methylKit icon indicating copy to clipboard operation
methylKit copied to clipboard

Error during methylkit unite

Open manjumoorthy95 opened this issue 1 year ago • 1 comments

While performing the Unite function on CHG context files in methylkit, I get the following error :

Error in bmerge. Incompatible join types.

I have posted the screenshot of error below.

What could be the reason? IMG-20230710-WA0001

manjumoorthy95 avatar Jul 10 '23 18:07 manjumoorthy95

Hi @manjumoorthy95 ,

Thanks for reporting the error.

The reason could be that the chr column of one sample is formatted as character while the other is formatted as integer. This might have happened during the reading of the files, since we are using data.table::fread to parse the file and automatically determine column types. Here, if the chromosome names in the file are numbers, they will be imported as integers.

This is unexpected and should not really happen, but for now, you could manually convert the chr into character type columns using the following code:

for (i in seq_along(myobj)) myobj[[i]]$chr <- as.character(myobj[[i]]$chr)

I hope this helps for now.

I was able to reproduce your error and will be working on a fix.

Best, Alex

alexg9010 avatar Jul 11 '23 15:07 alexg9010