dendrosplit
dendrosplit copied to clipboard
error in splitting step
Hi I am using dendrosplit and am running into an error when trying to perform the split step:
the error seems to revolve around the following lines
# Numerical error edge case handling
epsilon = 1e-8
num_err_fix = np.abs(np.mean(X1,0)-np.mean(X0,0)) < epsilon
X1[:,num_err_fix] = 0
X0[:,num_err_fix] = 0
and the error is:
line 105, in select_genes_using_Welchs
X1[:,num_err_fix] = 0
IndexError: too many indices for array
Commenting out these lines results in the code running as expected, what exactly is the purpose of those lines in the welchs test? How essential is that bit of pre-processing?
Cheers!
I think this section of code is an artifact left over from when the method was being developed, although I'm surprised it would error here. If you can recreate the error using a small dataset, feel free to email the dataset to me and I'll take a closer look.
Thanks for the reply Jesse, I'll test with my data and see how much of a difference it makes. For your information, I've ported your code to python3 so that its compatible with my existing pre-processing code. It could be something to do with that.