Skip to content

Commit

Permalink
silences deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
domonik committed Aug 21, 2024
1 parent bc5ca47 commit 5a2cfbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RAPDOR/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def _set_design_and_array(self):
self.array = array
self.internal_design_matrix = tmp
indices = self.internal_design_matrix.groupby("Treatment", group_keys=True, observed=False).apply(
lambda x: list(x.index))
lambda x: list(x.index), include_groups=False)
self.indices = tuple(np.asarray(index) for index in indices)

p = ~np.any(self.array, axis=-1)
Expand Down
4 changes: 2 additions & 2 deletions RAPDOR/tests/test_datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def multi_intensities(intensities):

def drop_replicates(design, rnase_rep, ctrl_rep):
if rnase_rep > 0:
rnase = design[design["Treatment"] == "RNase"].groupby("Replicate").apply(lambda x: list(x.index)).sample(n=rnase_rep).sum()
rnase = design[design["Treatment"] == "RNase"].groupby("Replicate").apply(lambda x: list(x.index), include_groups=False).sample(n=rnase_rep).sum()
else:
rnase = []
if ctrl_rep > 0:
ctrl = design[design["Treatment"] == "Control"].groupby("Replicate").apply(lambda x: list(x.index)).sample(n=ctrl_rep).sum()
ctrl = design[design["Treatment"] == "Control"].groupby("Replicate").apply(lambda x: list(x.index), include_groups=False).sample(n=ctrl_rep).sum()
else:
ctrl = []
rnase = design.loc[rnase]
Expand Down

0 comments on commit 5a2cfbb

Please sign in to comment.