StampPerturbProvenance: record baseline provenance for a perturb assay
StampPerturbProvenance.RdThis function stores lightweight provenance metadata on a perturbation
assay (e.g. created by ModulePerturbation()) indicating which
baseline assay and layer(s) it was derived from.
Usage
StampPerturbProvenance(
seurat_obj,
perturb_assay,
baseline_assay = "RNA",
method = "ModulePerturbation",
overwrite = TRUE
)Details
This enables CombinePerturbAssays() to perform a strict, deterministic
check that all perturbation assays being combined were generated from the
same baseline representation (e.g. baseline assay RNA vs SCT,
and baseline layer counts).
Provenance is stored in seurat_obj[[perturb_assay]]@misc$COMPACT with fields:
baseline_assaybaseline_layers(e.g."counts")methodstamped_at