show_dmsg: show_dmsg() This function generates will plot heatmaps of...

Description Usage Arguments Value Examples

View source: R/show_dmsg.R

Description

show_dmsg() This function generates will plot heatmaps of methylation level of sites in dmgenes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
show_dmsg(
  mrobj,
  dmsg,
  destrand = FALSE,
  min.nsites = 2,
  max.nsites = 60,
  min.pdmsites = 10,
  mc.cores = 1,
  outflabel = ""
)

Arguments

mrobj

A methylKit methylRaw or methylRawList object

dmsg

A list containing GRanges objects dmsites and dmgenes returned by det_dmsg()

destrand

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

min.nsites

Required minimal number of msites in a gene for the gene to be displayed in the heatmap pdf

max.nsites

Required maximal number of msites in a gene for the gene to be displayed in the heatmap pdf

min.pdmsites

Required minimal percent of dmsites among the msites in a gene for the gene to be displayed in the heatmap pdf

mc.cores

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

outflabel

A string to identify the study in the output file

Value

A data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  mydatf <- system.file("extdata","Am.dat",package="BWASPR")
  myparf <- system.file("extdata","Am.par",package="BWASPR")
  myfiles <- setup_BWASPR(datafile=mydatf,parfile=myparf)
  samplelist <- list("forager","nurse")
  AmHE <- mcalls2mkobj(myfiles$datafiles,species="Am",study="HE",
                       sample=samplelist,replicate=c(0),
                       type="CpGhsm",mincov=1,assembly="Amel-4.5")
  genome_ann <- get_genome_annotation(myfiles$parameters)
  dmsgList <- det_dmsg(AmHE,genome_ann,
                       threshold=25.0,qvalue=0.01,mc.cores=4,destrand=TRUE,
                       outfile1="AmHE-dmsites.txt", 
                       outfile2="AmHE-dmgenes.txt")
  dmgprp <- show_dmsg(AmHE,dmsgList,destrand=TRUE,
                      min.nsites=2,max.nsites=60,min.pdmsites=10,
                      mc.cores=4,outflabel="Am_HE")

BrendelGroup/BWASPR documentation built on Feb. 6, 2022, 9:09 a.m.