getCpGset: Construct CpG set for a Reference Genome

Description Usage Arguments Details Value Author(s) Examples

Description

Finds all CpGs in a reference genome.

Usage

1
2
getCpGsetCG(genome)
getCpGsetALL(genome)

Arguments

genome

A BSgenome object or a character vector with genome sequences.

Details

The getCpGsetCG function searches for all CG pairs in the genome.
The getCpGsetALL function also works for genomes with injected SNPs.

Value

Returns a list with CpG coordinates for each genome sequence.

Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
### 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)

andreyshabalin/ramwas documentation built on Sept. 27, 2021, 7:25 p.m.