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

Description Usage Arguments Value Examples

View source: R/annotate_methylome.R

Description

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

Usage

1
2
3
4
5
6
7
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

1
2
3
4
5
6
7
  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 Feb. 6, 2022, 9:09 a.m.