Takes methylation data and sets of regions then aggregates methylation for each region set and scores the resulting profile. A wrapper for aggregateMethyl and scoreDip but it does not return the summary methylation profiles, just the scores. This function is given only for convenience in working with small numbers of samples/region sets. For large analyses, "aggregateMethyl" and "scoreDip" are recommended. See vignettes for recommended use of MIRA.

MIRAScore(BSDT, GRList, binNum = 11, scoringMethod = "logRatio",
  minReads = 500)

Arguments

BSDT

A single data table that has DNA methylation data on individual sites. #' Alternatively a BSseq object may be input which will be converted internally to data.table/s (sample names must be in BSseq object). For the data.table input, it should include a "chr" column with chromosome, a "start" column with the coordinate number for the cytosine, a "methylProp" column with proportion of methylation (0 to 1), optionally a "methylCount" column with number of methylated reads for each site, optionally a "coverage" column with total number of reads for each site, and a "sampleName" column with a sample identifier/name (required).

GRList

A GRangesList object containing region sets, each set corresponding to a regulatory element (or having regions with the same biological annotation). Each regionSet in the list should be named.

binNum

How many bins each region should be split into for aggregation of the DNA methylation data.

scoringMethod

Method to calculate MIRA score after binning. "logRatio" is currently the only option. See scoreDip function.

minReads

Filter out bins with fewer than minReads reads. Only used if there is a 'coverage' column in BSDT

Value

A data.table with a MIRA score for each region set in GRList. See ?scoreDip. If input for "BSDT" is a BSseq object, output will be a list of data.tables if there were multiple samples in the BSseq object.

Examples

data("exampleBSDT", package = "MIRA") data("exampleRegionSet", package = "MIRA") MIRAScore(BSDT = exampleBSDT, GRList = exampleRegionSet)
#> Converting to GRangesList...
#> Warning: GRList should be a named list/GRangesList. The region sets were assigned sequential names based on their order in the list.
#> featureID sampleName score #> 1: RegionSet1 Gm06990_1 0.2506943