IDEAS home Printed from https://ideas.repec.org/a/plo/pcbi00/1006135.html

beachmat: A Bioconductor C++ API for accessing high-throughput biological data from a variety of R matrix types

Author

Listed:
  • Aaron T L Lun
  • Hervé Pagès
  • Mike L Smith

Abstract

Biological experiments involving genomics or other high-throughput assays typically yield a data matrix that can be explored and analyzed using the R programming language with packages from the Bioconductor project. Improvements in the throughput of these assays have resulted in an explosion of data even from routine experiments, which poses a challenge to the existing computational infrastructure for statistical data analysis. For example, single-cell RNA sequencing (scRNA-seq) experiments frequently generate large matrices containing expression values for each gene in each cell, requiring sparse or file-backed representations for memory-efficient manipulation in R. These alternative representations are not easily compatible with high-performance C++ code used for computationally intensive tasks in existing R/Bioconductor packages. Here, we describe a C++ interface named beachmat, which enables agnostic data access from various matrix representations. This allows package developers to write efficient C++ code that is interoperable with dense, sparse and file-backed matrices, amongst others. We evaluated the performance of beachmat for accessing data from each matrix representation using both simulated and real scRNA-seq data, and defined a clear memory/speed trade-off to motivate the choice of an appropriate representation. We also demonstrate how beachmat can be incorporated into the code of other packages to drive analyses of a very large scRNA-seq data set.

