df
gene_name guide_1 guide_1_new Correlation
MMP-1 A A 1
MMP-1 A B 0.426115
MMP-1 A C 0.522499
MMP-1 A D 0.431587
MMP-1 B A 0.426115
MMP-1 B B 1
MMP-1 B C 0.60113
MMP-1 B D 0.534858
MMP-1 C A 0.522499
MMP-1 C B 0.60113
MMP-1 C C 1
MMP-1 C D 0.622206
MMP-1 D A 0.431587
MMP-1 D B 0.534858
MMP-1 D C 0.622206
MMP-1 D D 1
I used four guides in an experiment (data = df
). I calculated correlation between them based on the their log fold changes. I want to check which guide is outperforming or underperforming in comparison to other three guides in my experiment. I tried Kruskal and Wallis test to do this analysis with the script given below. However, I got an error ValueError: Samples must be one-dimensional
. Also is this the right test to do this analysis?
My script
from scipy import stats
x = df[['guide_1']]
y = df[['guide_1_new']]
z = df[['Correlation']]
stats.kruskal(x, y, z)
guide_1
andguide_1_new
as samples toscipy.stats.kruskal
? Those are non-numeric data. And the correlations, while numeric, suggest to me that you are doing something a little different from what Kruskal-Wallis is implementing. It looks like you might be trying to pass in the categories as vectors of strings, but I don't think it works that way (?). And I don't think applying it to correlation coefficients will be very interpretable. Not an expert onscipy.stats
but this doesn't look right. I'd suggest going back to raw data. $\endgroup$