getCpGset {ramwas} | R Documentation |
Finds all CpGs in a reference genome.
getCpGsetCG(genome) getCpGsetALL(genome)
genome |
A |
The getCpGsetCG
function searches for all
CG
pairs in the genome.
The getCpGsetALL
function also works for genomes with injected SNPs.
Returns a list with CpG coordinates for each genome sequence.
Andrey A Shabalin andrey.shabalin@gmail.com
### Using a BSGenome input library(BSgenome.Ecoli.NCBI.20080805) cpgset = getCpGsetCG(BSgenome.Ecoli.NCBI.20080805) print("First 10 CpGs in NC_008253:") print(cpgset$NC_008253[1:10]) ### Using a character vector input genome = list( chr1 = "AGCGTTTTCATTCTGACTGCAACGGGCYR", chr2 = "AAAAAACGCCTTAGTAAGTGATTTTCGYR") cpgset1 = getCpGsetCG(genome) cpgset2 = getCpGsetALL(genome) print("Pure CG coordinates in the toy genome:") print(cpgset1) print("CG coordinates in the toy genome possible with SNPs:") print(cpgset2)