Hello,
Im having a problem with methylKit as it is outputting the incorrect % differences between sample comparisons P3.CPG.txt and P7.CpG.txt. I must be making a mistake somewhere but it's not obvious to me. Any help you can provide me would be greatly appreciated. I have provided the methylkit code below.
I aligned my bisulfite reads using BSMAP and used the methyratio.py program to call the C and CT values.
The methyKit output for position chr13.119601308 between two comparisons is 92% and reads as follows:
"id" "chr" "start" "end" "strand" "pvalue" "qvalue" "meth.diff"
"3256" "chr13.119601308" "chr13" 119601308 119601308 "+" 5.60865078296767e-06 0.00563332884641272 92.8571428571429
However when i extract the information from the input files P3.CpG.txt and P7.CpG.txt respectively these are the scores
[header] chr pos strand context ratio total_C methy_C CI_lower CI_upper
[P3.CpG.txt] chr13 119601308 + CG 0.071 14 1 0.013 0.315
[P7.CpG.txt] chr13 119601308 + CG 0.240 1247 299 0.217 0.264
So the probem is that the difference in ratios between P3.CpG.txt and P7.CpG.txt is -0.16 not 92.85.
Can anyone tell me if this is an error on my end, have i called the input columns to methylKit wrong or is this perhaps an error in the methylKit code?
Looking forward to your response.
Claire
####################################################################################################
methylKit commands
#####################################################################################################
library(methylKit)
file.list=list( "P3.CpG.txt","P7.CpG.txt")
myobj=read(file.list,
sample.id=list("ctrl","test"),assembly="mm10",treatment=c(0,1),context="CpG", header=TRUE, resolution="base",pipeline=list(fraction=TRUE,chr.col=1,start.col=2,end.col=2,coverage.col=6,strand.col=3,freqC.col=5 ))
filtered.myobj=filterByCoverage(myobj,lo.count=5,lo.perc=NULL, hi.count=NULL,hi.perc=99.9)
meth=unite(filtered.myobj,destrand=TRUE)
myDiff=calculateDiffMeth(meth)
myDiff33p=get.methylDiff(myDiff,difference=20,qvalue=0.05)
write.table(getData(myDiff33p),file="myDiff20p.txt")