1. Subset all neuron cells from the dataset (excitatory and inhibitory).
2. For each gene, sum up all the counts in excitatory/inhibitory neurons in each individual - 3e Dimension: (#gene, 2 * 12).
3. For each individual, the total counts across all genes (summing up both cell types) is calculated as the individual-wise library size.
4. Divide each entry of the matrix from step 2 by the corresponding sample library size from step 3.
5. To calculate the normalized gene expression, utilize the library size normalized counts.
Detailed normalization steps:
- Subset all the neuron cells from the dataset, including excitatory neurons and inhibitory neurons.
- For each gene, sum up all the counts in excitatory and inhibitory neurons within each individual to get the cell-type specific pseudobulk data.
- The individual-wise library size was calculated by summing up the counts among all genes for both neuron types.
- Divide each entry of the pseudobulk data by the sample library size to get the normalized gene expression matrix.