sqjin / scAI

An unsupervised approach for the integrative analysis of single-cell multi-omics data
GNU General Public License v3.0
29 stars 8 forks source link

Can't run identifyClusters #13

Open f6v opened 4 years ago

f6v commented 4 years ago

I've been trying to run scAI in an HPC environment. Here's the code:

LIB_PATH = "./R_libs/R-4.0.0/"

library(Seurat)
library(ggplot2)
library(scAI, lib.loc = LIB_PATH)
library(swne, lib.loc = LIB_PATH)

load("./data/data_simulation.rda")
X <- data_simulation$data
labels <- data_simulation$labels

scAI_outs <- create_scAIobject(raw.data = X, do.sparse = F)

cat("Preprocessing...")
scAI_outs <- preprocessing(scAI_outs, assay = NULL)

cat("Running scAI...")
scAI_outs <- run_scAI(scAI_outs, K = 20, nrun = 1, do.fast = T)

cat("Running identifyClusters...")
scAI_outs <- identifyClusters(scAI_outs, resolution = 0.9)

cat("Running getAggregatedData...")
scAI_outs <- getAggregatedData(scAI_outs, group = scAI_outs@identity)

cat("Running reducedDims...")
scAI_outs <- reducedDims(scAI_outs, method = "tsne")

cat("Running cellVisualization...")
umap_plot <- cellVisualization(scAI_outs, scAI_outs@embed$umap, color.by = "cluster")
ggsave("./results/umap_clusters.png", umap_plot)

I've tried both simulated and 10x PBMC dataset. Every time it fails on identifyClusters:

Error in `$<-.data.frame`(S3Part(x, TRUE), name, value) :
  replacement has 500 rows, data has 0
Calls: identifyClusters -> $<- -> $<- -> $<-.data.frame

Would you have any advice?

f6v commented 4 years ago

Running interactively with traceback after error gives:

5: stop(sprintf(ngettext(N, "replacement has %d row, data has %d",
       "replacement has %d rows, data has %d"), N, nrows), domain = NA)
4: `$<-.data.frame`(S3Part(x, TRUE), name, value)
3: `$<-`(`*tmp*`, "cluster", value = structure(c(1L, 1L, 1L, 1L,
   1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
   1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
   1L, 1L, 1L, 1L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
   4L, 4L, 4L, 6L, 6L, 6L, 6L, 4L, 3L, 9L, 3L, 9L, 3L, 9L, 3L, 3L,
   3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 9L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
   3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 5L, 3L, 9L, 3L, 3L, 3L, 9L, 3L,
   3L, 3L, 9L, 3L, 9L, 3L, 3L, 3L, 3L, 3L, 9L, 3L, 3L, 3L, 3L, 3L,
   3L, 3L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 9L, 3L, 3L, 3L, 3L, 3L, 3L,
   3L, 3L, 3L, 3L, 3L, 9L, 3L, 3L, 3L, 3L, 9L, 3L, 9L, 3L, 3L, 3L,
   3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 9L, 3L, 3L, 2L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 8L, 2L, 2L, 2L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 8L, 2L, 1L, 8L, 8L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
   2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L
   ), .Names = c(NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_), .Label = c("1", "2", "3", "4", "5", "6", "7",
   "8", "9"), class = "factor"))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2L, 2L, 2L
   ), .Names = c(NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
   NA_character_), .Label = c("1", "2", "3", "4", "5", "6", "7",
   "8", "9"), class = "factor"))
f6v commented 4 years ago

The issue seems to arise when I don't add labels like:

scAI_outs <- addpData(scAI_outs, pdata = labels, pdata.name = "Cell types")

However, I'm a bit confused. Where do this labels come from? The simulated data works fine with labels, but I don't have them for the real dataset.

sqjin commented 4 years ago

Hi @f6v , The step addpData is optional. For simulated data, we just use the ground-truth labels to validate our results. For real dataset, you can simply skip it.

For the error you encountered, I am sorry I have no idea on it. When you run the simulated data in your local computer, do you have the similar issue?

f6v commented 4 years ago

@sqjin thanks for getting back to me!

I think the labels are in fact required: take this notebook as an example. If I remove the labels, it fails to run properly, with the same error I originally posted.

A wild guess would be that it fails around here, but I'm not at all familiar with the implementation.