Last updated: 2026-07-05

Checks: 6 1

Knit directory: immgenT-GP-analysis/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(1) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 6d1c6c0. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .claude/
    Ignored:    analysis/.DS_Store
    Ignored:    analysis/.Rhistory
    Ignored:    analysis/assets/.DS_Store
    Ignored:    code/.DS_Store
    Ignored:    data
    Ignored:    figures/final-selected/.DS_Store
    Ignored:    figures/final-selected/bits/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 1/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 2/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 3/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 4/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 6/.DS_Store
    Ignored:    figures/final-selected/bits/Figure 7/.DS_Store
    Ignored:    figures/final-selected/bits/Figure S1/.DS_Store
    Ignored:    figures/final-selected/bits/Figure S2/.DS_Store
    Ignored:    figures/final-selected/bits/Figure S3/.DS_Store
    Ignored:    figures/final-selected/bits/Figure S6/.DS_Store
    Ignored:    figures/final-selected/bits/Figure S7/.DS_Store
    Ignored:    figures/generated/.DS_Store
    Ignored:    figures/generated/Figure 5/
    Ignored:    figures/generated/Figure 7/
    Ignored:    figures/generated/Figure 8/
    Ignored:    figures/generated/Figure 9/

Untracked files:
    Untracked:  analysis/ExtendedDataTable1.Rmd
    Untracked:  analysis/ExtendedDataTable2.Rmd
    Untracked:  analysis/ExtendedDataTable3.Rmd
    Untracked:  analysis/ExtendedDataTable4.Rmd
    Untracked:  analysis/ExtendedDataTable5.Rmd
    Untracked:  analysis/ExtendedDataTable6.Rmd
    Untracked:  analysis/ExtendedDataTable7.Rmd
    Untracked:  figures/generated/ExtendedDataTable1_GP_summary.csv
    Untracked:  figures/generated/ExtendedDataTable2_GP_AUC_lineage.csv
    Untracked:  figures/generated/ExtendedDataTable3_GP_AUC_tissue.csv
    Untracked:  figures/generated/ExtendedDataTable4_GP_AUC_cluster.csv
    Untracked:  figures/generated/ExtendedDataTable5_GP_during_activation.csv
    Untracked:  figures/generated/ExtendedDataTable6_protein_factor_matrix.csv
    Untracked:  figures/generated/ExtendedDataTable7_protein_gating.csv
    Untracked:  script/ExtendedDataTable1_GP_summary.R
    Untracked:  script/ExtendedDataTable2_GP_AUC_lineage.R
    Untracked:  script/ExtendedDataTable3_GP_AUC_tissue.R
    Untracked:  script/ExtendedDataTable4_GP_AUC_cluster.R
    Untracked:  script/ExtendedDataTable5_GP_during_activation.R
    Untracked:  script/ExtendedDataTable6_protein_factor_matrix.R
    Untracked:  script/ExtendedDataTable7_protein_gating.R
    Untracked:  tables/

Unstaged changes:
    Deleted:    analysis/TableS1.Rmd
    Modified:   analysis/index.Rmd
    Modified:   code/R/gated_protein_helpers.R
    Modified:   code/R/roc_auc.R
    Modified:   code/README.md
    Modified:   code/pipeline/02_compute_auc.R
    Deleted:    figures/generated/Supplementary_Table1_GP_summary.csv
    Modified:   script/README.md
    Deleted:    script/TableS1.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Produced by script/ExtendedDataTable4_GP_AUC_cluster.R:

# Extended Data Table 4: GP AUC by cluster.
#
# One row per GP (GP1..GP200), one column per sub-lineage cluster
# (annotation_level2: CD8.A, CD8.B, ..., CD4.A, ...), holding the one-vs-rest
# AUC for predicting membership in that cluster from the GP's loading.
# Restricted to healthy non-thymocyte cells (the *_no_thymocytes_healthy AUC
# family, same as Figure 4), extracted directly from the precomputed AUC
# matrices -- see code/pipeline/02_compute_auc.R.
#
# The AUC file's $auc is a categories x GPs matrix with raw "K##" GP names;
# auc_list_to_gp_table() transposes it to a per-GP table and relabels K -> GP.

