Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
abel.vertesy committed Oct 4, 2023
1 parent 85f3632 commit a1546a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Thumbs.db
# Output files from R CMD check
/*.Rcheck/
# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf
Expand All @@ -41,4 +41,3 @@ PlayGround.DoNotUse.R
# Plots accidentally saved
.pdf
.png
Seurat.utils.Rproj
9 changes: 6 additions & 3 deletions R/Seurat.Utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4606,11 +4606,14 @@ calculate.observable.multiplet.rate.10X <- function(

hetero.doublet.rate = 1 - sum(homo.doublet)


doublet.distribution <- c(homo.doublet, 'hetero' = hetero.doublet.rate)
annotation <- paste(names(empir.factor), "10X chip | Fractions:\n", paste_w_names(percentage_formatter(fractions, keep.names = T)), sep = ': ')

if (draw_plots) {
qpie(doublet.distribution
, subtitle = paste(names(empir.factor), "10X chip")
, caption = paste('We can only observe hetero.doublets', percentage_formatter(hetero.doublet.rate))
, caption = paste('We can only observe hetero.doublets', percentage_formatter(hetero.doublet.rate)
, '\n', annotation)
, suffix = suffix
, plot = T
, ...)
Expand All @@ -4621,7 +4624,7 @@ calculate.observable.multiplet.rate.10X <- function(

if (draw_plots) {
qbarplot(Expected.singlet.doublet.distribution
, subtitle = paste(names(empir.factor), "10X chip | Fractions:", paste_w_names(iround(fractions)), sep = ': ')
, subtitle = annotation
, label = percentage_formatter(Expected.singlet.doublet.distribution)
, col = c(3,1,1,2), xlab.angle = 45
, ylab = "Fraction of 'Cells'", xlab = 'Doublet status'
Expand Down

0 comments on commit a1546a8

Please sign in to comment.