Here's the code to create Figure 3 from the research paper Y chromosome sequence and epigenomic reconstruction across human populations.
Fig. 3: Methylation landscape across the Y chromosome phylogeny. a Frequency of 5mC in the seven cell lines along the resolved MSY of the GRCh38. The methylation levels are calculated as the median 5mC frequency value in 250 kb sliding windows for each cell line. The sequence classes, the genes annotated, and the standard deviation (SD) of the methylation levels across cell lines are also shown. The standard deviation of the 5mC frequency is represented in a white-to-black scale, in which a darker color denotes a higher standard deviation value. b Median methylation value per cell line segregated by CpG annotation and sequence classes. CpG annotations are mutually exclusive regions that comprise: CpG islands (CGI), CpG shores (up to 2 kb away from the end of the CGI), CpG shelves (up to 2 kb away from the end of the CpG shores), and inter-CGI or open sea regions (where all remaining CpG are allocated). c 5mC frequencies on different gene features in X-degenerate and ampliconic sequence classes. Gene annotation features shown are TSS (region of 200 bp upstream of the transcription start site), both UTRs, and intragenic regions (which combine all exonic and intronic regions without considering the first gene exon). Extended version with the number of CpG sites in Supplementary Figs. 24 and 25. d Methylation frequencies in 3 CpG islands (CGI) surrounding the NLGN4Y and NLGN4Y-AS1 genes. Empty circles show the mean 5mC frequency per CGI, whereas smaller colored points indicate the individual value in each cell line. Source data are provided in Supplementary Data 8.
Reference: Esteller-Cucala, P., Palmada-Flores, M., Kuderna, L.F.K. et al. Y chromosome sequence and epigenomic reconstruction across human populations. Commun Biol 6, 623 (2023). https://doi.org/10.1038/s42003-023-05004-9