topometry icon indicating copy to clipboard operation
topometry copied to clipboard

Map projection looks odd with high number of cells

Open Marwansha opened this issue 6 months ago • 1 comments

Sorry for Bothering again, but after testing on my entire dataset not just 1 sample, around 3/4 million cell, i observe this MAP projection and am not sure what could be the issue while doing same exact worflow on just 1 libarary the projection looks normal (11k cells) or when subsetting the same adata object to few number of cells. here is the code and projection below,

adata=sc.read_h5ad("/pasteur/zeus/projets/p02/LabExMI/singleCell/V3/scRNA_NS_IAV_COV/results/merged_object/adata_scvi.h5ad")
adata.X=adata.X.toarray()
sc.pp.scale(adata, max_value=10)

adata = adata[:, adata.var.highly_variable]
 tg = tp.TopOGraph(n_eigs=150, n_jobs=-1, verbosity=0)
tg.run_models(adata.X, kernels=['bw_adaptive'],
                   eigenmap_methods=['DM'],
                    projections=['MAP'])
 tg
TopOGraph object with 727581 samples and 12855 observations and:
 . Base Kernels: 
    bw_adaptive - .BaseKernelDict['bw_adaptive']
 . Eigenbases: 
    DM with bw_adaptive - .EigenbasisDict['DM with bw_adaptive']
 . Graph Kernels: 
    bw_adaptive from DM with bw_adaptive - .GraphKernelDict['bw_adaptive from DM with bw_adaptive']
 . Projections: 
    MAP of bw_adaptive from DM with bw_adaptive - .ProjectionDict['MAP of bw_adaptive from DM with bw_adaptive'] 
 Active base kernel  -  .base_kernel 
 Active eigenbasis  -  .eigenbasis 
 Active graph kernel  -  .graph_kernel


adata.obsm['X_topoMAP'] = tg.ProjectionDict['MAP of bw_adaptive from DM with bw_adaptive']

MAP_BIG MAP

Marwansha avatar Dec 12 '23 09:12 Marwansha