Entering edit mode
4.1 years ago
hksk2
▴
20
I have mapped my WGBS data and calculated methylation levels and I have a list of genomic regions that want to extract methylation levels from my methylation data.
The list of genomic regions look like this
Chr start end
1 103564 105566
2 701250 702223
and the methylation levels of my sample data obtained from bsmap look like this:
chr pos strand context ratio eff_CT_count C_count CT_count rev_G_count rev_GA_count CI_lower CI_upper
1 10004 + AACCC 1.000 1.00 1 1 0 0 0.207 1.000
1 10005 + ACCCT 1.000 1.00 1 1 0 0 0.207 1.000
1 10006 + CCCTA 1.000 1.00 1 1 0 0 0.207 1.000
Is there any program or script that can do this? I know I can extract one by one but there are 790 regions on the list and I have 24 samples..
check out bedtools intersect function