constructFeatures: Feature construction

View source: R/constructFeatures.R

constructFeaturesR Documentation

Feature construction

Description

Helper function to make a data frame ready for training/validation/testing from a bsseq object that contains the CpG/DNA features for the model

Usage

constructFeatures(bs, sample = 1, minCov = 10, sampleAvg = TRUE,
  neighbMeth = TRUE, neighbDist = TRUE, featureBEDs = NULL)

Arguments

bs

a BSseq object

sample

which sample to construct features for; default is 1, the first sample.

minCov

the minimum coverage, below which values will be set to NA. Default is 10.

sampleAvg

boolean of whether to not to include the sample average as a feature. Default is TRUE.

neighbMeth

boolean of whether or not to include nearest non-missing neighboring CpG methylation values. Default is TRUE.

neighbDist

boolean of whether or not to include nearest non-missing neighboring CpG distances. Default is TRUE.

featureBEDs

optional named list of paths to BED files to be included as features in the model. Names are used as the feature name; e.g. list(chromState = "chromatinStates.bed")

Value

a data.frame, each row is a CpG; first column is the actual beta value, subsequent columns are features


lulizou/boostme documentation built on March 16, 2023, 7:35 a.m.