Skip to content

Commit

Permalink
Size column can be renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
szabogtamas authored and grst committed Mar 28, 2020
1 parent 77a79b8 commit 937ec6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions sctcrpy/_plotting/_vdj_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def vdj_usage(
],
for_cells: Union[None, list, np.ndarray, pd.Series] = None,
cell_weights: Union[None, str, list, np.ndarray, pd.Series] = None,
# size_column: str = "cell_weights",
size_column: str = "cell_weights",
fraction_base: Union[None, str] = None,
ax: Union[plt.axes, None] = None,
bar_clip: int = 5,
Expand Down Expand Up @@ -69,8 +69,6 @@ def vdj_usage(
Axes object.
"""

size_column = "cell_weights"

# Execute the tool
df = tl.vdj_usage(
adata,
Expand Down
3 changes: 2 additions & 1 deletion sctcrpy/_tools/_vdj_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def vdj_usage(
),
for_cells: Union[None, list, np.ndarray, pd.Series] = None,
cell_weights: Union[None, str, list, np.ndarray, pd.Series] = None,
size_column: str = "cell_weights",
fraction_base: Union[None, str] = None,
as_dict: bool = False,
) -> Union[AnnData, dict]:
Expand Down Expand Up @@ -54,7 +55,7 @@ def vdj_usage(
"""

# Preproces the data table (remove unnecessary rows and columns)
size_column = "cell_weights"

if for_cells is None:
for_cells = adata.obs.loc[
~_is_na(adata.obs.loc[:, target_cols]).all(axis="columns"), target_cols
Expand Down

0 comments on commit 937ec6d

Please sign in to comment.