Skip to content

Commit cf720d8

Browse files
committed
Use string index. Fix #19
1 parent bb9cfcf commit cf720d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bedshift/bedshift.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,9 @@ def _shift(self, row, mean, stdev):
265265
chrom = self.bed.loc[row][0]
266266
start = self.bed.loc[row][1]
267267
end = self.bed.loc[row][2]
268-
269-
if start + theshift < 0 or end + theshift > chrom_lens[chrom]:
268+
_LOGGER.debug("Chrom lengths: {}".format(str(chrom_lens)))
269+
_LOGGER.debug("chrom: {}".format(str(chrom)))
270+
if start + theshift < 0 or end + theshift > chrom_lens[str(chrom)]:
270271
# check if the region is shifted out of chromosome length bounds
271272
return None, None
272273

0 commit comments

Comments
 (0)