From 606da34eb5d74f592afb78ca7b005f06f99157e6 Mon Sep 17 00:00:00 2001 From: Rene Snajder Date: Mon, 3 Jul 2023 11:59:42 +0200 Subject: [PATCH] Fix for issue #4 Properly continuing if there is no data for a requested chromosome in a MetH5 file --- pycoMeth/loader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pycoMeth/loader.py b/pycoMeth/loader.py index dd4f573..4d4e0b2 100644 --- a/pycoMeth/loader.py +++ b/pycoMeth/loader.py @@ -49,6 +49,10 @@ def read_raw_llrs(self, interval: Coord) -> Tuple[List, List, List, List]: sample_reads = {} for sample_id, hf in self.sample_hf_files.items(): chrom_container = hf[interval.chr_name] + + if chrom_container is None: + continue + interval_container = chrom_container.get_values_in_range(interval.start, interval.end) if interval_container is None: