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

Small adata Error fix #616

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove leftover print statements and improve warning message
  • Loading branch information
AlexanderCaichen committed Nov 17, 2023
commit 07603b4c9a8ed1ce19bd60a9b71a5a2459662e99
3 changes: 0 additions & 3 deletions dynamo/preprocessing/gene_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ def calc_dispersion_by_svr(
# This is not picked up via None checks. (Empty valid_CM leads to a divide by 0 error in get_prediction_by_svr())
# Note that simply doing `not valid_CM.toarray()` results in "truth value of array..." error due to numpy array
# `not valid_CM.toarray().tolist()` doesn't work either because a list of empty lists still gives False
print(valid_CM.shape)
print(adata)
print(adata_ori)
if valid_CM is None or valid_CM.shape[1] == 0:
main_warning("No valid_CM for layer " + layer)

Expand Down
2 changes: 1 addition & 1 deletion dynamo/preprocessing/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def pca(
X_data = X_data[:, valid_ind]

if 0 in X_data.shape:
main_warning("No genes passed filter, aborting preprocessing.")
main_warning("No genes passed filter, ABORTING PCA REDUCTION.")
if return_all:
return adata, None, None
else:
Expand Down