methylkit input file

162 views
Skip to first unread message

sat van

unread,
Jan 2, 2023, 5:31:49 AM1/2/23
to methylkit_discussion
Hello
In the first step of using methylkit we use the processBismarkAln to read Bismark SAM/BAM file for following process. i have done a preprocessing with the SAM files and some cleaning and removing SNP as i need for other tools like dss. i want to use this file that is like Bismark coverage with 6 column ( V1: chromosome number; V2: start position of the CpG site; V3: end position of the CpG site; V4: methylation proportion; V5: number of methylated ; V6: number of unmethylated ).
How can i use this file for process in methylkit or convert this file to methylkit input file ( V1:chrBase V2:chr V3:base V4:strand V5:coverage V6:freqC V7:freqT )?
Thank you.
sat

Alexander Blume

unread,
Jan 3, 2023, 3:10:55 AM1/3/23
to methylkit_discussion
Hi Sat,

Thanks for using methylKit. 
To process your Bismark coverage-like file, you may use the `methRead()` function with pipeline='bismarkCoverage'. For more information please read the details section of the methRead help. 

Best,
Alex
Message has been deleted

sat van

unread,
Jan 6, 2023, 3:27:50 AM1/6/23
to methylkit_discussion
Hello
thank you Alex
another question is when i using below commands about "Finding differentially methylated bases or regions"
myDiff=calculateDiffMeth(meth)
myDiff25p.hyper=getMethylDiff(myDiff,difference=25,qvalue=0.01,type="hyper")
myDiff25p.hypo=getMethylDiff(myDiff,difference=25,qvalue=0.01,type="hypo")
myDiff25p=getMethylDiff(myDiff,difference=25,qvalue=0.01)

1. the first question is with this commands we can get the DMC results? and how we can get DMR?
2. my problem with these commands is when i change the parameters like q-value and difference, the number of row in output not change and there are the same result, that is a littler weird!

thank you
best,
Sv

Alexander Blume

unread,
Jan 10, 2023, 5:42:55 AM1/10/23
to methylkit_...@googlegroups.com
Hi Sat,


1. the first question is with this commands we can get the DMC results? and how we can get DMR?

The calculateDiffMeth function 
does not distinguish between regions or bases, it calculates differential methylation for whatever you put in. That being said, we provide some functions to summarize your objects into regions prior to differential analysis: 

- regionCounts() : summarized counts per region
- selectByOverlap() : orignal counts within region
- tileMethylCounts() : tiling windows over genome



2. my problem with these commands is when i change the parameters like q-value and difference, the number of row in output not change and there are the same result, that is a littler weird!


Could you please verify that the results are not getting filtered after changing the cutoffs? What happens if you apply a very strict cutoff, like `difference = 50`?

With our example data I get different results for different cutoffs. Are you certain that you inspected the correct objects? 


Best,
Alex




-- 
You received this message because you are subscribed to a topic in the Google Groups "methylkit_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/methylkit_discussion/-w_QA3lCCcQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to methylkit_discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/methylkit_discussion/182be5b6-9df1-4b9d-b419-05b2f221540fn%40googlegroups.com.

sat van

unread,
Jan 12, 2023, 9:07:20 AM1/12/23
to methylkit_discussion
Thank you Alex
yes, when i change the cutoff, the results will changed for example if i change it to 50, number of rows increased that's expected, but when i change the q-value from 0.01 to 0.05 the result not change, i expected to have increase in result. but it fix at 30 !.

best
sat

Alexander Blume

unread,
Jan 13, 2023, 4:05:36 AM1/13/23
to methylkit_discussion
Hi Sat,
I would expect changing the difference from 25 to 50 would rather lower the number of DMCs, because it is a stricter cutoff. 

The default thresholds we use are 'difference' 25 and 'qvalue' 0.01, so if you do not change them via the argument, the default value applies. 
That being said, if all your DMCs with 25% methylation change are already significant with a q-value of 0.01, then increasing the q-value will not change the outcome. 

Best
Alex

sat van

unread,
Jan 13, 2023, 6:02:15 AM1/13/23
to methylkit_discussion
Hi Alexander
You said right, sorry i had a typo!! the number of DMCs decreased with changing the cutoff from the 25  to 50. that's expected. So if i want to change the q-value to 0.05, i have to change the cutoff as well? because the DMCs with significance of 0.05 are important and i don't want to miss them in the output.

best
sat

Alexander Blume

unread,
Jan 13, 2023, 6:14:45 AM1/13/23
to methylkit_...@googlegroups.com
Hi Sat,

To see DMCs with lower significance you would need to lower the ‘difference’ cutoff.
Using this code should be able to figure out the range of methylation difference for a certain value threshold (using 0.05 in this case):

with(myDiff,summary(abs(meth.diff)[qvalue<0.05]))

However, unless you have good reasons, I would not recommend choosing a threshold below 10.  

Best
Alex

Reply all
Reply to author
Forward
0 new messages