Entering edit mode
11.1 years ago
kuangyuyen
•
0
I want to calculate pearson correlation by using scipy. However, the input file has a few empty wells for each columns (example seen below), so the calculation from scipy.pearsonr is always "nan". I wonder if there is way to accommodate the empty wells. Thanks a lot for the help!
Input example:
Factor none Bas1 Cha4
YAL001C
YAL002W -0.01
YAL003W
YAL005C -0.22
YAL007C 0.37
YAL008W 0.19
YAL009W 0.08 0.41 -0.19
YAL010C -0.04 0.34 0.14
YAL011W -0.06 0.71 0.31
YAL012W -0.05 1.05
YAL013W -0.05 2.59 0.9
YAL014C 0 0.5 0.85
YAL015C 0.08 0.45 -0.54
YAL016C-B 0.04 0.98 0.29