Last updated: 2026-07-02

Checks: 5 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.


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.

Tracking code development and connecting the code version to the results is critical for reproducibility. To start using Git, open the Terminal and type git init in your project directory.


This project is not being versioned with Git. To obtain the full reproducibility benefits of using workflowr, please see ?wflow_start.


Both pages are produced by script-refactor/FigureS6.R, which shares its CITE-seq setup and gating logic with Figure 6c-f via code-refactor/R/citeseq_shared_setup.R and code-refactor/R/gated_protein_helpers.R. The code below is shown for reference (not re-executed on this page, since this script takes roughly a minute and a half to render ~25 GPs x 2 embeddings each); the images are its pre-rendered output.

Setup

# Figure S6. GP loadings recover protein-gated populations across GPs.
#
# Extension of Figure 6c-f to all well-aligned GPs (see
# figures/final-selected/bits/Figure S6/FigureS6_caption.md), shown as two
# gallery pages (s6-1 and s6-2). For each GP, cells are shown twice on the
# same MDE embedding: left, cells passing the GP's curated protein gate;
# right, an equally sized set of cells with the highest GP loading.
#
# Source: ported from script/gated_protein_loading_plot.R's live gallery
# section (the ~450 preceding lines of commented-out single-GP exploratory
# calls are dropped -- they never produced a saved output).

library(ggplot2)
library(dplyr)
library(patchwork)
library(Matrix)

data_path <- "data/"
figure_path <- "figure-refactor/Figure S6/"
source("code-refactor/R/gated_protein_helpers.R")
source("code-refactor/R/citeseq_shared_setup.R")