Skip to content

[bug] Error with UMAP plot generation  #204

Open

Description

@vd4mmind

Describe the bug
Unable to run the steps in the Vigenette. Section Step four – Merging multiple datasets into one SingleCellExperiment object

To Reproduce
Steps to reproduce the behavior:

  1. In R:
.sce_list <- list()

for(i in dir_list){
  mat <- read_sparse_matrix(i)
  metadata <- read_metadata(
    unique_key = manifest$key[as.numeric(gsub("individual_", "", basename(i)))],
    key_colname = "manifest",
    samplesheet_path = samplesheet_fp
  )
  var_classes <- c(
    individual = "factor"
  )
  metadata <- read_metadata(
    unique_key = manifest$key[as.numeric(gsub("individual_", "", basename(i)))],
    key_colname = "manifest",
    samplesheet_path = samplesheet_fp,
    col_classes = var_classes
  )
  sce <- generate_sce(mat, metadata)
  sce <- annotate_sce(
    sce,
    ensembl_mapping_file = ensembl_fp
  )
  sce <- filter_sce(sce)
  sce <- find_singlets(sce, "doubletfinder", pK = 0.005, 
                        vars_to_regress_out = c("nCount_RNA", "pc_mito"), 
                        num.cores = 1)
  sce <- filter_sce(sce)
  outdir <- file.path(outputDir,"/scflow_vignette_data")
  dir.create(outdir, showWarnings = FALSE)
  
  dir_report <- file.path(outdir, "qc_report")
  dir.create(dir_report, showWarnings = FALSE)
  
  #report_qc_sce(sce, report_file = paste0("qc_report_", basename(i)),
  #              report_folder_path = dir_report)
  
  sce_list[[basename(i)]] <- sce
  
}

sce <- merge_sce(
  sce_list,
  ensembl_mapping_file = ensembl_fp
)
  1. See error:
→ Calculating tSNE reduced dimensions
→ Calculating UMAP reduced dimensions
Error in RunUMAP.default(object = data.use, reduction.model = reduction.model,  : 
  lazy-load database '/home/sagemaker-user/R/x86_64-pc-linux-gnu-library/4.2/uwot/R/uwot.rdb' is corrupt
In addition: Warning messages:
1: In RunUMAP.default(object = data.use, reduction.model = reduction.model,  :
  restarting interrupted promise evaluation
2: In RunUMAP.default(object = data.use, reduction.model = reduction.model,  :
  internal error -3 in R_decompress1](url)
**Expected behavior**
Creation of the report with corresponding plots.

System

R version 4.2.3 (2023-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Activity

  1. vd4mmind commented on Mar 6, 2024

    @vd4mmind
    Author

    The above is solved but I am having the below issue with the UMAP plots. Seems like very redundant and a problem with ggplot2. Not a clear solution found yet. Any specific package that I should remove?

    plot_reduced_dim(sce, feature_dim = "diagnosis", 
                     reduced_dim = "UMAP_Liger", alpha = 1, size = 1)
    

    Error
    Error in as.unit(e1) : object is not coercible to a unit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions