Skip to content

Commit 06e1028

Browse files
authored
bug fix
1 parent c5f0d17 commit 06e1028

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

seqchromloader/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def stats(self, chrom, type='mean', exact=True):
7474
if self.backend == 'pyBigWig':
7575
return self.bw.stats(chrom, type=type, exact=exact)[0]
7676
elif self.backend == 'pybigtools':
77-
return self.bw.values(chrom, missing=np.nan, bins=1, exact=exact, summary='mean')[0].item()
77+
return self.bw.values(chrom, missing=np.nan, bins=1, exact=exact, summary=type)[0].item()
7878
elif self.backend == 'memmap':
7979
arr = self.arrays[chrom]
8080
if type == 'mean':
@@ -84,7 +84,7 @@ def stats(self, chrom, type='mean', exact=True):
8484
elif type == 'min':
8585
return float(np.min(arr))
8686
elif type == 'std':
87-
return float(np.std(arr))
87+
return self.bw.values(chrom, missing=np.nan, bins=1, exact=exact, summary=type)[0].item()
8888
else:
8989
raise NotImplementedError(f"stat {type} not implemented for memmap backend")
9090

0 commit comments

Comments
 (0)