Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How dis.merge works? #31

Closed
vahidAK opened this issue Dec 2, 2022 · 7 comments
Closed

How dis.merge works? #31

vahidAK opened this issue Dec 2, 2022 · 7 comments

Comments

@vahidAK
Copy link

vahidAK commented Dec 2, 2022

Hi,
I was wondering how dis.merge in callDMRs works? In the dis.merge help it says:
“ When two DMRs are very close to each other and the distance (in bps) is less than this number, they will be merged into one.”
However, it seems in the results there are regions closer than specified dis.merge which did not merged into one.

Thanks,
Vahid

@haowulab
Copy link
Owner

haowulab commented Dec 3, 2022

It's an ad hoc procedure. If two regions are closer than dis.merge, they will be merged into one. Can you provide some example that violates this? I need to check codes.

@vahidAK
Copy link
Author

vahidAK commented Dec 3, 2022

It seems it does not work when the dis.merge is greater than the minlen. I set minlen to 100 and tried different dis.merge. At dis.merge greater than minlen all the results were the same. For example here minlen is 100 and dis.merge is 500 and these three should be merged into one:

chr1	227558936	227559645	710	29	0.167384709863496	0.428704359286996	-0.2613196494235	-136.128952435238
chr1	227559999	227560740	742	29	0.115066718817319	0.544736057576105	-0.429669338758786	-241.406791344046
chr1	227560987	227561600	614	54	0.710014935314172	0.451341114055048	0.258673821259124	347.25126053765

I guess the following lines in the DMR.R file might force the maximum possible dis.merge to be as minlen?


    if(dis.merge > minlen)
        dis.merge = minlen

Thanks,
Vahid

@haowulab
Copy link
Owner

haowulab commented Dec 3, 2022

Yes that's what I did. I think if the gap is greater than the minimum allowable length of a DMR, one shouldn't merge them.

@vahidAK
Copy link
Author

vahidAK commented Dec 3, 2022

Sorry, The first two lines should be merged the third one shows hypermethylation.

@vahidAK
Copy link
Author

vahidAK commented Dec 3, 2022

Then providing greater dis.merge than minlen is not doing anything?

Isn't it make sense to allow that? at least for large DMRs?

@haowulab
Copy link
Owner

haowulab commented Dec 3, 2022

yes that's what I did. I can't check the length of each DMR and then determine a proper dis.merge. I just don't want to merge, say, two 100bp DMRs that are 500bp away. There's no specific reason. Again as I said, it's an ad hoc procedure.

@vahidAK
Copy link
Author

vahidAK commented Dec 3, 2022

Thanks @haowulab . It would be also great if you could mention this in the documentation’s help so users be aware. Because there you also specified a dis.merge greater than the minlen:

Usage
callDMR(DMLresult, delta=0, p.threshold=1e-5,
minlen=50, minCG=3, dis.merge=100, pct.sig=0.5)

@vahidAK vahidAK closed this as completed Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants