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

Description Usage Arguments Value Examples

View source: R/cmStats.R

Description

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

Usage

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

1
2
3
4
5
6
7
  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 Feb. 6, 2022, 9:09 a.m.