Skip to content

Commit

Permalink
Uses nanpercentile instead of percentile
Browse files Browse the repository at this point in the history
  • Loading branch information
earmingol committed Apr 12, 2024
1 parent 0c8d435 commit 0862bf5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sccellfie/expression/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def agg_expression_cells(adata, groupby, layer=None, gene_symbols=None, agg_func

AGG_FUNC = {'mean' : np.nanmean,
'median' : np.nanmedian,
'25p' : lambda x, axis: np.percentile(x, q=25, axis=axis),
'75p' : lambda x, axis: np.percentile(x, q=75, axis=axis),
'trimean' : lambda x, axis: 0.5*np.percentile(x, q=50, axis=axis) + 0.25*(np.percentile(x, q=25, axis=axis) + np.percentile(x, q=75, axis=axis))
'25p' : lambda x, axis: np.nanpercentile(x, q=25, axis=axis),
'75p' : lambda x, axis: np.nanpercentile(x, q=75, axis=axis),
'trimean' : lambda x, axis: 0.5*np.nanpercentile(x, q=50, axis=axis) + 0.25*(np.nanpercentile(x, q=25, axis=axis) + np.nanpercentile(x, q=75, axis=axis))
}

0 comments on commit 0862bf5

Please sign in to comment.