I am trying to calculate the Z-score for several columns with Log fold change (LFC) data from RNA-seq expression values. But the mean for all columns, except one of them, is -inf and the standard deviation is NaN. I have 22269 gene LFC values in each column.
Somehow, I found the answer but not completely. Some of expression values in treated cells are equal to zero. So, When I want to calculate the LFC, the values would be 0 or -1 (based on the two formula you choose for calculation of LFC ( first- (b-a)/a or second- (b/a) when b is treated and a is control)). Accordingly, the log2(0) and/or log2(-1) is not meaningful. So, it cause a "#NAME?" in excel file. Now the question is: Shall I replace all #NAME? with zero to calculate the Z-score?
To figure out the total report I have used
> print (df.describe())
And the report was like this:
A549-trt_cp-1126 A549-trt_cp-1132 A549-trt_cp-1138 A549-trt_cp-1146 \ count 2.226800e+04 2.226800e+04 2.226800e+04 2.226800e+04 mean -inf -inf -inf -inf std NaN NaN NaN NaN min -inf -inf -inf -inf 25% -4.539195e-02 -1.021755e-01 -6.721568e-02 -2.657099e-02 50% 4.465054e-03 -3.905336e-02 -6.798975e-03 1.116264e-01 75% 5.161382e-02 2.408127e-02 6.178798e-02 2.433404e-01 max 1.533103e+00 1.315935e+00 2.228510e+00 2.483255e+00 A549-trt_cp-1152 A549-trt_cp-1158 A549-trt_cp-1164 A549-trt_cp-1170 \ count 2.226800e+04 2.226800e+04 2.226800e+04 2.226800e+04 mean -inf -inf -inf -inf std NaN NaN NaN NaN min -inf -inf -inf -inf 25% -5.830911e-02 -5.150910e-02 -4.667450e-02 -7.890445e-02 50% -6.879490e-03 5.579830e-04 -8.169799e-03 -2.576761e-02 75% 4.991595e-02 5.347726e-02 2.838781e-02 3.474615e-02 max 5.237704e+00 2.875934e+00 1.008515e+00 1.737813e+00
I will enclose a part of my data.