Starting with the matrix logfold_change, you can use guide_gene_map to group rows (guides) by gene and summarize by median, mean, or other function. Then, group the columns (replicates) by cell line using replicate_map and summarize by mean or median again.