Description Usage Arguments Examples
View source: R/cumulative_fraction_reads_per_cell.R
Calculate and plot cumulative fraction of reads per detected cell barcode. The cumulative fraction can be plotted to estimate the number of sequenced cells by identifying the "knee" of the distribution. For further details on selection of cells, see the Drop-seq alignment cookbook provided by the McCarroll lab.
1 2 | plot_cumfrac_rpc(read_counts, nbcs = 50000, title = NULL, size = 1,
cumfrac_col = "steelblue", ncells = NULL, ncells_col = "red")
|
read_counts |
A data.frame containing the number of reads per cell barcode. Should consist of two columns, whereas the number of reads must in the first and the barcode identity in the second column. This is typically produced by running BAMTagHistogram from Drop-seq tools. |
nbcs |
Number of cell barcodes to be plotted on the x-axis. |
title |
String containing plot title. |
size |
Size used for plotting the cumulative fraction and optional ncell line. |
cumfrac_col |
Color for plotting the cumulative fraction line |
ncells |
(optional) Estimate of how many cells are inculed in sample. A vertical line will be drawn at x = ncells. |
ncells_col |
Color for plotting the vertical line if ncells is specified. |
1 2 3 4 5 6 7 8 9 10 11 | library(dropseqr)
# load example dataset
data(reads_per_cell_barcode)
# cumulative fraction with default settings
plot_cumfrac_rpc(reads_per_cell_barcode, title = "Experiment 42")
# zoom in and draw line at estimated number of cells
plot_cumfrac_rpc(reads_per_cell_barcode, title = "Experiment 42",
nbcs = 30000, ncells = 3500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.