summarizeKmers: Compute K-mer summary metrics from probe intensities

Description Usage Arguments Details Value Author(s)

View source: R/summarizeKmers.R

Description

This function calculates k-mer intensity information from PBM data.

Usage

1
2
3
4
5
6
7
8
9
summarizeKmers(
  pe,
  assay = SummarizedExperiment::assayNames(pe)[1],
  kmers = uniqueKmers(8L),
  metrics = c("median", "mean", "mad", "sd", "log2mean", "log2mad", "log2sd", "na",
    "quantile"),
  offset = 1,
  q = 0.25
)

Arguments

pe

a PBMExperiment object containing PBM intensity data.

assay

a string name of the assay to adjust. (default = SummarizedExperiment::assayNames(pe)[1])

kmers

a character vector of k-mers to predict. (default = uniqueKmers(8L))

metrics

a character vector of statistics to calculate for each scan. The set of supported statistics are listed in the details. By default, all possible statistics are computed, but this is not recommended as it can be computational expensive. (default = c("median", "mean", "mad", "sd", "log2mean", "log2mad", "log2sd", "na", "quantile"))

offset

an integer offset to add to intensities before log2 scaling to prevent errors with zero intensities. If set to 0, probes with zero intensities are dropped/ignored for log-scaled metrics. (default = 1)

q

a vector of quantiles which should be used if "quantile" is specified as part of metrics. (default = 0.25)

Details

The following statistics are currently supported. * "median": median probe intensity * "mean": mean probe intensity * "mad": MAD probe intensity (scaled by 1.4826) * "sd": SD probe intensity * "log2mean": mean probe log2(intensity + offset) * "log2mad": MAD probe log2(intensity + offset) * "log2sd": SD probe log(intensity + offset) * "na": number of NA probes * "quantile": q-quantile probe intensity

Value

SummarizedExperiment object with intensity information summarized for k-mers. Each metric is returned as a separate assay, with each rows corresponding to k-mers. k-mer sequences and the number of corresponding probes are given in the rowdata of the object.

Author(s)

Patrick Kimes


pkimes/upbm documentation built on Oct. 17, 2020, 9:10 a.m.