# BatchQC Examples

# Example 1: Protein Data

This data set is from protein expression data captured for 39 proteins. It has two batches and two conditions corresponding to case and control.

    library(BatchQC)
    data(protein_data)
    data(protein_sample_info)
    se_object <- BatchQC::summarized_experiment(protein_data, protein_sample_info)

# Example 2: Signature Data

This data set is from signature data captured when activating different growth pathway genes in human mammary epithelial cells (GEO accession: GSE73628). This data consists of three batches and ten different conditions corresponding to control and nine different pathways

    data(signature_data)
    data(batch_indicator)
    se_object <- BatchQC::summarized_experiment(signature_data, batch_indicator)

# Example 3: Bladderbatch Data

This data set is from bladder cancer data. This dataset has 57 bladder samples with 5 batches and 3 covariate levels (cancer, biopsy, control). Batch 1 contains only cancer, 2 has cancer and controls, 3 has only controls, 4 contains only biopsy, and 5 contains cancer and biopsy. This data set is from the bladderbatch package which must be installed to use this data example set (Leek JT (2023). bladderbatch: Bladder gene expression data illustrating batch effects. R package version 1.38.0).

    if (!requireNamespace("bladderbatch", quietly = TRUE))
        BiocManager::install("bladderbatch")
    se_object <- BatchQC::bladder_data_upload()

# Example 4: TB Data

This is a whole blood gene expression profiling from well and malnourished Indian individuals with TB and severely malnourished household contacts with latent TB infection (LTBI). Severe malnutrition was defined as body mass index <16. kg/m2 in adults and based on weight-for-height Z scores in children <18 years. Gene expression was measured using RNA-sequencing. (VanValkenburg A, et al. Malnutrition leads to increased inflammation and expression of tuberculosis risk signatures in recently exposed household contacts of pulmonary tuberculosis. Front Immunol. 2022 Sep 28;13:1011166. doi: 10.3389/fimmu.2022.1011166”)

    if (!requireNamespace("curatedTBData", quietly = TRUE))
        BiocManager::install("curatedTBData")
    se_object <- BatchQC::tb_data_upload()

