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 extents to matrix #182

Open
parkjooyoung99 opened this issue Feb 18, 2024 · 0 comments
Open

negative extents to matrix #182

parkjooyoung99 opened this issue Feb 18, 2024 · 0 comments

Comments

@parkjooyoung99
Copy link

Dear developer,

I am using FastMNN for batch correction. Normally, I used 2000 HVGs but now I am trying to use all genes in my matrix, and retrieve batch corrected expression matrix which is possible with scanpy.

However, I am getting the following error:
Error in rbind(...) : negative extents to matrix
Calls: RunFastMNN ... -> standardGeneric -> eval -> eval -> eval -> rbind

My code is :

msk = readRDS('mydata.rds')
msk=DietSeurat(msk)
idx = rownames(msk@assays$RNA@data)[which(rowSums(msk@assays$RNA@data) != 0)]
print(idx)
count = msk@assays$RNA@counts[idx,]
meta = [email protected]
rm(msk)
msk = CreateSeuratObject(count, meta.data = meta)
msk = NormalizeData(msk)
msk = RunFastMNN(object.list = SplitObject(msk, split.by = "subtype"), features = rownames(msk))

If you need test data, I will send the link to you.
Thank you!

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

No branches or pull requests

1 participant