scaleDOR: Function to scale drop-off rates across replicates to a...

Description Usage Arguments Value Error Author(s) References See Also Examples

View source: R/scaleDOR.R

Description

The function extracts all nucleotides selected for control-control and treatment-control comparisons and scales them to have a common median across all replicates. This value is computed as the median of all drop-off rates of the selected nucleotides in control replicate samples. The function requires the output of selectNuclPos, which holds lists of nucleotide positions selected for pair-wise comparisons.

Usage

1
    scaleDOR(se, nuclSelection, Nc, Nt)

Arguments

se

A SummarizedExperiment object storing structure probing data and the associated genomic sequence. The documentation for the example data set provided with the package se outlines how the object should be defined. scaleDOR uses the assay "dropoff_rate".

nuclSelection

A list returned by selectNuclPos, containing the positions of nucleotides selected for all control-control and treatment-control comparisons.

Nc

Number of control replicate samples. Must be at least 2.

Nt

Number of treatment replicate samples. Must be at least 2.

Value

Returns a modified n-by-m matrix of drop-off rates, scaled per replicate to have the same median value, where n is the number of nucleotides and m is the total number of replicate samples.

Error

The following errors are returned if:

"Number of control and treatment replicates must be at least 2." the number of control or treatment experimental replicates is less than 2;

"Nucleotide selection should have two elements." "All lists of positions selected for pair-wise comparisons or for which posteriors will be computed should be non-empty." the list containing positions of nucleotides selected for control-control and treatment-control comparisons does not have 2 elements or any of the elements is empty;

"Drop-off rate matrix should not have any NA entries." the drop-off rate matrix has NA entries.

Author(s)

Alina Selega, Sander Granneman, Guido Sanguinetti

References

Selega et al. "Robust statistical modeling improves sensitivity of high-throughput RNA structure probing experiments", Nature Methods (2016).

See Also

See Also selectNuclPos.

Examples

1
2
3
4
5
    Nc <- 3
    Nt <- 3
    t <- 1
    nuclSelection <- selectNuclPos(se, Nc, Nt, t)
    dorFile <- scaleDOR(se, nuclSelection, Nc, Nt)

BUMHMM documentation built on Nov. 8, 2020, 5:13 p.m.