combat.py
combat.py copied to clipboard
Fixed all NANs when genes with all zeros. #11
I have the same issue that " DataFrame contains rows which are entirely zero the result returned by combat() will contain all NaNs". May be it's a good choice to drop these entirely zeros, because all zeros could no be corrected further. Hope this is usefull
I think you'd need something like:
(data != 0).sum(axis=1) > 0
but since I haven't been looking at/using this code for some time, I'd require a test before merging this.
How does the original script handle constant-valued genes? I don't think it's a good practice to remove them within the function.