methyl_circle_plotCpG: Draw methylation circle plot without SNP

Description Usage Arguments Value Examples

View source: R/methyl_circle_plot.R

Description

Draws CpG site methylation status as points, in reads containing a specific CpG site. Generates one plot per bam file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
methyl_circle_plotCpG(
  cpgsite = cpgsite,
  bamFile = bamFile,
  pointSize = 3,
  refFile = refFile,
  dame = NULL,
  order = FALSE,
  sampleName = NULL,
  sampleReads = FALSE,
  numReads = 20
)

Arguments

cpgsite

GRanges object containing a single CpG site location of interest

bamFile

bismark bam file path

pointSize

Size of methylation circles. Default = 3.

refFile

fasta reference file path

dame

(optional) GRanges object containing a region to plot

order

Whether reads should be sorted by methylation status. Default= False.

sampleName

Plot title.

sampleReads

Whether a subset of reads should be plotted. Default = FALSE.

numReads

Number of reads to plot, if sampleReads is TRUE. Default = 20

Value

Plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
DATA_PATH_DIR <- system.file('extdata', '.', package = 'DAMEfinder')
get_data_path <- function(file_name) file.path(DATA_PATH_DIR, file_name)
bam_files <- get_data_path('NORM1_chr19_trim.bam')
sample_names <- 'NORM1'
#reference_file
suppressPackageStartupMessages({library(BSgenome.Hsapiens.UCSC.hg19)})
genome <- BSgenome.Hsapiens.UCSC.hg19
seqnames(genome) <- gsub("chr","",seqnames(genome))
dna <- DNAStringSet(genome[[19]], use.names = TRUE)
names(dna) <- 19

cpg <- GenomicRanges::GRanges(19, IRanges::IRanges(292082, width = 1))
methyl_circle_plotCpG(cpgsite = cpg,
 bamFile = bam_files,
 refFile = dna)

DAMEfinder documentation built on Nov. 8, 2020, 11:10 p.m.