Skip to content
cccskills
FreePublished on GitHub

bioconductor-demuxmix

A package for demultiplexing single-cell sequencing experiments of pooled cells labeled with barcode oligonucleotides. The package implements methods to fit regression mixture models for a probabilistic classification of cells, including multiplet detection. Demultiplexing error rates can be estimated, and methods for quality control are provided.

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md5.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

demuxmix

Workflows

Standard Workflow

Demultiplex pooled single-cell samples labeled with multiple hashtag oligonucleotides (HTOs) using regression or naive mixture models.

library(demuxmix)

# Simulate a small example dataset
set.seed(2642)
class <- rbind(
  c(rep(TRUE, 220), rep(FALSE, 200)),
  c(rep(FALSE, 200), rep(TRUE, 220))
)
simdata <- dmmSimulateHto(class)
hto <- simdata$hto
rna <- simdata$rna

# Run demuxmix and summarize results
dmm <- demuxmix(hto, rna = rna)
summary(dmm)

# Classify droplets and plot QC histogram
classes <- dmmClassify(dmm)
table(classes$HTO)
plotDmmHistogram(dmm)

Input/Output Note: Inputs an HTO count matrix and a vector of detected genes per droplet; outputs a classified data frame of singlets, multiplets, negatives, and uncertain droplets.

Pooling Non Labeled With Labeled Cells

Demultiplex a mixture of labeled cells and non-labeled cells (e.g., rare cells) using a single HTO channel.

library(demuxmix)
data(csf)

# Filter out low-quality droplets
csf <- csf[csf$NumGenes >= 200, ]
hto <- t(matrix(csf$HTO, dimnames = list(rownames(csf), "HTO")))

# Fit regression mixture model
dmm <- demuxmix(hto, rna = csf$NumGenes)
summary(dmm)
dmmOverlap(dmm)

# Generate QC plots
plotDmmHistogram(dmm)
plotDmmScatter(dmm)

# Classify droplets into labeled (positive) and non-labeled (negative)
class <- dmmClassify(dmm)
table(class$HTO)

Input/Output Note: Inputs a single-channel HTO matrix and a vector of detected genes; outputs classifications separating labeled cells (positive) from non-labeled cells (negative).

When to Use

  • To demultiplex pooled single-cell RNA-seq samples labeled with hashtag oligonucleotides (HTOs) using negative binomial regression mixture models via demuxmix().
  • To leverage the positive association between the number of detected genes per droplet and HTO counts to improve classification accuracy.
  • To identify multiplets and estimate false discovery rates (FDR) using summary().
  • To demultiplex a mixture of labeled cells (e.g., PBMCs) and non-labeled cells (e.g., rare CSF cells) using a single HTO channel.

When NOT to Use

  • For demultiplexing genetically diverse pooled samples without HTOs; use genetic demultiplexing tools like freemuxlet because demuxmix requires HTO count data.
  • For general cell clustering or cell-type annotation; use Seurat or scran because demuxmix is strictly for sample demultiplexing.
  • For processing raw FASTQ files into count matrices; use CellRanger or Alevin because demuxmix requires pre-computed HTO and RNA count matrices.

Data Requirements

  • Input format: A raw HTO count matrix (HTOs as rows, droplets/cells as columns) and a vector of the number of detected genes per droplet (RNA).
  • Structure: Droplets must be pre-filtered to remove empty and low-quality droplets (e.g., using emptyDrops).
  • Normalization: Raw, untransformed integer counts are required for both HTO and gene counts.

Key Parameters

  • rna (NULL): A numeric vector containing the number of detected genes per droplet.
  • model ("regression"): Character string specifying the mixture model type ("regression" or "naive").
  • pAcpt (0.9 or 0.729 depending on model): The minimum posterior probability required to classify a droplet; droplets below this are marked as "uncertain".

Best Practices

  • Remove empty and low-quality droplets using emptyDrops before running demuxmix().
  • Use the default regression mixture model (model = "regression") to leverage the positive correlation between HTO counts and detected genes.
  • Verify the model fit by plotting density histograms overlaid with the mixture probability mass function using plotDmmHistogram().
  • Check the overlap between positive and negative components using dmmOverlap(); an overlap of less than 0.03 indicates excellent separation.

Common Pitfalls

  • Too many "uncertain" classifications: Occurs when HTO quality is moderate or background is high. Fix: Lower the acceptance probability pAcpt (e.g., pAcpt(dmm) <- 0.7 or 0) to force classification, keeping in mind this may increase the error rate.
  • Flat red component in histogram: Occurs when sequencing depth is very high or many samples are pooled. Fix: Use coord_cartesian() to zoom into the critical overlap region of the histogram.
  • Poor regression fit in negative droplets: Occurs when background HTO staining is extremely low. Fix: The package handles this, but you can switch to model = "naive" if the association between HTO and gene counts is absent.

Alternatives

  • hashedDrops (from DropletUtils): For HTO demultiplexing without explicitly modeling the gene-HTO correlation.
  • Seurat (HTODemux): For demultiplexing using a k-medoids clustering approach on normalized HTO counts.
  • freemuxlet: For genetic demultiplexing of pooled samples from genetically unrelated donors.

Citations

  • Stoeckius et al. (2018), Genome Biology.

References

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

The English summary is being prepared. Showing the original description.

bioMate-AI/biomate-bioconductor-kb793Updated Jun 21, 2026

See all skills by bioMate-AI

Report a problem with this skill