diff options
Diffstat (limited to 'Code')
-rw-r--r-- | Code/buildRmatrix.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Code/buildRmatrix.py b/Code/buildRmatrix.py index c671f2a..4557993 100644 --- a/Code/buildRmatrix.py +++ b/Code/buildRmatrix.py @@ -74,16 +74,17 @@ def make_expression_dict(fname, myid): # make the dictionary smaller by using a string instead of a double-precision float number, so it requires less memory. Cut from 7.44G to 6.5G for 1003 TPM files.
for g in d['isoform']:
- d['isoform'][g] = '%4.2f' % get_max_expressed_isoform(g, d)
+ d['isoform'][g] = '%s' % get_max_expressed_isoform_save_space(g, d)
return d
def get_max_expressed_isoform_save_space(g, d):
- ''' Evloved from get_max_expressed_isoform(g, d) '''
+ ''' Evolved from get_max_expressed_isoform(g, d) '''
if not g in d['isoform']:
return '-9'
- return d['isoform'][g]
+ lst = d['isoform'][g]
+ return '%4.2f' % max(lst)
def save_TPM_table(gene_lst, dict_lst, fname):
|