carmonalab / ProjecTILs

Interpretation of cell states using reference single-cell maps
GNU General Public License v3.0
246 stars 28 forks source link

applying regression in the reference map #36

Closed pbrazda closed 2 years ago

pbrazda commented 2 years ago

Awesome tool!

I have an issue about generating my own reference map. I need to apply regression in the reference map. In seurat I did ScaleData(seurat , features = all.genes, vars.to.regress = c("S.Score", "G2M.Score"))

Is there a way to A) still use the original (seurat-originated and regressed) UMAP coordinates, or B) to apply the same regression when the re-computing the UMAP?

Or any other suggestions maybe? Thanks!

mass-a commented 2 years ago

Hello Peter, currently regression of variables is not supported. As far as I understand, regression is done prior to dimensionality reduction, so that PCA and UMAP embeddings are corrected for the desired variables. To make this work in the context of reference projection, the same variable regression should be applied to the query dataset(s) prior to PCA reduction, which is currently not straightforward to do. We will think if there's a way of implementing this.

As a side note, we normally prefer to exclude cell cycling genes from the list of variable features, instead of regressing out cell cycling scores. I have not seen a benchmark on which of the two strategies works better, though.

Best, -m