FelixKrueger / Bismark

A tool to map bisulfite converted sequence reads and determine cytosine methylation states
http://felixkrueger.github.io/Bismark/
GNU General Public License v3.0
382 stars 101 forks source link

How to extract CpG level for IGV plot #636

Closed abearab closed 11 months ago

abearab commented 11 months ago

Hi @FelixKrueger – I have another question! I could solve my issue here https://github.com/FelixKrueger/Bismark/issues/633 and now I'm trying to show a close-ups of genomic region of interest, something like this plot:

Fig 2F. https://doi.org/10.1016/j.cell.2021.03.025 (@hovestadt's original work)

image

(F) A comparison of CpG methylation along a 55-kb window that includes the CLTA locus. Tracks labeled “Untr.” represent untransfected cells; the “NT” tracks represent cells transfected with CRISPRoff and non-targeting sgRNA; and the “T” tracks represent cells transfected with CRISPRoff and targeting sgRNA. R1 and R2 represent two technical replicates. Red marks represent methylated (beta-value >0.5) and the blue marks represent unmethylated (<0.5) CpG dinucleotides. CpG islands are shown in green.

Close-ups of genomic regions were generated by visualizing beta-values of individual loci in IGV. Data was displayed as bar charts (min/0: blue, mid/0.5, max/1: red).


I don't know the right way to prepare the CpG methylation info from bismark outputs for building this visualization. Do you have any recommendation? Thanks agin for sharing your expert advice.

FelixKrueger commented 11 months ago

I am not exactly sure about how to get the data into IGV as we have used Seqmonk for this purpose in the past, see e.g. here: https://www.ncbi.nlm.nih.gov/core/lw/2.0/html/tileshop_pmc/tileshop_pmc_inline.html?title=Click%20on%20image%20to%20zoom&p=PMC3&id=4965689_f1000research-5-9980-g0002.jpg

Here are some more examples on how to get started with methylation analysis in SeqMonk: https://www.bioinformatics.babraham.ac.uk/training.html#bsseq. It is really dead-easy as SeqMonk simply accepts Bismark coverage files (.cov.gz) as input, so you can literally get a figure as the one shown above in the matter of a few minutes.

abearab commented 11 months ago

Thanks for your response! One dumb question, the expected .cov.gz file is the output of bismark_methylation_extractor command, right? How would you use it (i.e. what options)?

FelixKrueger commented 11 months ago

It is indeed, just use the option --bedGraph for the methylation extraction. Or --help for more info. Here are the docs: https://felixkrueger.github.io/Bismark/bismark/methylation_extraction/

abearab commented 11 months ago

Okay, that's the bedGraph file. Thanks

FelixKrueger commented 11 months ago

The coverage file is pretty much the same as the bedGraph file, but in addition contains the counts methylated and unmethylated cytosines.