RubD/Giotto_site

DWLS spatial deconvolution issue

krigia opened this issue · 5 comments

I have downloaded a PBMC 3x scRNA-seq dataset (10X platform) as a reference to run DWLS spatial deconvolution for 10X Visium dataset. The analysis requires a metasheet with cell annotations and class probability scores for each cell type which is not provided by 10X and it is not clear how to generate this.

I was wondering if anyone have run any similar deconvolution analyses for human spatial data using PBMC or other scRNA-seq dataset in the appropriate format.
Attached are two examples of formatted files from Giotto suite
brain_sc_metadata.csv

brain_sc_expression_matrix.txt.gz

Thank you.

RubD commented

Hi @krigia can you elaborate a bit on your question? Are you unsure how to create cell clusters for the PBMC data?

My question is how to generate the metasheet with cell annotations and class probability scores for each cell type. This file is required along with the matrix expression data file for DWLS spatial deconvolution analysis in 10X. I hope this clarifies.

RubD commented

Thanks for the clarification:

See the example for the mouse visium brain dataset here: https://giottosuite.readthedocs.io/en/latest/subsections/datasets/mouse_visium_brain.html#dwls-spatial-deconvolution

What you need to run spatialDWLS is a 'DWLS_matrix'.
visium_brain = runDWLSDeconv(gobject = visium_brain, sign_matrix = DWLS_matrix)

You can create that yourself or with makeSignMatrixDWLSfromMatrix, like:

DWLS_matrix<-makeSignMatrixDWLSfromMatrix(matrix = as.matrix(get_expression_values(giotto_SC,values = "normalized")), cell_type = pDataDT(giotto_SC)$Class, sign_gene = top_markers$feats)

  • The matrix is a normalized expression matrix (typically log-normalized).
  • the cell_type is vector with cell type labels for each cell/column of the matrix you provided
  • the sign_gene is a vector with the marker genes (subset of rows) for the different cell types

You can get this information with any single-cell package (e.g. bioconductor, scanpy, seurat, etc) or alternatively use Giotto to cluster your single cell data. We will try to make a more detailed and simple tutorial in the future.

RubD commented

You should also use our newest website: https://giottosuite.readthedocs.io/en/latest/ and the issue page on our Giotto repo https://github.com/drieslab/Giotto/issues . You're currently using our old repository for the Giotto website. This repo will be deleted in the future.

Thank you. This is helpful.