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?