kevinblighe / scDataviz

scDataviz: single cell dataviz and downstream analyses
60 stars 17 forks source link

data should be scaled for PCA and UMAP ?? #22

Closed lengfei5 closed 2 years ago

lengfei5 commented 2 years ago

Hi there,

Thank you for this nice package and I have just started my first CyTOF data analysis. I wanna just clarify if I need to scale the antibody intensities across cells for PCA and UMAP, this sort of dimension reduction.

Best, Jingkui

kevinblighe commented 2 years ago

Hi Jingkui, how have you imported the data? - was it via processFCS()? By default processFCS() will transform the data via inverse hyperbolic sine, and then store this in the 'scaled' slot of the SingleCellExperiment object, accessible via assay(sce, 'scaled')

Technically, you don't need to further scale the data after this for PCA or UMAP. However, if the PCA bi-plot looks strange, you can apply scaling during PCA via PCAtools::pca(assay(sce, 'scaled'), scale = TRUE) (by default, scaleis set to FALSE).

Kevin

lengfei5 commented 1 year ago

Dear @kevinblighe ,

Thank you for your clarification and it is really helpful.

Really sorry for the delayed response and I was distracted by some other projects for a long time.

Thanks again.

Best, Jingkui