best keeper v2 gmean float object error
This code in metamirs_v2 throws out an error:
exprs_list_np = [numpy.array(dataset) for dataset in exprs_list]
BK_index_results = [bk.corrBKI(dataset) for dataset in exprs_list_np]
following error:
RuntimeWarning: invalid value encountered in less
x = np.where(x < 1.0, x, 1.0) # if x > 1 then return 1.0
Traceback (most recent call last):
File ".\MetaMiRs_v2.py", line 48, in <module>
metamirs("Expr")
File ".\MetaMiRs_v2.py", line 42, in metamirs
bk.corrBKI(dataset)
File "C:\ownCloud\Documents\projekty\FIRST TEAM Projekt normalizacja\MetaMir\BestKeeper_v2.py", line 43, in corrBKI
BKI=BestKeeperIndex(exp_data)
File "C:\ownCloud\Documents\projekty\FIRST TEAM Projekt normalizacja\MetaMir\BestKeeper_v2.py", line 80, in BestKeeperIndex
BKi=gmean(exp_data, axis=0)
File "C:\Users\Laptop\AppData\Local\Programs\Python\Python36-32\lib\site-packages\scipy\stats\stats.py", line 313, in gmean
log_a = np.log(a)
AttributeError: 'float' object has no attribute 'log'
Seems like a problem with the data type of expression values, but for now, let's focus on filling the missing data. pearsonr won't accept missing values anyway.