Problem loading a .cov file with methRead, please help

7 views
Skip to first unread message

Giulia Pacinotti

unread,
Feb 13, 2026, 7:54:42 AMFeb 13
to methylkit_discussion
I have a .cov file with methylation data that I obtained from a vcf file using biscuit tools. The .cov file look like this:

PGA_scaffold14__66_contigs__length_73235077     12631031        12631031        33      1       2

PGA_scaffold14__66_contigs__length_73235077     16383882        16383882        67      2       1

PGA_scaffold14__66_contigs__length_73235077     17679062        17679062        0       0       0

PGA_scaffold14__66_contigs__length_73235077     18164733        18164733        0       0       2

The first column is the scaffold, second is start, third end, fourth is methylation %, fifth is number of Cs and the sixth one is the number of Ts. 
I tried to load this in R with che command methRead of the methylKit package, but it gives me various error, I tried several times, with different lines, but all similar to this one:
col_list <- list(fraction = F,
                 chr.col = 1,
                 start.col = 2,
                 end.col = 3,
                 coverage.col = NULL,
                 strand.col = NULL,
                 freqC.col = 4)
myobj <- methRead(location = 'cov_fixed.cov',
                  sample.id = 'p1094', assembly = 'quagga', header = F, treatment = 1,
                  pipeline = col_list, mincov = 1)
The error are always regarding the structure of the file, the problem I think it's related to the information the my columns contains that I think are different from the ones that methylKit accept. This are some of the errors:
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
Error in .check.pipeline.list(pipeline) :
  Miss components for pipeline for the generic read.Try amp, or bismark, or a list in the correct format forfor generic methylation file reading!
I know that there's a way to load that file anyway but I don't know which this way is, so I'm asking for your help guys, how can I load this kind of files? 

Alexander Blume

unread,
Feb 13, 2026, 9:35:56 AMFeb 13
to methylkit_...@googlegroups.com
Hi Guilia,

The .cov format corresponds to the Bismark coverage format, which is supported by the `bismarkCoverage` pipeline.
You should be able to load the file as is by setting the pipeline argument of the methRead function to 'bismarkCoverage'. 

Best,
Alex 

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/methylkit_discussion/9a09a652-0b02-43a3-b7e4-6ae35ba23642n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages