VisualizeDropout {bakR}R Documentation

Visualize dropout


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.


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



bakRFit or bakRFnFit object


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


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


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.


# 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)

[Package bakR version 1.0.0 Index]