map_methylome: map_methylome() This function maps the scd and hsm sites onto...

View source: R/map_methylome.R

map_methylomeR Documentation

map_methylome() This function maps the scd and hsm sites onto different genomic features (e.g. genes, exon, promoter, etc.)

Description

map_methylome() This function maps the scd and hsm sites onto different genomic features (e.g. genes, exon, promoter, etc.)

Usage

map_methylome(
  studymk,
  slabel,
  studymc,
  clabel,
  genome_ann,
  species,
  gnmsize,
  UTRflag,
  outfile = ""
)

Arguments

studymk

methylRaw object representing an hsm sample

slabel

Label for the sample

studymc

methylRaw object representing the scd control

clabel

Label for the control sample

genome_ann

A list of GRanges objects that contains genome annotation.

species

Label for the species being analyzed

gnmsize

Genome size

UTRflag

Numerical, indicating whether or not the annotation included UTRs (1 or 0)

outfile

If specified, then the result is saved in the specified file name.

Value

Should return something useful

Examples

  mydatf <- system.file("extdata","Am.dat",package="BWASPR")
  myparf <- system.file("extdata","Am.par",package="BWASPR")
  infiles <- setup_BWASPR(datafile=mydatf,parfile=myparf)
  asmblv <- infiles$parameters[infiles$parameters$Variable == "ASSEMBLYVERSION",2]
  gnmsize <- as.numeric(infiles$parameters[infiles$parameters$Variable == "GENOMESIZE",2])
  UTRflag <- as.numeric(infiles$parameters[infiles$parameters$Variable == "UTRFLAGSET",2])
  AmHEhsm <- mcalls2mkobj(infiles$datafiles,species="Am",study="HE",
                          sample=list("forager","nurse"),replicate=c(0),
                          type="CpGhsm",mincov=1,assembly=asmblv
                         )
  AmHEscd <- mcalls2mkobj(infiles$datafiles,species="Am",study="HE",
                          sample=list("forager","nurse"),replicate=c(0),
                          type="CpGscd",mincov=1,assembly=asmblv
                         )
  ginfo <- get_genome_annotation(infiles$parameters)
  map_methylome(AmHEhsm[[1]],"forager_hsm",AmHEscd[[1]],"forager_scd",ginfo,
                species="Am",gnmsize,UTRflag=UTRflag,
                outfile="AmHE-methylome-map.txt"
               )


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