compute_logratio {mpra} | R Documentation

## Compute activity measure (log-ratio) for each element.

### Description

Compute the log ratio of RNA counts to DNA counts using different methods. For `"mean"`, uses the average of barcode-specific log ratios. For `"sum"`, sums RNA and DNA counts over barcodes before forming the log ratio.

### Usage

    compute_logratio(object, aggregate = c("mean", "sum", "none"))

### Arguments

`object` | An object of class `MPRASet`.
`aggregate` | Aggregation method over barcodes: `"mean"` to use the average of barcode-specific log ratios, `"sum"` to use the log ratio of summed RNA and DNA counts, `"none"` to perform no aggregation (counts have already been summarized over barcodes).

### Value

A `matrix` with the same dimension as `object`, containing element- and sample-specific log ratios.

### Examples

      data(mpraSetAggExample)
      logr <- compute_logratio(mpraSetAggExample, aggregate = "sum")

[Package mpra version 1.10.0 Index]