Suggested Citation

  • Aaron T L Lun & Hervé Pagès & Mike L Smith, 2018. "beachmat: A Bioconductor C++ API for accessing high-throughput biological data from a variety of R matrix types," PLOS Computational Biology, Public Library of Science, vol. 14(5), pages 1-15, May.
  • Handle: RePEc:plo:pcbi00:1006135
    DOI: 10.1371/journal.pcbi.1006135
    as

    Download full text from publisher

    File URL: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006135
    Download Restriction: no

    File URL: https://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1006135&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pcbi.1006135?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Eddelbuettel, Dirk & Sanderson, Conrad, 2014. "RcppArmadillo: Accelerating R with high-performance C++ linear algebra," Computational Statistics & Data Analysis, Elsevier, vol. 71(C), pages 1054-1063.
    2. Jason D. Buenrostro & Beijing Wu & Ulrike M. Litzenburger & Dave Ruff & Michael L. Gonzales & Michael P. Snyder & Howard Y. Chang & William J. Greenleaf, 2015. "Single-cell chromatin accessibility reveals principles of regulatory variation," Nature, Nature, vol. 523(7561), pages 486-490, July.
    3. Bates, Douglas & Eddelbuettel, Dirk, 2013. "Fast and Elegant Numerical Linear Algebra Using the RcppEigen Package," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 52(i05).
    4. Greg Finak & Jacob Frelinger & Wenxin Jiang & Evan W Newell & John Ramey & Mark M Davis & Spyros A Kalams & Stephen C De Rosa & Raphael Gottardo, 2014. "OpenCyto: An Open Source Infrastructure for Scalable, Robust, Reproducible, and Automated, End-to-End Flow Cytometry Data Analysis," PLOS Computational Biology, Public Library of Science, vol. 10(8), pages 1-12, August.
    5. Kane, Michael & Emerson, John W. & Weston, Stephen, 2013. "Scalable Strategies for Computing with Massive Data," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 55(i14).
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Bogdan Oancea & Tudorel Andrei & Raluca Mariana Dragoescu, 2015. "Accelerating R with high performance linear algebra libraries," Romanian Statistical Review, Romanian Statistical Review, vol. 63(3), pages 109-117, September.
    2. Jos'e Vin'icius de Miranda Cardoso & Jiaxi Ying & Daniel Perez Palomar, 2020. "Algorithms for Learning Graphs in Financial Markets," Papers 2012.15410, arXiv.org.
    3. Lorenzo Tedesco & Jacopo Rodeschini & Philipp Otto, 2025. "Computational Benchmark Study in Spatio‐Temporal Statistics With a Hands‐On Guide to Optimise R," Environmetrics, John Wiley & Sons, Ltd., vol. 36(5), July.
    4. Wilson J. Wright & Peter N. Neitlich & Alyssa E. Shiel & Mevin B. Hooten, 2022. "Mechanistic spatial models for heavy metal pollution," Environmetrics, John Wiley & Sons, Ltd., vol. 33(8), December.
    5. Leyla Abbasova & Paulina Urbanaviciute & Di Hu & Joy N. Ismail & Brian M. Schilder & Alexi Nott & Nathan G. Skene & Sarah J. Marzi, 2025. "CUT&Tag recovers up to half of ENCODE ChIP-seq histone acetylation peaks," Nature Communications, Nature, vol. 16(1), pages 1-15, December.
    6. Maximilian Böck & Martin Feldkircher & Florian Huber, 2020. "BGVAR: Bayesian Global Vector Autoregressions with Shrinkage Priors in R," Globalization Institute Working Papers 395, Federal Reserve Bank of Dallas.
    7. Junyang Qian & Yosuke Tanigawa & Wenfei Du & Matthew Aguirre & Chris Chang & Robert Tibshirani & Manuel A Rivas & Trevor Hastie, 2020. "A fast and scalable framework for large-scale and ultrahigh-dimensional sparse regression with application to the UK Biobank," PLOS Genetics, Public Library of Science, vol. 16(10), pages 1-30, October.
    8. Shen, Yunyi & Olson, Erik R. & Van Deelen, Timothy R., 2021. "Spatially explicit modeling of community occupancy using Markov Random Field models with imperfect observation: Mesocarnivores in Apostle Islands National Lakeshore," Ecological Modelling, Elsevier, vol. 459(C).
    9. Jingyang Qian & Jie Liao & Ziqi Liu & Ying Chi & Yin Fang & Yanrong Zheng & Xin Shao & Bingqi Liu & Yongjin Cui & Wenbo Guo & Yining Hu & Hudong Bao & Penghui Yang & Qian Chen & Mingxiao Li & Bing Zha, 2023. "Reconstruction of the cell pseudo-space from single-cell RNA sequencing data with scSpace," Nature Communications, Nature, vol. 14(1), pages 1-18, December.
    10. Ronald Cutler & Laura Corveleyn & Claudia Ctortecka & Francesca LiCausi & Joshua Cantlon & Alvaro Sebastian Vaca Jacome & Dieter Deforce & Jan Vijg & Maarten Dhaenens & Malvina Papanastasiou & Steven , 2025. "Mass spectrometry-based profiling of single-cell histone post-translational modifications to dissect chromatin heterogeneity," Nature Communications, Nature, vol. 16(1), pages 1-18, December.
    11. Wei Jin & Jingchun Ma & Li Rong & Shengshuo Huang & Tuo Li & Guoxiang Jin & Zhongjun Zhou, 2025. "Semi-automated IT-scATAC-seq profiles cell-specific chromatin accessibility in differentiation and peripheral blood populations," Nature Communications, Nature, vol. 16(1), pages 1-13, December.
    12. Bandara, Kanchana & Varpe, Øystein & Ji, Rubao & Eiane, Ketil, 2018. "A high-resolution modeling study on diel and seasonal vertical migrations of high-latitude copepods," Ecological Modelling, Elsevier, vol. 368(C), pages 357-376.
    13. Zhe Yu & Raquel Prado & Erin Burke Quinlan & Steven C. Cramer & Hernando Ombao, 2016. "Understanding the Impact of Stroke on Brain Motor Function: A Hierarchical Bayesian Approach," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 111(514), pages 549-563, April.
    14. Haowen Zhang & Li Song & Xiaotao Wang & Haoyu Cheng & Chenfei Wang & Clifford A. Meyer & Tao Liu & Ming Tang & Srinivas Aluru & Feng Yue & X. Shirley Liu & Heng Li, 2021. "Fast alignment and preprocessing of chromatin profiles with Chromap," Nature Communications, Nature, vol. 12(1), pages 1-6, December.
    15. François Bachoc & Marc G Genton & Klaus Nordhausen & Anne Ruiz-Gazen & Joni Virta, 2020. "Spatial blind source separation," Biometrika, Biometrika Trust, vol. 107(3), pages 627-646.
    16. Xiaotian Zhu & David R. Hunter, 2019. "Clustering via finite nonparametric ICA mixture models," Advances in Data Analysis and Classification, Springer;German Classification Society - Gesellschaft für Klassifikation (GfKl);Japanese Classification Society (JCS);Classification and Data Analysis Group of the Italian Statistical Society (CLADAG);International Federation of Classification Societies (IFCS), vol. 13(1), pages 65-87, March.
    17. Matthew Pietrosanu & Jueyu Gao & Linglong Kong & Bei Jiang & Di Niu, 2021. "Advanced algorithms for penalized quantile and composite quantile regression," Computational Statistics, Springer, vol. 36(1), pages 333-346, March.
    18. Jonathan Berrisch & Florian Ziel, 2021. "CRPS Learning," Papers 2102.00968, arXiv.org, revised Nov 2021.
    19. Ferraro, Maria Brigida, 2024. "Fuzzy k-Means: history and applications," Econometrics and Statistics, Elsevier, vol. 30(C), pages 110-123.
    20. Xiaohui Liu & Yuzi Liu & Petra Laketa & Stanislav Nagy & Yuting Chen, 2025. "Exact and approximate computation of the scatter halfspace depth," Computational Statistics, Springer, vol. 40(1), pages 547-572, January.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pcbi00:1006135. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: ploscompbiol (email available below). General contact details of provider: https://journals.plos.org/ploscompbiol/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.