cmStats: cmStats() This function generates coverage and methylation...

View source: R/cmStats.R

cmStatsR Documentation

cmStats() This function generates coverage and methylation statistics for the input data set.

Description

cmStats() This function generates coverage and methylation statistics for the input data set.

Usage

cmStats(
  mrobj,
  type = "CpGhsm",
  covlist = c(10),
  locount = 100,
  hicount = 1000,
  outfile = "",
  plotfile = ""
)

Arguments

mrobj

A methylRaw object

type

The type should be CpGhsm or CpGscd, as per BWASP output.

covlist

A vector of coverage threshols; default: c(10)

locount

Low coverage threshold for statistics on a range of sites; default: c(100)

hicount

High coverage threshold for statistics on a range of sites; default: c(1000)

outfile

If specified then output is printed to the specified file.

plotfile

If specified other than the default "", then plots are saved in PDF file "plotfile".pdf; otherwise either no plots are generated or the R default plot outputs are used.

Value

the coverage count for the highest threshold in covlist

Examples

  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,species="Am",study="HE",
                       type="CpGhsm", mincov=1,assembly="Amel-4.5")
  cmStats(AmHE[[1]],type="CpGhsm",covlist=c(10,20),locount=100,hicount=1000,
          outfile="Am_HE-statistics.txt",plotfile="myplots")


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