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

Error in pca$x[, 1:npc] : subscript out of bounds #37

Open
1213812138zqc opened this issue May 26, 2021 · 1 comment
Open

Error in pca$x[, 1:npc] : subscript out of bounds #37

1213812138zqc opened this issue May 26, 2021 · 1 comment

Comments

@1213812138zqc
Copy link

Hello,
I obtained the following error when running the imputation on my dataset. Could you please advise what's the reason for this error? Thanks.

[1] "reading in raw count matrix ..."
[1] "number of genes in raw count matrix 180253"
[1] "number of cells in raw count matrix 60"
[1] "reading finished!"
[1] "imputation starts ..."
[1] "searching candidate neighbors ... "
[1] "calculating cell distances ..."
Error in pca$x[, 1:npc] : subscript out of bounds
Calls: scimpute ... imputation_wlabel_model8 -> find_neighbors -> lapply -> FUN -> t
Execution halted

@pwwang
Copy link

pwwang commented Dec 9, 2021

I had the same problem. Not sure if this is your case, but in mine, I had too few cells in one of the groups marked by labels I passed to scimpute().

The workaround for me is to not pass the labels, but let scimpute() do the clustering. So previously I had

scimpute(..., labels=labels, labeled=T)

Now I have:

scimpute(..., labels=NULL, labeled=F, Kcluster=length(unique(labels)))

The grouping is a little bit different than ours, but it worked somehow.

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

2 participants