Convert NanoMethResult object to edgeR methylation matrix
Source:R/bsseq_to_edger.R
methy_to_edger.Rd
Convert NanoMethResult object to edgeR methylation matrix
Usage
methy_to_edger(methy, regions = NULL, out_folder = tempdir(), verbose = TRUE)
Arguments
- methy
the NanoMethResult object or path to the methylation tabix file.
- regions
the regions to calculate log-methylation ratios over. If left NULL, ratios will be calculated per site.
- out_folder
the folder to store intermediate files. One file is created for each sample and contains columns "chr", "pos", "total" and "methylated".
- verbose
TRUE if progress messages are to be printed
Examples
nmr <- load_example_nanomethresult()
edger_mat <- methy_to_edger(nmr)
#> [2024-08-22 04:05:39] creating intermediate files...
#> [2024-08-22 04:05:39] parsing chr11...
#> [2024-08-22 04:05:39] parsing chr12...
#> [2024-08-22 04:05:39] parsing chr18...
#> [2024-08-22 04:05:39] parsing chr5...
#> [2024-08-22 04:05:39] parsing chr7...
#> [2024-08-22 04:05:39] parsing chrX...
#> [2024-08-22 04:05:39] 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:05:39] creating bsseq object...
#> [2024-08-22 04:05:39] reading in parsed data...
#> [2024-08-22 04:05:39] constructing matrices...
#> [2024-08-22 04:05:39] done