drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
258 stars 98 forks source link

issue with deconvolution #303

Closed hongruhu closed 2 years ago

hongruhu commented 2 years ago

hi, I ran into error during deconvolution and could not figure it out for now. could anyone help please? Thanks.


DWLS_matrix <- makeSignMatrixDWLSfromMatrix(matrix = as.matrix(giotto_SC@norm_expr[merfish_gene,]),
                                            cell_type = giotto_SC@cell_metadata$mapped_celltype,
                                            sign_gene = merfish_gene)
class(DWLS_matrix)

[1] "matrix" "array"

merfish_brain <- runDWLSDeconv(gobject = merFISH_test, 
                               expression_values = "normalized", 
                               cluster_column = "mapped_celltype",
                               sign_matrix = DWLS_matrix)

[1] "The 154 overlapped genes between signature matrix and\nspatial expression profile" Error in enrich_matrix[, ct[j]] : subscript out of bounds

hongruhu commented 2 years ago

figured it out. seems that the current version does not support relative counts/ CPM as "normalized" expression data. log transformation must be applied prior to the deconvolution step

V2O5-666 commented 1 year ago

Hi, I also get the same issue. My Giotto version is 1.1.0. Could you explain the solution in detail. Thanks so much! @Hongru-Hu

xazra commented 1 year ago

Hi, I also get the same issue. My Giotto version is 1.1.0. Could you explain the solution in detail.

Hi, hard to comment without knowing the details of your data / workflow, I just want to reiterate that the signature matrix indeed can't consist of counts, it needs to be normalized expression levels of relevant marker genes in a set of cell types in the reference single cell RNAseq experiment.