projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2d89edc
)
Return NaN, NaN if a mean +/- deviation value was undefined in Summary.htm
author
Diane Trout
<diane@caltech.edu>
Tue, 5 May 2009 17:59:03 +0000
(17:59 +0000)
committer
Diane Trout
<diane@caltech.edu>
Tue, 5 May 2009 17:59:03 +0000
(17:59 +0000)
htsworkflow/pipelines/summary.py
patch
|
blob
|
history
diff --git
a/htsworkflow/pipelines/summary.py
b/htsworkflow/pipelines/summary.py
index bce8184b7bd126978de6ab8800adf28981cd7a17..dc323ff08f9193673c46d591be772041a27afcb5 100644
(file)
--- a/
htsworkflow/pipelines/summary.py
+++ b/
htsworkflow/pipelines/summary.py
@@
-7,6
+7,8
@@
from pprint import pprint
from htsworkflow.pipelines.runfolder import ElementTree
from htsworkflow.util.ethelp import indent, flatten
from htsworkflow.pipelines.runfolder import ElementTree
from htsworkflow.util.ethelp import indent, flatten
+nan = float('nan')
+
class Summary(object):
"""
Extract some useful information from the Summary.htm file
class Summary(object):
"""
Extract some useful information from the Summary.htm file
@@
-260,9
+262,16
@@
def parse_mean_range(value):
Parse values like 123 +/- 4.5
"""
if value.strip() == 'unknown':
Parse values like 123 +/- 4.5
"""
if value.strip() == 'unknown':
- return 0, 0
+ return nan, nan
+
+ values = value.split()
+ if len(values) == 1:
+ if values[0] == '+/-':
+ return nan,nan
+ else:
+ return tonumber(values[0])
- average, pm, deviation = value
.split()
+ average, pm, deviation = value
s
if pm != '+/-':
raise RuntimeError("Summary.htm file format changed")
return tonumber(average), tonumber(deviation)
if pm != '+/-':
raise RuntimeError("Summary.htm file format changed")
return tonumber(average), tonumber(deviation)