We have ERRBS data from previous versions of bismark tool. Sample methylcall file is below --
dat1
chrBase chr base strand coverage freqC freqT
1 chr1.4694 chr1 4694 R 2 100 0
2 chr1.4668 chr1 4668 R 9 100 0
3 chr1.4688 chr1 4688 R 2 100 0
4 chr1.4686 chr1 4686 R 2 100 0
5 chr1.4658 chr1 4658 R 9 88.9 11.1
6 chr1.4701 chr1 4701 R 2 100 0
7 chr1.4673 chr1 4673 R 9 100 0
8 chr1.6347 chr1 6347 R 3 100 0
9 chr1.6339 chr1 6339 R 5 100 0
10 chr1.6321 chr1 6321 R 5 80 20
I wrote the below code to transform into the new input required by methylsig.
dat1 = dat
dat1$numReads_C = round( dat1$freqC * dat1$coverage )/100
dat1$numReads_T = dat1$coverage - dat1$numReads_C
#percent = numReads_C/coverage * 100
dat1$start = as.integer( dat1$base - 1 )
dat1$base = as.integer( dat1$base )
dat1_for_methylsig = dat1[ , c("chr","start","base","freqC","numReads_C","numReads_T") ]
Can you please let me know if this is the correct approach or if there is a better way to use my old methylcall file to be able to use the package..
Thanks
Yaseswini
Hi,
We have ERRBS data from previous versions of bismark tool. Sample methylcall file is below --
dat1
chrBase chr base strand coverage freqC freqT