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

Description Usage Arguments Value Examples

View source: R/map_mrpr.R

Description

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

Usage

1
map_mrpr(hsmrL, species, slabel, genome_ann, gnmsize, UTRflag, outfile)

Arguments

hsmrL

List of data frames with hsm rich and poor regions, as put out by

species

Label for the species being analyzed

slabel

Label for the sample

genome_ann

A list of GRanges objects that contains genome annotation.

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

Data frames describing genes overlapping with methylation-rich and poor regions

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")
  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])
  AmHE <- mcalls2mkobj(infiles$datafiles,species="Am",study="HE",
                       sample=list("forager","nurse"),replicate=c(0),
                       type="CpGhsm",mincov=1,assembly=asmblv
                      )
  hsmrL <- det_mrpr(AmHE[[1]],"Am_HE_fr",ddset=c(1,5),outfile="dst-Am_HE_fr.txt",nr2d=10L,doplots=TRUE)
  ginfo <- get_genome_annotation(infiles$parameters)
  map_mrpr(hsmrL,species="Am",slabel="forager_hsm",ginfo,gnmsize,UTRflag=UTRflag,
           outfile="AmHE-region.map.txt"
          )

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