diff --git a/lisa/lisa_user_data/coverage_test.py b/lisa/lisa_user_data/coverage_test.py index 1d44fe3..ce45b52 100644 --- a/lisa/lisa_user_data/coverage_test.py +++ b/lisa/lisa_user_data/coverage_test.py @@ -119,6 +119,10 @@ def convert_bigwig(cls, bigwig, species, log = None): if window.chromosome in coverage_bw.chroms(): mean_coverage = coverage_bw.stats(*window.to_tuple())[0] coverage_array[i] = mean_coverage + # sometimes, in the bigwig files, genome chromosome names do not start with 'chr' + elif window.chromosome[3:] in coverage_bw.chroms(): + mean_coverage = coverage_bw.stats(window.chromosome[3:],window.start,window.end)[0] + coverage_array[i] = mean_coverage if i%1000 == 0: log.append(bar, update_line = True) @@ -203,4 +207,4 @@ def predict(self, query_list, background_list = [], background_strategy = 'all', Test metadata. Includes query genes provided and background genes that were selected, as well as reg-scores for top 100 factors on selected genes. ''' return super().predict(query_list, region_scores = self.coverage_array, background_list=background_list, background_strategy=background_strategy, - num_background_genes= num_background_genes, seed=seed) \ No newline at end of file + num_background_genes= num_background_genes, seed=seed)