# Session info

    ## R version 4.6.0 (2026-04-24)
    ## Platform: x86_64-pc-linux-gnu
    ## Running under: Ubuntu 24.04.4 LTS
    ##
    ## Matrix products: default
    ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
    ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
    ##
    ## locale:
    ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
    ##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
    ##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
    ##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
    ##  [9] LC_ADDRESS=C               LC_TELEPHONE=C
    ## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
    ##
    ## time zone: Etc/UTC
    ## tzcode source: system (glibc)
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] BatchQC_2.8.0    BiocStyle_2.40.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] RColorBrewer_1.1-3          ggdendro_0.2.0
    ##   [3] sys_3.4.3                   jsonlite_2.0.0
    ##   [5] umap_0.2.10.0               magrittr_2.0.5
    ##   [7] NCmisc_1.3.1                farver_2.1.2
    ##   [9] rmarkdown_2.31              vctrs_0.7.3
    ##  [11] memoise_2.0.1               EBSeq_2.10.0
    ##  [13] askpass_1.2.1               rstatix_0.7.3
    ##  [15] htmltools_0.5.9             S4Arrays_1.12.0
    ##  [17] BiocNeighbors_2.6.0         broom_1.0.12
    ##  [19] SparseArray_1.12.0          Formula_1.2-5
    ##  [21] sass_0.4.10                 KernSmooth_2.23-26
    ##  [23] bslib_0.10.0                plyr_1.8.9
    ##  [25] testthat_3.3.2              cachem_1.1.0
    ##  [27] buildtools_1.0.0            igraph_2.3.0
    ##  [29] mime_0.13                   lifecycle_1.0.5
    ##  [31] pkgconfig_2.0.3             rsvd_1.0.5
    ##  [33] Matrix_1.7-5                R6_2.6.1
    ##  [35] fastmap_1.2.0               rbibutils_2.4.1
    ##  [37] MatrixGenerics_1.24.0       shiny_1.13.0
    ##  [39] digest_0.6.39               ggnewscale_0.5.2
    ##  [41] AnnotationDbi_1.74.0        S4Vectors_0.50.0
    ##  [43] DESeq2_1.52.0               RSpectra_0.16-2
    ##  [45] dqrng_0.4.1                 irlba_2.3.7
    ##  [47] RSQLite_2.4.6               GenomicRanges_1.64.0
    ##  [49] ggpubr_0.6.3                beachmat_2.28.0
    ##  [51] mgcv_1.9-4                  httr_1.4.8
    ##  [53] abind_1.4-8                 compiler_4.6.0
    ##  [55] bit64_4.8.0                 S7_0.2.2
    ##  [57] backports_1.5.1             BiocParallel_1.46.0
    ##  [59] DBI_1.3.0                   carData_3.0-6
    ##  [61] gplots_3.3.0                ggsignif_0.6.4
    ##  [63] MASS_7.3-65                 openssl_2.4.0
    ##  [65] DelayedArray_0.38.0         bluster_1.22.0
    ##  [67] gtools_3.9.5                caTools_1.18.3
    ##  [69] tools_4.6.0                 otel_0.2.0
    ##  [71] httpuv_1.6.17               glue_1.8.1
    ##  [73] nlme_3.1-169                promises_1.5.0
    ##  [75] grid_4.6.0                  Harman_1.38.0
    ##  [77] cluster_2.1.8.2             reshape2_1.4.5
    ##  [79] generics_0.1.4              sva_3.60.0
    ##  [81] gtable_0.3.6                tidyr_1.3.2
    ##  [83] data.table_1.18.2.1         BiocSingular_1.28.0
    ##  [85] ScaledMatrix_1.20.0         metapod_1.20.0
    ##  [87] car_3.1-5                   XVector_0.52.0
    ##  [89] BiocGenerics_0.58.0         pillar_1.11.1
    ##  [91] stringr_1.6.0               limma_3.68.0
    ##  [93] genefilter_1.94.0           later_1.4.8
    ##  [95] splines_4.6.0               dplyr_1.2.1
    ##  [97] lattice_0.22-9              FNN_1.1.4.1
    ##  [99] survival_3.8-6              bit_4.6.0
    ## [101] reader_1.1.0                annotate_1.90.0
    ## [103] tidyselect_1.2.1            SingleCellExperiment_1.34.0
    ## [105] locfit_1.5-9.12             Biostrings_2.80.0
    ## [107] maketools_1.3.2             scuttle_1.22.0
    ## [109] knitr_1.51                  blockmodeling_1.1.8
    ## [111] IRanges_2.46.0              Seqinfo_1.2.0
    ## [113] edgeR_4.10.0                SummarizedExperiment_1.42.0
    ## [115] stats4_4.6.0                xfun_0.57
    ## [117] Biobase_2.72.0              statmod_1.5.1
    ## [119] brio_1.1.5                  matrixStats_1.5.0
    ## [121] pheatmap_1.0.13             stringi_1.8.7
    ## [123] yaml_2.3.12                 evaluate_1.0.5
    ## [125] codetools_0.2-20            RcppEigen_0.3.4.0.2
    ## [127] tibble_3.3.1                BiocManager_1.30.27
    ## [129] cli_3.6.6                   Ckmeans.1d.dp_4.3.5
    ## [131] reticulate_1.46.0           shinythemes_1.2.0
    ## [133] xtable_1.8-8                Rdpack_2.6.6
    ## [135] jquerylib_0.1.4             Rcpp_1.1.1-1.1
    ## [137] tidyverse_2.0.0             png_0.1-9
    ## [139] XML_3.99-0.23               parallel_4.6.0
    ## [141] blob_1.3.0                  ggplot2_4.0.3
    ## [143] scran_1.40.0                bitops_1.0-9
    ## [145] scales_1.4.0                crayon_1.5.3
    ## [147] purrr_1.2.2                 rlang_1.2.0
    ## [149] KEGGREST_1.52.0             shinyjs_2.1.1