getCpGset {ramwas} | R Documentation

## Construct CpG set for a Reference Genome

### Description

Finds all CpGs in a reference genome.

### Usage

    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

    ### 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)

[Package ramwas version 1.14.0 Index]