Scissor icon indicating copy to clipboard operation
Scissor copied to clipboard

Run error in our own Seurat object

Open l-magnificence opened this issue 2 years ago • 8 comments

When I run in our own Seurat object, it occurs error

infos1 <- Scissor(bulk_dataset, tumor, phenotype, alpha = 0.05, 
                  family = "cox", Save_file = './processed/Scissor_survival.RData')
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'

But when we use Seurat_preprocessing before, it run success

tumor<- Seurat_preprocessing(seurat@assays$SCT@counts, verbose = F)
infos1 <- Scissor(bulk_dataset, tumor, phenotype, alpha = 0.05, 
                  family = "cox", Save_file = './processed/Scissor_survival.RData')

Is there any bug in applying Scissor function to our own seurat object?

l-magnificence avatar Dec 20 '21 06:12 l-magnificence

For your own seurat object, Scissor requires the normalized data and a constructed nearest neighbor network (slot name: data and RNA_snn).

You can check whether your data has these Scissor inputs. If our code still cannot run, you can send me your seurat data to my email: [email protected] and I will debug it soon.

Thanks, Duanchen

sunduanchen avatar Dec 28 '21 01:12 sunduanchen

Yes, my data have normalized data and a constructed nearest neighbor network. I think the problem may be the process of seurat. In your Seurat_preprocessing function, the object only do the LogNormalize function, so the downstream analysis in Scissor only accept LogNormalized seurat. But if one use SCTransform to normalize the data and FindNeighbors in slot SCT, there may occur error.

l-magnificence avatar Jan 10 '22 08:01 l-magnificence

Thank you very much for your feedback. I will make an update to allow users to choose the desired slot.

sunduanchen avatar Jan 11 '22 11:01 sunduanchen

I have the same issue!

Eddylyf avatar Jan 14 '22 09:01 Eddylyf

agree with @l-magnificence . I changed from SCTransform back to the LogNormalized workflow. this error was solved.

hyjforesight avatar Jan 31 '22 08:01 hyjforesight

My input data is integrated and my sc_dataset@graphs list have two dataframe named "integrated_nn" and "integrated_snn" so I got the same error. I can rename the fies to sc_dataset@graphs$RNA_snn to deal with this error. But I confuse about sample `s batch when using Scissor, better remove or not ?

Miooooooo avatar Jun 20 '22 12:06 Miooooooo

@sunduanchen Has the correction been made to be able to use SCT?

AClab-sgarcia avatar Aug 30 '22 08:08 AClab-sgarcia