This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bedgraph.sorted or wig to .cov files?

I have around 42 methylome files in both bedgraph.sorted and .wig form, but for the analyses I wish to run, I need the files in .cov form. Does anyone know how I can convert my files?

coverage bedgraph.sorted bedgraph wig

Where is the documentation for .cov format? I have never used it.

1 answer

I assume the bedGraph has the format:

chromosome start_position end_position methylation_percentage

While the .cov file you need has format

chromosome start end methylation_percentage count_methylated count_unmethylated

To get the methylated and unmethylated counts information:

a. If you have alignment files, you can use the bismark bismark2bedGraph utility to get .cov files.

b. If you have total aligned read counts per position and methylation percentage information, you can easily calculate count methylated and count unmethylated for .cov file as below:

count_methylated = methylation_percentage/100 * total_counts
count_unmethylated = total_counts - count_methylated

Log in to answer this question.