annotate_methylome: annotate_methylome() This function annotates the methylome...

View source: R/annotate_methylome.R

annotate_methylomeR Documentation

annotate_methylome() This function annotates the methylome with different genomic features (e.g. genes, exon, promoter, etc.)

Description

annotate_methylome() This function annotates the methylome with different genomic features (e.g. genes, exon, promoter, etc.)

Usage

annotate_methylome(
  mrobj,
  genome_ann,
  destrand = FALSE,
  mc.cores = mc.cores,
  outfile = "methylome_ann.txt"
)

Arguments

mrobj

A methylRawList object that is generated by mcalls2mkobj()

genome_ann

A list of GRanges objects that contain genome annotation.

destrand

methylKit::unite() parameter; default: FALSE. destrand=TRUE combines CpG methylation calls from both strands

mc.cores

Integer denoting how many cores should be used for parallel diffential methylation calculations

outfile

If specified as other than "", the result is saved in the specified file.

Value

A table that displays site methylation percentages and annotation

Examples

  mydatf <- system.file("extdata","Am.dat",package="BWASPR")
  myparf <- system.file("extdata","Am.par",package="BWASPR")
  myfiles <- setup_BWASPR(datafile=mydatf,parfile=myparf)
  AmHE <- mcalls2mkobj(myfiles$datafiles)
  genome_ann <- get_genome_annotation(myfiles$parameters)
  annotate_methylome(AmHE,genome_ann,mc.cores=4,
                     outfile="AmHE_methylome_ann.txt")


BrendelGroup/BWASPR documentation built on June 2, 2025, 7:25 a.m.