chris-mcginnis-ucsf / DoubletFinder

R package for detecting doublets in single-cell RNA sequencing data
411 stars 109 forks source link

About the 'GT' #126

Closed Midsummer723 closed 2 years ago

Midsummer723 commented 2 years ago

Thank you for the great tool. I have a problem when I run the ' > gt.calls <- seu_kidney@meta.data[rownames(sweep.res.list_kidney[[1]]), "GT"] ## GT is a vector containing "Singlet" and "Doublet" calls recorded using sample multiplexing classification and/or in silico geneotyping results

sweep.stats_kidney <- summarizeSweep(sweep.res.list_kidney, GT = TRUE, GT.calls = gt.calls) Error in model.matrix.default(mt, mf, contrasts) : Variable 1 has no Levels ' Do this mean that there is no doublets? If it is not, what should I do with it. Thank you very much.

chris-mcginnis-ucsf commented 2 years ago

Hi @Midsummer723 -- difficult to diagnose without more information. Have you verified that gt.calls is properly set?

Midsummer723 commented 2 years ago

Thank you very much for your reply, but I still have some problems: 1.I find the when use the sctranfrom to process the data. When run the "sweep.res.list_kidney <- paramSweep_v3(seu_kidney, PCs = 1:10, sct = FALSE)" , it will come "Error in NormalizeData.default(object = GetAssayData(object = object, : trying to get slot "params" from an object of a basic class ("NULL") with no slots"

  1. When I use the standard way can work, on the "no ground-truth" however the "bcmvn_kidney <-find.pK(sweep.stats_kidney)", will show NULL
  2. When I run the (ground-truth), it shows the Variable 1 has no Levels . Which I use excatly your code by my data.
  3. PS: there is unnecessary "." at the end of "gt.calls <- seu_kidney@meta.data[rownames(sweep.res.list_kidney[[1]]), "GT"]. "
chris-mcginnis-ucsf commented 2 years ago

Hi @Midsummer723 ,

Responses to each point below:

  1. This error makes sense because you are setting the 'sct' argument to false. This argument basically just tells the function where to look for the pre-processing parameters, and setting sct=F tells it to look for logs for the NormalizeData/FindVariableFeatures/ScaleData workflow (which isn't present -- hence the error).

2-4: Please provide the exact code you are using so I can more effectively troubleshoot.