Skip to content

Commit ab59d9e

Browse files
remove addition of .raw field to anndata, make edge selection more memory efficient
1 parent 20f947d commit ab59d9e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/netmap/downstream/edge_selection.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def _get_top_edges_global(grn_adata, top_edges: float):
7474
print(f"You ran into an issue sorting the array. Please manually sort"
7575
"the array using chunked_argsort and reduce the chunk size (current default chunk"
7676
" size: 500)")
77+
except MemoryError:
78+
print(f"You ran into an issue sorting the array. Please manually sort"
79+
"the array using chunked_argsort and reduce the chunk size (current default chunk"
80+
" size: 500)")
7781

7882
b = grn_adata.layers['sorted']
7983

src/netmap/utils/data_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def attribution_to_anndata(attribution_list, var = None, obs = None)-> anndata.A
1515
"""
1616
print('Creating anndata')
1717
adata = anndata.AnnData(attribution_list)
18-
adata.raw = adata
18+
#adata.raw = adata
1919
if var is not None:
2020
print('Setting vars')
2121
adata.var = var

0 commit comments

Comments
 (0)