getExpected: Calculate expected read counts or proportion of reads

View source: R/plotHelpers.R

getExpectedR Documentation

Calculate expected read counts or proportion of reads

Description

Calculate expected read counts or proportion of reads

Usage

getExpected(
  object,
  type = c("rc", "prop"),
  assay.names = c("expected_rc", "expected_prop")
)

Arguments

object

PhIPData object

type

any of 'rc' or 'prop' indicating whether the function should return the expected read counts or expected proportion of reads, respectively

assay.names

name(s) indicating where the results should be stored in the PhIPData object

Value

PhIPData object with the results stored in the location specified by assay.name.

Examples

sim_data <- readRDS(system.file("extdata", "sim_data.rds", package = "beer"))

## Calculate expected read counts
getExpected(sim_data, "rc", "expected_rc")

## Calculate expected proportion of reads
getExpected(sim_data, "prop", "expected_prop")

## Calculate both
getExpected(sim_data)


athchen/beer documentation built on July 2, 2022, 10:35 p.m.