Skip to content

Commit b3c0355

Browse files
authored
Merge pull request #18 from DRL/stats
fix for installation script
2 parents 734c676 + c8e75c4 commit b3c0355

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/kinfin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ def statistic(count_1, count_2, test):
164164
pvalue = scipy.stats.mannwhitneyu(implicit_count_1, implicit_count_2, alternative="two-sided")[1]
165165
except ValueError: # throws ValueError when all numbers are equal
166166
pvalue = 1.0
167+
elif test == "ttest":
168+
#try:
169+
pvalue = scipy.stats.ttest_ind(implicit_count_1, implicit_count_2)[1] # t-test
170+
if pvalue != pvalue: # testing for "nan"
171+
pvalue = 1.0
167172
else:
168173
pass
169174
return pvalue, log2_mean, mean_count_1, mean_count_2

0 commit comments

Comments
 (0)