Convert BSseq object to log-methylation-ratio matrix
Source:R/bsseq_to_edger.R
bsseq_to_log_methy_ratio.Rd
Creates a log-methylation-ratio matrix from a BSseq object that is useful for dimensionality reduction plots.
Examples
nmr <- load_example_nanomethresult()
bsseq <- methy_to_bsseq(nmr)
#> [2024-08-22 04:04:35] creating intermediate files...
#> [2024-08-22 04:04:35] parsing chr11...
#> [2024-08-22 04:04:35] parsing chr12...
#> [2024-08-22 04:04:35] parsing chr18...
#> [2024-08-22 04:04:35] parsing chr5...
#> [2024-08-22 04:04:35] parsing chr7...
#> [2024-08-22 04:04:35] parsing chrX...
#> [2024-08-22 04:04:35] samples found: B6Cast_Prom_3_cast B6Cast_Prom_3_bl6 B6Cast_Prom_2_cast B6Cast_Prom_2_bl6 B6Cast_Prom_1_cast B6Cast_Prom_1_bl6
#> [2024-08-22 04:04:35] creating bsseq object...
#> [2024-08-22 04:04:35] reading in parsed data...
#> [2024-08-22 04:04:35] constructing matrices...
#> [2024-08-22 04:04:35] done
regions <- exons_to_genes(NanoMethViz::exons(nmr))
log_m_ratio <- bsseq_to_log_methy_ratio(bsseq, regions)