From 2f362a38b407f980718b61ac36c26afd41441504 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Fri, 13 Dec 2019 16:02:01 +0100
Subject: [PATCH] Newer PyBigwig cannot both read and write.

---
 libhts/libhts.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libhts/libhts.py b/libhts/libhts.py
index b4bfc47..959b1a8 100644
--- a/libhts/libhts.py
+++ b/libhts/libhts.py
@@ -210,7 +210,8 @@ def make_empty_bigwig(filename, chrom_sizes):
     """
     bw_out = pyBigWig.open(filename, "w")
     bw_out.addHeader(list(chrom_sizes.items()))
-    for (chrom, chrom_len) in bw_out.chroms().items():
+    # for (chrom, chrom_len) in bw_out.chroms().items():
+    for (chrom, chrom_len) in chrom_sizes.items():
         bw_out.addEntries(
             chrom, 0,
             values=np.nan_to_num(np.zeros(chrom_len)[0::10]),
-- 
GitLab