0
$\begingroup$

I've got a moderately large set of PBMCs, over 1M cells. That means I can't easily do a grid search of dimensionality reduction/clustering parameters/methods. Some examples results I'm getting with scanpy default parameters include PCA -- a big, dense grouping with lobes radiating outwards, and UMAP -- "better" groupings in some sense, but many many tiny clusters of cells, more than are biologically plausible (hundreds) as well.

Basically I'm looking for best dimred/clustering practices for such a dataset, other than what's on offer from scanpy/Seurat. My metrics such as they are are that the major cell types should be clearly separated, and that the overall plot have some biological plausibility in terms of number of visually distinct clusters.

I'm aware of the Xiang et al Frontier Genetics 2021 paper, but the number of cells their example datasets use is much smaller AFAIK. They concluded that tSNE is the best choice of method according to their metrics, though UMAP also has some stability advantages. The Chari and Pachter PLOS Comp. Bio. 2023 paper raises some good points (a highly dimensional space can't really accurately have its relations preserved in 2 dimensions, and there are other issues of noise, interpretability, and so on. They recommend clustering from the higher dimensional data, which I do agree with. A different paper rec could be great.

PS: SCVI seems like a good option, I'm playing with that at the moment.

$\endgroup$
5
  • 1
    $\begingroup$ Hi M, thanks for the reply. The first paper I mentioned covers several dimensionality reduction methods and concludes that for the older data they tested, tSNE is best. The second one covers some of the theory and recommends perhaps side stepping dimred entirely. $\endgroup$
    – Henry Gong
    Commented Aug 25, 2023 at 22:36
  • 2
    $\begingroup$ As for metric, basically I'm looking for separation of major cell types and a plausible overall number of clusters. PCA for instance does separate some PBMC cell types out but not most. UMAP does separate out certain cell types (B cells are well separated for instance) but not others and seems to have lots of spurious tiny clusters. $\endgroup$
    – Henry Gong
    Commented Aug 25, 2023 at 22:38
  • 1
    $\begingroup$ Yes, I'll edit it in a bit -- will write up a less pithy short summary of the second paper. $\endgroup$
    – Henry Gong
    Commented Aug 25, 2023 at 22:56
  • $\begingroup$ I always wonder what 1M cells can answer what 100k cannot. Anyway, what you have to find out based on published datasets of that magnitude is which approaches scale to that number of cells. I never had to do that myself since our datasets are always way smaller. I would consider not to analyse this per-cell but rather try to find some sort of meta-cell approach where you bin cells into metas, to reduce the computational burden. I would not believe that with 1M cells one really benefits from pure single-cell analysis. Maybe some sort of clustering to get "pseudobulks" and then use these. $\endgroup$
    – ATpoint
    Commented Aug 26, 2023 at 15:42
  • $\begingroup$ @M, just SCVI at the moment. @ATpoint, it's 1M+ cells across many individuals, and I do agree that cluster level comparisons are a good way to make the data tractable -- hence the question, really. Point well taken to compare to other similar datasets. $\endgroup$
    – Henry Gong
    Commented Aug 26, 2023 at 22:18

1 Answer 1

-1
$\begingroup$

Aim It's important to define what all these calculations are doing: they're attempting to extract maximum "multi-dimensional" variance from a data set. The key thing here is that the methodology is old, but it is very well established (long before RNAseq ever existed). I get the point empirical stats is boring, but it's essential to consider whats the underbelly of the methods being used.

To answer the question directly

  1. PCA+tSNE is worth considering
  2. SCVI-tools is in a different league, and totalIV looks very interesting (what I'm tentatively recommending).

Note, the commercial sector is often more advanced than public sector: I developed ML methods which intersect it with classical approaches for this basic style of calculation. The scvi-tools however is "full-on" via a DL approach.

Note2, I've not read the papers cited except the scvi-tools documentation

Data set size I don't do PMBC calculations - I do perform PMBC post-hoc analytics BTW. I personally don't see the data set size as being prohibitive for an unsupervised learning calculation. Pyscan should be able to handle this.

PCA is the goto approach stage 1 - but there's a caveat, which is what you're hinting at. First, it's how much variance is trapped within each component. Scanpy will permit this calculation. What you want is >70% variance, classical stats for example PC1+PC2+PC3+PC4 > 70%. However, from past posts on this site then for PMBCs this might be unattainable, like no-can- exceed the variance threshold for lots and lots of PCs. That is an issue.

To go through your papers

Chari and Pachter PLOS Comp. Bio. 2023

Sure, I've not read the paper but on your report, simply taking PC1 and PC2 on bivariate axes is not cool at all. Very little of the variance can be represented. Nobody disputes this. Even if 10 PCs trapped > 70% of the variance - thats a lot of bivariate plots to assess, e.g. PC1 vs PC3, PC1 vs PC4 etc ... At least you've trapped a good proportion of the variance.

The problem becomes what happens when very little of the variance is captured. This is where Xiang et al Frontier Genetics 2021 are likely to be coming from. It's better at that point to use tSNE, but its not ideal.

Whats the solution?

Approach 1 In classical stats (not in RNAseq stuff) the output of PCA would be placed into tSNE and this will cause the variance spread across large numbers of PCs to be trapped by tSNE. This will give you nice clusters. I've not seen this approach at all in RNAseq - it is a common approach. The assumption is that loads and loads of PCs from the PCA trap sufficient amounts of the variance and tSNE will nicely represent that in 2 dimensions. It's possible that is what Xiang et al Frontier Genetics 2021 have done, but they may have simply gone straight to tSNE (see note2).

Approach 2 scvi-tool is impressive and I would recommend totalVI for dimensionality reduction, which they place straight into scanpy.

The method and usage (not the robustness) for totalIV scvi-tools is described here. They are deploying a "hidden Markov"/latent variable style model. See the note below on pss. They've used "CITE-seq RNA", which I don't exactly know what that is but hopefully that will remain relevant.

  • It's important to note scvi-tools incorporates lots of other approaches including semi-supervised learning (is that scANVI???), transfer-learning (assume its CNN-style calculations), a standard ANN type model (I think thats scVI). I'm simply proposing what I would guess would work in your case.
  • It is worth noting there are imperfections with the authors' methods - in general. Computer vision is a useful example, this used very similar approaches and it took years before serious levels of accuracy were achieved. Trapping absolute accuracy within a single deep learning model "off-the-cuff" I suggest is unlikely.

Semi-supervised learning its basically unsupervised learning but quantifying the weights of each feature - you can use it but I have never got good results from semi-supervised learning methods in general, this might be different though.


ps. If I've time (i.e. might not happen) I'll pop the link into the related question, where the low amounts of variance between PCs, and how to optimise that is partially answered.

pss. Overall scvi-kit for the models outlined need published demonstration they are robust. This part of their work appears partially missing, basically there appears a lot more functionality than published papers. I assume their other stuff is working its way through peer-review. The totalIV approach: I performed a brief search but was unable to find anything published - whilst I'm recommending it - it appears untested. What I believe is they've stolen a march on the rest of the field in general, so I'm making a best guess.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.