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

enable future - calm down dependencies [WIP] #479

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cooltools/api/expected.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ def make_diag_tables(clr, regions, regions2=None, clr_weight_name="weight"):
bins = clr.bins()[:]
if clr_weight_name is None:
# ignore bad bins
sizes = dict(bins.groupby("chrom").size())
sizes = dict(bins.groupby("chrom", observed=True).size())
bad_bin_dict = {
chrom: np.zeros(sizes[chrom], dtype=bool) for chrom in sizes.keys()
}
elif is_cooler_balanced(clr, clr_weight_name):
groups = dict(iter(bins.groupby("chrom")[clr_weight_name]))
groups = dict(iter(bins.groupby("chrom", observed=True)[clr_weight_name]))
bad_bin_dict = {
chrom: np.array(groups[chrom].isnull()) for chrom in groups.keys()
}
Expand Down
2 changes: 1 addition & 1 deletion cooltools/lib/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def is_track(track, raise_errors=False):
else:
return False

for name, group in track.groupby(track.columns[0]):
for name, group in track.groupby(track.columns[0], observed=True):
if not _is_sorted_ascending(group[track.columns[1]].values):
if raise_errors:
raise ValueError(
Expand Down