Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when computing scalings using a narrow distance range #150

Closed
itsameerkat opened this issue Nov 7, 2022 · 1 comment
Closed

Error when computing scalings using a narrow distance range #150

itsameerkat opened this issue Nov 7, 2022 · 1 comment
Assignees
Labels

Comments

@itsameerkat
Copy link
Member

I'm using pairtools.lib.scaling.compute_scaling from the latest master branch (SHA: 1e8d518) to create interaction decay curves from pairs files.

When I use the default value of the keyword argument dist_range, the function runs without errors but if I choose a distance range that is narrower e.g. dist_range=(int(1e1), int(1e6)), I get the following error:

Screen Shot 2022-11-07 at 5 14 55 PM

The error seems easy enough to fix: append np.inf to the end of dist_bins array provided to bins_pairs_by_distance and change this line in scaling.py from pairs_reduced_df["dist_bin_idx"] < len(dist_bins), to pairs_reduced_df["dist_bin_idx"] < len(dist_bins) - 1,

Thoughts? I'm happy to create a pull request with these changes.

@agalitsyna
Copy link
Member

Sounds reasonable. Yeah, PR is welcome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants