kdkorthauer / dmrseq

R package for Inference of differentially methylated regions (DMRs) from bisulfite sequencing
MIT License
54 stars 14 forks source link

How to produce dmrseq figure by defining specific gene symbol ? #54

Closed DengEr-1993 closed 4 months ago

DengEr-1993 commented 1 year ago

Sorry @kdkorthauer

It is my second question.

For example, I want to show specific gene symbol and its CpG methylation points or regions.

So how can I specify this gene by annoTrack, regions&blocks or even the bsseq result ?

Or should I do this procedure manually ? ##############

Thanks!

kdkorthauer commented 1 year ago

Hi @DengEr-1993,

You can add gene tracks to the plot using the annoTrack argument in plotDMRs (you pass the output of getAnnot) - see this section of the vignette for example. Note that if there are no genes in the region plotted, then no gene tracks will be shown.

Best, Keegan (she/her/hers)

DengEr-1993 commented 1 year ago

@kdkorthauer Thank you for you answer. You may not understand my question. I know how to add the gene information through the annoTrack parameter and it works perfect.

But I want to show one gene that I am interested in. For example, the gene SAMD11 (I select it randomly here), if it has significance after dmrseq, and then I want to see methylation on this gene. So how should I do to focus this region ?Thank you.

kdkorthauer commented 1 year ago

The purpose of the function is really focused on visualizing DMRs. To do what you are proposing, you would need to construct that region yourself (e.g. a region containing SAMD11) and pass it to the plotting function. Or, select the DMR(s) that overlap a region containing your gene of interest using GenomicRanges functions, and then pass that to the plotting function. Hope that helps!

Best, Keegan