plotSpike: Visualize distributional characteristics of spike-ins

View source: R/Plot.R

plotSpikeR Documentation

Visualize distributional characteristics of spike-ins

Description

This function plots the results of the parameter estimation for spike-ins. This includes the absolute and relative sequencing depth (i.e. library size factor), a calibration curve as well as the capture efficiency given as a binomial regression.

Usage

plotSpike(estSpike, Annot = TRUE)

Arguments

estSpike

The output of estimateSpike.

Annot

A logical vector. If TRUE, a short figure legend is included.

Value

A ggplot object.

Author(s)

Beate Vieth

Examples

## Not run: 
# using example data set
data("SCRBseq_SpikeIns_Read_Counts")
data("SCRBseq_SpikeInfo")
Batches = data.frame(Batch = sapply(strsplit(colnames(SCRBseq_SpikeIns_Read_Counts), "_"), "[[", 1),
                     stringsAsFactors = F,
                     row.names = colnames(SCRBseq_SpikeIns_Read_Counts))
# estimation
spikeparam <- estimateSpike(spikeData = SCRBseq_SpikeIns_Read_Counts,
                             spikeInfo = SCRBseq_SpikeInfo,
                             MeanFragLength = NULL,
                             batchData = Batches,
                             Normalisation = 'depth')
# plotting
plotSpike(estSpike = spikeparam, Annot = TRUE)

## End(Not run)

bvieth/powsimR documentation built on Aug. 19, 2023, 7:48 p.m.