This function rebases the gene expression matrix in a `SummarizedExperiment` object using a specified annotation as the primary identifier.
Value
A `SummarizedExperiment` object with rebased gene expression data. The output includes updated `rowData` with summarized gene-level information, and new `assays` containing rebased `counts` and `tpm` matrices.
Details
This function rebases the gene expression data by aggregating counts based on the specified annotation. It also calculates transcripts per million (TPM) using the aggregated data and associated gene lengths.
The function performs the following steps: - Aggregates gene counts and metadata based on the specified annotation. - Calculates TPM values using the rebased gene counts and average gene lengths. - Constructs a new `SummarizedExperiment` object with the rebased data.