ArchR
ArchR copied to clipboard
Update RNAIntegration.R
when running addGeneIntegrationMatrix function, it will occur this error: "Error in slot(object = object, name = "features")[[layer]] <- features : \n more elements supplied than there are to replace\n"
After repeated testing, I finally know the answer to this question: This error occurred in the RNAIntegration.R of the ArchR package This code in the RNAIntegration.R file: seuratATAC <- Seurat::CreateSeuratObject(counts = mat[head(seq_len(nrow(mat)), 5), , drop = FALSE]) The Seurat::CreateSeuratObject function requires that the rownames of mat must be vector, not matrix. But the rownames passed to mat in the previous code was actually a matrix, so you only need to add a command line before this code, this will cast the rownames of mat to a vector: rownames(mat) <- as.character(rownames(mat)) And then this error was completely eliminated.