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

Description Usage Arguments Value Examples

View source: R/map_methylome.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  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 Feb. 6, 2022, 9:09 a.m.