-
Notifications
You must be signed in to change notification settings - Fork 6
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
Are all CpG reported ? #192
Comments
Hello @OceaneMion, Positions with However if you want to make a BED table with all CpGs, you can use $ modkit pileup ${mod_bam} ${bedmethyl_cpg} --cpg --ref ${ref} --no-filtering
$ modkit modif-bed ${ref} CG 0 > cpgs.bed
$ bedtools intersect -a cpgs.bed -b ${bedmethyl_cpg} -loj -wb |
Thanks a lot ! |
Hello @OceaneMion,
These are the steps # step 1: create a pileup
$ modkit pileup ${mod_bam} ${bedmethyl_cpg} --cpg --ref ${ref}`
# step 2: separate 5mC from 5hmC
$ awk '$4=="m"' ${bedmethyl_cpg} > ${pileup_5mC}
$ awk '$4=="h"' ${bedmethyl_cpg} > ${pileup_5hmC}
# alternate step 2, if you want only sites with >0% modification
$ awk '($4=="m") && ($11>0.0)' ${bedmethyl_cpg} > ${pileup_5mC_only_mod}
$ awk '($4=="h") && ($11>0.0)' ${bedmethyl_cpg} > ${pileup_5hmC_only_mod}
# step 3: calculate total number of sites with coverage
$ awk '$4=="m"' ${bedmethyl_cpg} | wc -l
# this should be the same number as
$ awk '$4=="h"' ${bedmethyl_cpg} | wc -l |
Thanks for your awnser yes if I do not put a threshold therefore I will have the same number of 5hmC and 5mC here, which is then more accurate to use reads for the global methylation level and not the assembly. |
Do you mean you want a test to see if the methylation at a CpG is not uniform over the potential classes? I.e. P(canonical) = P(5hmC) = P(5mC) = 1/3? |
Hi, |
Hello @selmapichot, Sorry I missed this question. All CpGs that have modified base information (including canonical calls) will be included in the bedMethyl as long as they pass the pass threshold. If all of the calls fail to pass this threshold there won't be a bedMethyl record. You can bypass filtering with |
Hi I would like to know if all CpG are reported in the modkit pileup if we specify no-filtering ? Even those that are not methylated ?
The text was updated successfully, but these errors were encountered: