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

negative length vectors are not allowed : Error when converting anndata to seurat #75

Open
bapoorva opened this issue Jul 14, 2023 · 5 comments

Comments

@bapoorva
Copy link

Hi,

I've used sceasy before with no issues. But this time, i tried to convert an h5ad file to a seurat object and got this error

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 't': negative length vectors are not allowed

This is my code

library(sceasy)
library(reticulate)
use_python('/Users/bapoorva/miniconda3/bin/python3')
loompy <- reticulate::import('loompy')

sceasy::convertFormat("~/HLCA/local.h5ad", from="anndata", to="seurat",
                      outFile='HLCA_humanref.RDS')

I downloaded the h5ad from this link. It is the human reference file from the Human Lung Cell Atlas (HLCA)

Any ideas on how to resolve this ?

Thanks

@AlexandrePelletier
Copy link

I got the same error, anyone have been able to fix it ?

@Rubbert
Copy link

Rubbert commented Jan 9, 2025

Same here. I wonder if it could be a memory/data size issue, I imagine the HLCA is quite large, and my test data is also ~600K cells.

@GMFranceschini
Copy link

Same error here, any idea how to fix it?

@Rubbert
Copy link

Rubbert commented Feb 18, 2025

I suspect it is purely a size issue. Is your data also quite big? That probably means you'll have to save the data some other way (e.g. as .csv.gz or something) and build up your object piece-by-piece (I think that's what I ended up doing).

@GMFranceschini
Copy link

That makes perfect sense, also given the other issues reported. Yes it's big, it is the Tabula Muris complete object from cellXgene in my case. Thank you for your advice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants