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

Issue #162

Open
sdhbiusdgb opened this issue Jul 31, 2024 · 0 comments
Open

Issue #162

sdhbiusdgb opened this issue Jul 31, 2024 · 0 comments

Comments

@sdhbiusdgb
Copy link

Hello, author,
When I was using scanorama for single-cell data integration in R, I encountered difficulties but have not been able to solve them, so I would like to seek help from your team. The specific code and errors are as follows:
Code
library(reticulate)
library(tidyverse)
library(Seurat)
library(Matrix)
#Specify Python virtual environment
use_python("/Software/PythonENV/xteam.py3.8/bin/python", required = TRUE)
#Import necessary Python packages
scanorama <- import("scanorama")
#Generate random matrix
seurat_obj1 <- readRDS("/IData/DataCenter/ColorectalCancer/Chen_Cell_2021_CRC/scRNAseq.processed.rds")
seurat_obj2 <- readRDS("/IData/DataCenter/ColorectalCancer/Giguelay_Theranostics_2022/scRNAseq.processed.ok.rds")
#Extract sparse count matrix
seurat_obj1_counts <- seurat_obj1@assays $ RNA@counts
seurat_obj2_counts <- seurat_obj2@assays $ RNA@counts
X1 <- as.matrix(seurat_obj1_counts)
genes1 <- rownames(seurat_obj1_counts)
genes1[1:5]
X2 <- as.matrix(seurat_obj2_counts)
genes2 <- rownames(seurat_obj2_counts)
#Put the data into the list
datasets <- list(X1, X2)
genes_list <- list(genes1, genes2)
#Use Scanorama for data integration
integrated_result <- scanorama$integrate(datasets, genes_list)

Error
Found 13402 genes among all datasets
Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
IndexError: index (14510) out of range
Run reticulate::py_last_error() for details. @

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