Question: Alternative methylation contexts with MEDIPS?
0
gravatar for Chris Fields
3.4 years ago by
Chris Fields60
Chris Fields60 wrote:

I noticed that MEDIPS doesn't seem to assess alternative methylation contexts like CHG or CHH.  This seems to stem from not allowing ambiguous matching within MEDIPS.getPositions.  Using something like matchPattern('CHG', subject, fixed=F) does seem to work.  

I can fork this on Github to add a fix, but I'm not sure how this works for Bioconductor modules (particularly since the Github repo mirror is read-only).

medips • 429 views
ADD COMMENTlink modified 3.4 years ago by Matthias Lienhard140 • written 3.4 years ago by Chris Fields60
Answer: Alternative methylation contexts with MEDIPS?
1
gravatar for Lukas Chavez
3.4 years ago by
Lukas Chavez510
USA/La Jolla/UCSD
Lukas Chavez510 wrote:
Dear Chris, due to Ryan Lister’s 2009 Nature paper demonstrating a certain amount of DNA methylation at cytosines in non-CpG context in ES cells, I have experimented with the functionality of allowing for CHG and CHH context in MEDIPS ~5 years ago. If I remember correctly, I concluded that the low resolution of the MEDIPS enrichment technology does not allow for inferring the sequence context of methylated cytosines. The MEDIPS.couplingVector and MEDIPS,getPositions functions where written some time ago and I always thought they are somewhat flexible, for example changing the pattern parameter in the MEDIPS.couplingVector function to pattern=“C” should work. However, this will extract all genomic positions in CHH context where H = C | T | A | G and does not distinguish between CHG or H != G. If ambiguous matching does not work, please feel free to download the latest version of MEDIPS, change the functions and send them to me. I will be happy to update the package accordingly. Alternatively, I can also share my BioC MEDIPS password with you and you update the package by yourself. Personally, I am certainly willing to have MEDIPS modified, improved and updated by anyone who is interested. I just don’t know if this violates the Bioconductor concept having a dedicated maintainer? All the best, Lukas On 05 Aug 2016, at 06:50, Chris Fields [bioc] <noreply@bioconductor.org<mailto:noreply@bioconductor.org>> wrote: Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""/> User Chris Fields<https: support.bioconductor.org="" u="" 4329=""/> wrote Question: Alternative methylation contexts with MEDIPS?<https: support.bioconductor.org="" p="" 85791=""/>: I noticed that MEDIPS doesn't seem to assess alternative methylation contexts like CHG or CHH. This seems to stem from not allowing ambiguous matching within MEDIPS.getPositions. Using something like matchPattern('CHG', subject, fixed=F) does seem to work. I can fork this on Github to add a fix, but I'm not sure how this works for Bioconductor modules (particularly since the Github repo mirror is read-only). ________________________________ Post tags: MEDIPS You may reply via email or visit Alternative methylation contexts with MEDIPS?
ADD COMMENTlink written 3.4 years ago by Lukas Chavez510

I'll have a look at modifying the code fairly soon, taking into account the issues Matthias Lienhard mentions re: ambiguous matches.   Once I have a better idea on what can be done I'll repost here.  Thanks for the prompt reply!

ADD REPLYlink written 3.3 years ago by Chris Fields60
Answer: Alternative methylation contexts with MEDIPS?
0
gravatar for Matthias Lienhard
3.4 years ago by
Max Planck Institute for molecular Genetics, Berlin, Germany
Matthias Lienhard140 wrote:

Hi Chris,

I recently developed qsea, an alternative package for the analysis of enrichment based methylation data, which is in the currently in the devel-branch of Bioconductor. The package is based on the ideas of MEDIPS, but extends the functionality and facilitates the usage. The focus is on estimating absolute methylation levels, but it also includes a more flexible function to estimate pattern densities, just as you suggested: the addPatternDensity function has a parameter "fixed", that allows for flexible patterns. This is however not the only change within this function. But even if you chose to extend MEDIPS, I'd suggest having a look at the function, as there are pitfalls with this approach, mainly due to the Ns in the reference, that unintentionally matches any character in the pattern.

Best, Matthias

 

ADD COMMENTlink written 3.4 years ago by Matthias Lienhard140

Hi Matthias,

CHG if using DNAString in a matchPattern should match C[ATC]G and CHH C[ATC][ATC] as long as fixed=F.  I don't believe it will match reference N by strict IUPAC rules, but it's worth confirming.

ADD REPLYlink written 3.3 years ago by Chris Fields60

Hi Chris,

maybe I wasn't clear, what I ment was the following behavior of matchPattern, when setting fixed=F

>library(BSgenome.Hsapiens.UCSC.hg19)
>library(Biostrings)

>chr_seq=getBSgenome("BSgenome.Hsapiens.UCSC.hg19")[["chr1"]]
>chr_seq
  249250621-letter "DNAString" instance
seq: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

>pIdx=start(matchPattern(pattern=DNAString("CG"),
            subject=chr_seq, fixed=FALSE))

>head(pIdx)
[1] 1 2 3 4 5 6

A "maskMotif" call fixes this:

>chr_seq<-maskMotif(chr_seq, "N")

Best, Matthias

 

ADD REPLYlink written 3.3 years ago by Matthias Lienhard140

Ah, that's good to know, thanks!  This is for a non-model organism with a fair number of gaps, so having the mask will help.  

ADD REPLYlink written 3.3 years ago by Chris Fields60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 355 users visited in the last hour