VisualizeDropout: Visualize dropout

View source: R/Visualizations.R

VisualizeDropoutR Documentation

Visualize dropout

Description

VisualizeDropout fits dropout model with QuantifyDropout, reports the fit results, and then generates a ggplot object showing the data used to infer the fit as well as the fitted nonlinear trend.

Usage

VisualizeDropout(obj, keep_data = FALSE, no_message = FALSE)

Arguments

obj

bakRFit or bakRFnFit object

keep_data

Logical; if TRUE, will return data used to make plots along with the plots themselves

no_message

Logical; if TRUE, will not output message regarding estimated rates of dropout in each sample

Value

If keep_data is FALSE, then a list of ggplot objects are returned, one for each +s4U sample. The plots show the relationship between a feature's fraction new and the difference between its +s4U and -s4U read coverage. Nonlinear-least squares fit is plotted on top of points as a blue line. If keep_data is TRUE, then the data used to make the plots is returned in addition to the list of plots.

Examples


# Simulate data for 500 genes and 2 replicates with 40% dropout
sim <- Simulate_relative_bakRData(500, 100000, nreps = 2, p_do = 0.4)

# Fit data with fast implementation
Fit <- bakRFit(sim$bakRData)

# Quantify dropout
DO_plots <- VisualizeDropout(Fit)



bakR documentation built on June 22, 2024, 6:55 p.m.