mathewchamberlain / SignacX

Signac
GNU General Public License v3.0
23 stars 5 forks source link

Issues running Signac on newer Seurat objects #9

Closed jeremycfd closed 3 years ago

jeremycfd commented 3 years ago

I've been using SignacX without issue for a while now. I recently updated a number of R packages, including Seurat, and now SignacX doesn't work. I've tried downgrading Seurat before creating the Seurat object, but that hasn't resolved the issue, so I'm wondering if another package that was automatically updated is causing the underlying problem. Strangely, loading an older Seurat object into R even with a new version of Seurat seems to work fine...

>   packageVersion("SignacX") #
[1] ‘2.2.1’
> packageVersion("Seurat")
[1] ‘4.0.3’
> Jobj
An object of class Seurat 
14633 features across 69630 samples within 2 assays 
Active assay: RNA (14623 features, 2000 variable features)
 1 other assay present: ADT
 3 dimensional reductions calculated: pca, tsne, umap
> labels2 <- Signac(Jobj, num.cores = 32)
 ..........  Entry in Signac 
 ..........  Running Signac on Seurat object :
             nrow = 14623
             ncol = 69630
  |                                                                                                                           |   0%, ETA NA

 ..........  Exit Signac.
             Execution time = 59.185 s.
Warning message:
In mclapply(X, function(...) { :
  all scheduled cores encountered errors in user code

This produces "labels" but clearly only full of errors:

> summary(labels)
                      Length Class     Mode     
All                       1  try-error character
Immune                    1  try-error character
Lymphocytes               1  try-error character
Myeloid                   1  try-error character
B                         1  try-error character
B.NoPlasma                1  try-error character
TNK                       1  try-error character
T                         1  try-error character
T.CD4                     1  try-error character
T.CD4.memory.regs         1  try-error character
T.CD8                     1  try-error character
MPh                       1  try-error character
Monocytes.Neutrophils     1  try-error character
Monocytes                 1  try-error character
NonImmune                 1  try-error character
Non.Fibroblasts           1  try-error character
Non.Epithelial            1  try-error character
T.CD8.memory              1  try-error character
louvain               69630  -none-    character
mathewchamberlain commented 3 years ago

Hi Jeremy,

Thanks, I found the source of the problem; it is with the naming convention in Seurat objects. I am patching it and releasing a new version on CRAN. This does not change the underlying algorithm at all, just the naming convention. Thanks for bringing this up! I will comment again when the new version is up on CRAN; should be within 1-2 days.

jeremycfd commented 3 years ago

Thanks so much! Really appreciate the quick response! Great work, by the way!

mathewchamberlain commented 3 years ago

No problem Jeremy, and thank you. SignacX 2.2.2 is now up on CRAN. Can you give it a try and let me know if it fixes your issue? If I do not hear from you, I will close the issue in a few days.

mathewchamberlain commented 3 years ago

Closing for now; please open a new issue if problem persists.