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/ExtendedDataTable2_GP_AUC_lineage.R:

# Extended Data Table 2: GP AUC by lineage.
#
# One row per GP (GP1..GP200), one column per major lineage (annotation_level1:
# CD8, CD4, Treg, gdT, CD8aa, Tz, DN, DP), holding the one-vs-rest AUC for
# predicting membership in that lineage from the GP's loading. Restricted to
# healthy non-thymocyte cells (the *_no_thymocytes_healthy AUC family, same as
# Figure 2/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_1_AUC_list <- readRDS(paste0(data_path, "level_1_AUC_list_figure_no_thymocytes_healthy.rds"))

gp_auc_lineage <- auc_list_to_gp_table(level_1_AUC_list)

write.csv(
  gp_auc_lineage,
  file = paste0(output_path, "ExtendedDataTable2_GP_AUC_lineage.csv"),
  row.names = FALSE
)

Table

Showing the first 20 rows (of 200); download the full table at figures/generated/ExtendedDataTable2_GP_AUC_lineage.csv.

GP CD8 CD4 Treg gdT CD8aa Tz DN DP
GP1 0.590 0.592 0.512 0.721 0.704 0.555 0.560 0.608
GP2 0.522 0.562 0.522 0.527 0.577 0.529 0.544 0.506
GP3 0.608 0.555 0.610 0.789 0.761 0.554 0.542 0.551
GP4 0.534 0.513 0.531 0.519 0.515 0.536 0.524 0.591
GP5 0.533 0.525 0.521 0.499 0.507 0.533 0.531 0.532
GP6 0.573 0.495 0.689 0.586 0.592 0.548 0.597 0.500
GP7 0.508 0.539 0.516 0.589 0.503 0.537 0.531 0.519
GP8 0.520 0.507 0.522 0.515 0.531 0.570 0.518 0.566
GP9 0.516 0.526 0.524 0.499 0.508 0.541 0.566 0.608
GP10 0.530 0.557 0.505 0.549 0.512 0.524 0.523 0.596
GP11 0.500 0.526 0.505 0.546 0.528 0.525 0.524 0.505
GP12 0.541 0.542 0.657 0.506 0.527 0.660 0.539 0.509
GP13 0.560 0.557 0.562 0.552 0.571 0.554 0.575 0.505
GP14 0.518 0.516 0.510 0.535 0.539 0.532 0.511 0.560
GP15 0.570 0.583 0.533 0.522 0.533 0.546 0.575 0.550
GP16 0.507 0.504 0.552 0.513 0.559 0.513 0.556 0.543
GP17 0.537 0.534 0.535 0.521 0.513 0.512 0.498 0.497
GP18 0.554 0.570 0.529 0.497 0.543 0.574 0.502 0.500
GP19 0.509 0.530 0.551 0.509 0.507 0.735 0.546 0.610
GP20 0.528 0.546 0.503 0.518 0.552 0.517 0.528 0.530

Extended Data Table 2. One row per GP, one column per major lineage (annotation_level1). Each value is the one-vs-rest AUC for predicting membership in that lineage from the GP’s loading, computed on healthy non-thymocyte cells.


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