From 51089311312adf543e54cb1e49af128f23c50126 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Thu, 9 Jan 2020 14:14:53 +0100
Subject: [PATCH] More info in warning logs.

---
 small_RNA-seq/small_RNA-seq.snakefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/small_RNA-seq/small_RNA-seq.snakefile b/small_RNA-seq/small_RNA-seq.snakefile
index c4616e3..107e1ed 100644
--- a/small_RNA-seq/small_RNA-seq.snakefile
+++ b/small_RNA-seq/small_RNA-seq.snakefile
@@ -2788,6 +2788,12 @@ rule merge_bigwig_reps:
                             warn(f"{msg}:\n")
                         #raise
                         warn(f"The bigwig files without {chrom} will be skipped.\n")
+                    except AssertionError as e:
+                        chrom_lens = []
+                        for bw in bws:
+                            chrom_lens.append(bw.chroms()[chrom])
+                        warn(f"chrom_len for {chrom}: {chrom_len}\nchrom_lens: {chrom_lens}")
+                        raise
                     to_use = [bw for bw in bws if chrom in bw.chroms()]
                     if to_use:
                         means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len, numpy=True) for bw in to_use]), axis=0)
-- 
GitLab