This function collapses replicate samples in a tidyseurat object based on differential expression (DE) results. It returns a new tidyseurat object with a 'DE' assay containing the aggregated values.
Details
This function performs the following steps:
Converts the list of DE comparisons into a gene-by-condition matrix.
Aggregates metadata across replicates by
combined_id
.Creates a new Seurat object with this matrix as a "DE" assay
Examples
data(mini_mac)
mac_collapsed <- aggregate_by_de(mini_mac)