summaryrefslogtreecommitdiff
path: root/Code/make_parameter_rnaseq.py
diff options
context:
space:
mode:
Diffstat (limited to 'Code/make_parameter_rnaseq.py')
-rw-r--r--Code/make_parameter_rnaseq.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Code/make_parameter_rnaseq.py b/Code/make_parameter_rnaseq.py
index f9c7d26..e7b971e 100644
--- a/Code/make_parameter_rnaseq.py
+++ b/Code/make_parameter_rnaseq.py
@@ -84,6 +84,8 @@ def non_zero_ratio(fname):
if not tpm == '0' and not 'nan' in tpm:
non_zero_count += 1
total_count += 1
+ if total_count < 1:
+ return 0.0
return 1.0 * non_zero_count / total_count
def get_rna_word_count(s):