Skip to content

Commit

Permalink
sort cols and index
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kofman committed Dec 25, 2024
1 parent 4ab71bc commit 5b0d874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,9 @@ def combine_coverage_adatas(adata_dict):
dense_adata = dense_adata.join(missing_position_fix, how='inner')
assert(len(dense_adata.columns) == len(all_pos))

dense_adata.columns = sorted(dense_adata.columns)
dense_adata = dense_adata.sort_index()

# Convert the dense matrix to a sparse CSR matrix
sparse_X = sp.csr_matrix(dense_adata)
# Create a new AnnData object with the sparse matrix
Expand Down

0 comments on commit 5b0d874

Please sign in to comment.