Anticlustering for sample allocation to minimize batch effects
High-throughput sequencing enables efficient processing of DNA and RNA samples in batches, but batch effects can obscure true biological signal. We propose using anticlustering as an automated method to assign samples to balanced batches, minimizing covariate imbalance and supporting user-defined constraints such as batch size, number of batches, and "must-link" assignments. In simulations, anticlustering outperforms existing methods in assigning balanced batches. We illustrate its utility using a real-life example from the University of California, San Francisco (UCSF)-Stanford Endometriosis Center for Discovery, Innovation, Training and Community Engagement (ENACT) Center, where multiple samples per individual required processing within the same batch to avoid confounding. The Two-Phase Must-Link (2PML) anticlustering algorithm realized the must-link restrictions while balancing disease stage, menstrual cycle phase, case vs. control, and clinical site. All methods are accessible via the free, open-source R package anticlust, with a companion RShiny web app for visualization and interactive batch assignment.
Authors
- Maïgane Diop (ORCID: https://orcid.org/0000-0003-2580-8084)
- Syed Bukhari (ORCID: https://orcid.org/0000-0002-6861-2623)
- Kim Chi Vo (ORCID: https://orcid.org/0000-0001-5581-1642)
- Linda C. Giudice (ORCID: https://orcid.org/0000-0002-1677-0822)
- Gunnar W. Klau (ORCID: https://orcid.org/0000-0002-6340-0090)
- Tomiko Oskotsky (ORCID: https://orcid.org/0000-0001-7393-5120)
- Brice Gaudillière (ORCID: https://orcid.org/0000-0002-3475-5706)
- Martin Papenberg (ORCID: https://orcid.org/0000-0002-9900-4268)
- Jingjing Li (ORCID: https://orcid.org/0000-0002-6337-7185)
- Bi‐Cheng Liu (ORCID: https://orcid.org/0000-0002-4584-1853)
- Juan C. Irwin (ORCID: https://orcid.org/0000-0002-5647-4331)
- Brittany Davidson (ORCID: https://orcid.org/0000-0003-3538-2822)
- Boris Oskotsky (ORCID: https://orcid.org/0000-0002-9364-7051)
- Alexis J. Combes (ORCID: https://orcid.org/0000-0002-9110-6542)
- Marina Sirota (ORCID: https://orcid.org/0000-0002-7246-6083)
- Cheng Wang (ORCID: https://orcid.org/0000-0002-2497-3099)
- David K. Stevenson (ORCID: https://orcid.org/0000-0002-7127-0281)
Institutions
- University of California, San Francisco (US)
- Reproductive Science Center (US)
- Stanford Medicine (US)
- Broad Center (US)
- Heinrich Heine University Düsseldorf (DE)
- University of San Francisco (US)
- Stanford University (US)
Publication Details
- Journal
- Cell Reports Methods
- Published
- 2025-08-01
- DOI
- https://doi.org/10.1016/j.crmeth.2025.101137
- Primary Topic
- Gene expression and cancer classification
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Institutes of Health
- National Institute of Child Health and Human Development
- Eunice Kennedy Shriver National Institute of Child Health and Human Development