projects
/
lightning.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4a3899f
)
Fix divide by zero.
author
Tom Clegg <tom@tomclegg.ca>
Thu, 19 Nov 2020 05:38:25 +0000
(
00:38
-0500)
committer
Tom Clegg <tom@tomclegg.ca>
Thu, 19 Nov 2020 05:38:25 +0000
(
00:38
-0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
export.go
patch
|
blob
|
history
diff --git
a/export.go
b/export.go
index b6b160ddb79311fe3a5964b25e2ca0efe482abdc..958da95a1703edee2d5b718558504be713070f70 100644
(file)
--- a/
export.go
+++ b/
export.go
@@
-405,8
+405,13
@@
func (cmd *exporter) exportSeq(outw, bedw io.Writer, taglen int, seqname string,
thickstart = 0
}
thickend := refpos
+
// coverage score, 0 to 1000
- score := 1000 * tagcoverage / len(cgs) / 2
+ score := 1000
+ if len(cgs) > 0 {
+ score = 1000 * tagcoverage / len(cgs) / 2
+ }
+
fmt.Fprintf(bedw, "%s %d %d %d %d . %d %d\n",
seqname, tilestart, tileend,
libref.Tag,