data_path <- "data/"
output_path <- "figures/generated/"

source("code/R/roc_auc.R")

level_2_AUC_list <- readRDS(paste0(data_path, "level_2_AUC_list_figure_no_thymocytes_healthy.rds"))

gp_auc_cluster <- auc_list_to_gp_table(level_2_AUC_list)

write.csv(
  gp_auc_cluster,
  file = paste0(output_path, "ExtendedDataTable4_GP_AUC_cluster.csv"),
  row.names = FALSE
)

Table

Showing the first 20 rows (of 200) and first 10 columns; download the full table at figures/generated/ExtendedDataTable4_GP_AUC_cluster.csv.

GP CD8.A CD8.B CD8.C CD8.D CD8.E CD8.F CD8.G CD8.H CD8.I
GP1 0.594 0.655 0.563 0.514 0.554 0.619 0.491 0.539 0.630
GP2 0.537 0.576 0.522 0.593 0.547 0.529 0.630 0.613 0.624
GP3 0.588 0.615 0.551 0.639 0.658 0.631 0.715 0.536 0.504
GP4 0.518 0.591 0.512 0.524 0.534 0.547 0.594 0.538 0.502
GP5 0.509 0.523 0.543 0.522 0.498 0.520 0.505 0.567 0.545
GP6 0.588 0.580 0.568 0.496 0.676 0.675 0.588 0.616 0.686
GP7 0.525 0.509 0.595 0.627 0.567 0.533 0.602 0.557 0.504
GP8 0.508 0.526 0.620 0.548 0.576 0.559 0.547 0.519 0.486
GP9 0.532 0.610 0.580 0.531 0.571 0.510 0.577 0.517 0.560
GP10 0.522 0.516 0.666 0.550 0.634 0.690 0.769 0.921 0.972
GP11 0.576 0.754 0.615 0.565 0.552 0.556 0.586 0.533 0.638
GP12 0.567 0.533 0.855 0.570 0.630 0.714 0.494 0.610 0.506
GP13 0.521 0.564 0.574 0.546 0.633 0.614 0.677 0.599 0.645
GP14 0.531 0.509 0.589 0.554 0.536 0.553 0.547 0.527 0.563
GP15 0.554 0.554 0.669 0.928 0.756 0.893 0.635 0.547 0.578
GP16 0.522 0.573 0.601 0.507 0.532 0.979 0.531 0.522 0.535
GP17 0.513 0.531 0.504 0.508 0.536 0.531 0.546 0.556 0.680
GP18 0.525 0.594 0.630 0.654 0.550 0.553 0.610 0.547 0.579
GP19 0.541 0.512 0.538 0.654 0.588 0.522 0.615 0.593 0.585
GP20 0.508 0.562 0.542 0.535 0.599 0.621 0.632 0.514 0.530

Extended Data Table 4. One row per GP, one column per sub-lineage cluster (annotation_level2). Each value is the one-vs-rest AUC for predicting membership in that cluster from the GP’s loading, computed on healthy non-thymocyte cells. (Preview shows the first 10 of 107 cluster columns.)


sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.6.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1

locale:
[1] en_CA/en_CA/en_CA/C/en_CA/en_CA

time zone: Asia/Tokyo
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] vctrs_0.7.3     cli_3.6.6       knitr_1.50      rlang_1.2.0    
 [5] xfun_0.55       stringi_1.8.7   otel_0.2.0      promises_1.5.0 
 [9] jsonlite_2.0.0  workflowr_1.7.2 glue_1.8.1      rprojroot_2.1.1
[13] git2r_0.36.2    htmltools_0.5.9 httpuv_1.6.16   sass_0.4.10    
[17] rmarkdown_2.30  evaluate_1.0.5  jquerylib_0.1.4 tibble_3.3.0   
[21] fastmap_1.2.0   yaml_2.3.12     lifecycle_1.0.5 stringr_1.6.0  
[25] compiler_4.5.1  fs_1.6.6        Rcpp_1.1.1-1.1  pkgconfig_2.0.3
[29] later_1.4.4     digest_0.6.39   R6_2.6.1        pillar_1.11.1  
[33] magrittr_2.0.5  bslib_0.9.0     tools_4.5.1     cachem_1.1.0