It is a basic question but there have a lot of links and information about gene set calculation. Can you introduce to me some basic tutorials for calculating gene set scores?

I have scRNAseq data and now with each cell type annotation, I have pseudobulb analysis to see the log2fold change of genes. I am expecting that I can calculate the z-score of gene set between two groups (before and after drug treatment). Can you give me any hints for calculating z-score?

I have a list of genes in some pathways, I want to see these pathways which are upregulated or downregulated in a total of gene expressions in one sample. Then I will compare these pathways in two samples (after and before drug treatment).

The z-score is a measure of how many standard deviations a particular data point is from the mean of a distribution. A positive z-score indicates that the data point is above the mean, while a negative z-score indicates that it is below the mean. The magnitude of the z-score gives an indication of how far the data point deviates from the mean. It is calculated by subtracting the mean of the distribution m from the individual data point X and the difference divided by the standard deviation of the distribution s.

Can you please tell us what will be your propose of z-score calculation?

I have a list of genes in some pathways, I want to see these pathways which are upregulated or downregulated in a total of gene expressions in one sample. Then I will compare these pathways in two samples (after and before drug treatment).