Closed ChristinaSchmidt1 closed 1 year ago
I added the t-value and order the output df based on t-value so it goes from: +oo first row, to -oo last row. I thought about ordering with abs(t-value), but it made more sense like this. Also I used the padj for the t-value.
Thanks! Could you change it to using the p-value?
As far as I am aware it is standard to not use the adjusted p-value as one really focuses on the indivivual change. And especially for metabolomics the adjusted p-values can be affected a lot by the small amount of features.
ok, Done
T-value is also called t statistics and in DESeq2 it would be called "stat" in the output table.The t-value is similar to a z-score, the z-score is basically a t-value with infinite degrees of freedom. There are slightly different ways to calculate this and one option would be:
DF$stat <- qnorm((1 - DF$p.val / 2)) * sign(DF$Log2FC)
The function qnorm(), aims to find the boundary value of a given an area that determines this area. And sign returns a vector with the signs of the corresponding elements of x (the sign of a real number is 1, 0, or −1 if the number is positive, zero, or negative, respectively).