Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Phlya committed Jan 14, 2019
1 parent e831213 commit 18179ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions coolpup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def get_positions_pairs(mids, res):
def controlRegions(midcombs, res, minshift=10**5, maxshift=10**6, nshifts=1):
minbin = minshift//res
maxbin = maxshift//res
for start, end in midcombs:
for start, end, p1, p2 in midcombs:
for i in range(nshifts):
shift = np.random.randint(minbin, maxbin)
sign = np.sign(np.random.random() - 0.5).astype(int)
shift *= sign
yield start+shift, end+shift
yield start+shift, end+shift, p1, p2

def pileups(chrom, c, mids, pad=7, ctrl=False, local=False,
minshift=10**5, maxshift=10**6, nshifts=1,
Expand Down Expand Up @@ -139,7 +139,7 @@ def pileups(chrom, c, mids, pad=7, ctrl=False, local=False,
else:
current = get_positions_pairs(current, c.binsize)
n = 0
for (stBin, endBin), (stPad, endPad) in current:
for stBin, endBin, stPad, endPad in current:
if rescale:
stPad = stPad + int(round(rescale_pad*2*stPad))
endPad = endPad + int(round(rescale_pad*2*endPad))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

setup(
name='coolpuppy',
version='0.5.2',
version='0.5.3',
scripts=['coolpup.py']
)

0 comments on commit 18179ab

Please sign in to comment.