jsxlei / SCALEX

Online single-cell data integration through projecting heterogeneous datasets into a common cell-embedding space
BSD 3-Clause "New" or "Revised" License
71 stars 18 forks source link

Possible bug in preprocessing #24

Closed Beiusxzw closed 11 months ago

Beiusxzw commented 11 months ago

Screen Shot 2023-09-26 at 7 12 23 PM

The default passed value for use_layer is "X". However, (use_layer == 'X' or use_layer) in adata.layers → (True or 'X') in adata.layers → True in adata.layers → False

results in KeyError: 'X'.

In my practice, I change the line to x_dim = adata.shape[1] if user_layer is None else adata.obsm[use_layer].shape[1].