Package: sctriangulate
scTriangulatescTriangulate is a Python package to mix-and-match conflicting clustering results in single cell analysis, and generate reconciled clustering solutions.scTriangulate leverages cooperative game theory (Shapley Value) in conjunction with complimentary stability metrics (i.e. reassign score, TFIDF score and SCCAF score) to intelligently integrate clustering solutions from nearly unlimited sources. Applied to multimodal datasets, this approach highlights new cell populations and mechanisms underlying lineage diversity.Please don't hesitate to reach out to me if you have any questions (contact down the page), I will be responsive.OverviewIt can be used in an array of settings:Integrate results from the same or multiple unsupervised clustering algorithms (i.e. Leiden, Seurat, SnapATAC) using different resolutions.Integrate results from both unsupervised and supervised (i.e. cellHarmony, Seurat label transfer) clustering algorithms.Integrate results from different reference atlases.Integrate labels from multi-modality single cell datasets (CITE-Seq, Multiome, TEA-Seq, ASAP-Seq, etc.).Tutorials and InstallationCheck out ourfull documentation and step-by-step tutorials. But let's get a quick sense for a minimum example, it has been tested in python>=3.7 on MacOS, Linux and Windows PC.pipinstallsctriangulateimportscanpyasscfromsctriangulateimport*fromsctriangulate.preprocessingimport*fromsctriangulate.colorsimport*# If you are using Mac or PC, set Matplotlib backend as Aggsctriangulate_setting(backend='Agg')# If you are using Linux server, make sure you have internet connections# Your adata should have:# (a) adata.X, properly normalized (i.e. log CPTT for RNA, CLR for ADT, etc), check sctriangulate.preprocessing.Normalization for various choices# (b) at least two columns representing conflicting annotations in adata.obs, passed to query argument# (c) adata.obsm['X_umap'] for automatically generate visualization, check sctriangulate.preprocessing.scanpy_recipe to generate umap# (d) don't have adata.raw attribute, if have, del adata.raw, this will interfere how scanpy calculate marker genesadata=sc.read('./test/input.h5ad')sctri=ScTriangulate(dir='./output',adata=adata,query=['sctri_rna_leiden_1','sctri_rna_leiden_2','sctri_rna_leiden_3'])sctri.lazy_run()# All the results will be saved in the dir you specifiedDockerYou can run the main functionalities using a docker container:dockerpullfrankligy123/sctriangulate:0.12.0.1# imagine you are in the folder where your input.h5ad file sits, and you want to save your results to a new folder in the# same directory as ./output, here is how you run the dockerdockerrun-v$PWD:/usr/src/app/run-tfrankligy123/sctriangulate:0.12.0.1--adata_path./run/input.h5ad\--dir_path./run/output--querysctri_rna_leiden_1sctri_rna_leiden_2sctri_rna_leiden_3# access help pagedockerrun-v$PWD:/usr/src/app/run-tfrankligy123/sctriangulate:0.12.0.1--helpCitationLi, G., Song, B., Singh, H. et al. Decision level integration of unimodal and multimodal single cell data with scTriangulate. Nat Commun 14, 406 (2023).https://doi.org/10.1038/s41467-023-36016-yReproducibilityAll scripts for reproducing the analyses in the preprint are available in thereproduce folder, along
with all the necessary input files and intermediate outputs which are avaiable inSynapse storage.ContactGuangyuan(Frank) LiEmail:li2g2@mail.uc.eduPhD student, Biomedical InformaticsCincinnati Children’s Hospital Medical Center(CCHMC)University of Cincinnati, College of Medicine