Skip to content

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

@MartinLoza

Description

@MartinLoza

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions