hansenlab / bsseq

Devel repository for bsseq
36 stars 26 forks source link

Create a read.modkit() function to read in methyl Bed files created from modkit to Bsseq objects #130

Closed yixuan-chen-elisa closed 1 year ago

yixuan-chen-elisa commented 1 year ago

A read.modkit() function was created to read into methyl bed files and construct BSseq objects. When N_other_mod (number of reads that pass thresholds and where modification is different from the listed base) are all zeros, we construct one BSseq object, similar to how we construct BSseq objects using read.modbam2bed(). When there are non-zero N_other_mod reads, N_other_mod and its corresponding coverage, cov_other_mod, are stored in addition to N_mod and its corresponding coverage. Two Bsseq objects are constructed with the first one having N_mod as methylation, N_mod + N_canonical as coverage and the second one having N_other_mod as methylation, N_other_mod + N_canonical as coverage.