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

getting Error in pca_current[, seq_len(10)] : subscript out of bounds #29

Open
MartinLoza opened this issue Aug 31, 2020 · 1 comment
Open
Labels
bug Something isn't working

Comments

@MartinLoza
Copy link

Hi, I am trying to integrate two PBMC batches (control and stimulation) but keep getting the same error. And example of what I am trying to do is:

`library(Seurat)
library(SeuratData)
library(scMerge)

if (! "ifnb" %in% SeuratData::InstalledData()[["Dataset"]]) {
SeuratData::InstallData("ifnb")
}
Uncorrected <- SeuratData::LoadData("ifnb")
Uncorrected <- NormalizeData(Uncorrected, verbose = FALSE)
Uncorrected <- FindVariableFeatures(Uncorrected,
nfeatures = 2000,
verbose = FALSE)

features <- VariableFeatures(Uncorrected)

Correction <- as.SingleCellExperiment(Uncorrected[features,])

Correction <- scMerge(sce_combine = Correction,
ctl = features,
kmeansK = c(3,3),
batch_name = "stim",
assay_name = "scMerge",
plot_igraph = FALSE)`

I am interested in correcting only the variable features, so I subset as Uncorrected[features,]
I have tried different ways to create the SingleCellObject but keep getting the same error. It is worth to note that I don't get the error if I dont't subset the Uncorrected batch.
Thanks in advance for any suggestion you may have.

@grimwoo
Copy link

grimwoo commented Jan 20, 2022

Hi, @MartinLoza
I had exactly same error. Have you solved this one?

@nick-robo nick-robo added the bug Something isn't working label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants