bnprks / BPCells

Scaling Single Cell Analysis to Millions of Cells
https://bnprks.github.io/BPCells
Other
150 stars 17 forks source link

Issue with BPCells::write_matrix_dir: Column Name Error #57

Open lisch7 opened 10 months ago

lisch7 commented 10 months ago

Hello,

I am encountering an issue with the BPCells::write_matrix_dir function and am seeking some assistance.

Background: I have processed my dataset using Scanpy and am now looking to transition this data into Seurat for further analysis. During this transition, I encountered problems with the BPCells::write_matrix_dir function. My code is as follows:

data <- BPCells::open_matrix_anndata_hdf5(
  path = "02.preprocess/seu_shiftlog_pearson_hvg2000_scale_pca_leiden_res1.0_umap_anno_scvi_by_sample_anno_1113_filter.h5ad"
)
BPCells::write_matrix_dir(mat = data, dir = "02.preprocess/sce_BP")

Problem Description: When attempting to use this function, I encountered an error stating that the matrix has some column names, but they are not equal to the number of columns. The error message is:

Warning: Matrix compression performs poorly with non-integers.
• Consider calling convert_matrix_type if a compressed integer matrix is intended.
This message is displayed once every 8 hours.
Error: Matrix has some colnames, but not equal to col number

Request for Assistance:

Any help or suggestions would be greatly appreciated.

Thank you!

bnprks commented 10 months ago

Hi, I think this was due to a bug in BPCells which should be fixed now.

Could you try re-installing with the updated BPCells version and see if that fixes your issue?