Issues of model.initialize_archetypes
fl-yu opened this issue · 3 comments
Hi I encountered an issue below when following SEACells analysis tutorial notebook (In [17]
) using my own data with model.initialize_archetypes. Do you have any advice on this? Thank you so much!! ( by the way, I am able to go through the entire tutorial with example data using my current setting)
Hi! Could you provide a bit more details about the parameters you used to initialise the model, and the size of your dataset?
Thank you for your reply, I keep all the parameters the same with settings from the tutorial except changing n_SEACells to 616 as I roughly have ~7k cells
n_SEACells = 616 # we define 100 cells for one metacell
The followings are my anndata info
AnnData object with n_obs × n_vars = 61644 × 305253 obs: 'Sample', 'nMultiFrags', 'nMonoFrags', 'nFrags', 'nDiFrags', 'TSSEnrichment', 'ReadsInTSS', 'ReadsInPromoter', 'ReadsInBlacklist', 'PromoterRatio', 'PassQC', 'NucleosomeRatio', 'DoubletScore', 'DoubletEnrichment', 'BlacklistRatio', 'Clusters', 'cell', 'tissue', 'celltype', 'Organ', 'Uniform_ID', 'ReadsInPeaks', 'FRIP', 'leiden', 'n_counts' var: 'seqnames', 'start', 'end', 'width', 'strand', 'score', 'replicateScoreQuantile', 'groupScoreQuantile', 'Reproducibility', 'GroupReplicate', 'distToGeneStart', 'nearestGene', 'peakType', 'distToTSS', 'nearestTSS', 'GC', 'idx', 'N', 'highly_variable', 'means', 'dispersions', 'dispersions_norm' uns: 'GeneScoresColums', 'leiden', 'neighbors', 'umap', 'leiden_colors', 'Sample_colors', 'Uniform_ID_colors', 'log1p', 'hvg', 'pca' obsm: 'GeneScores', 'X_svd', 'X_umap', 'X_pca' varm: 'PCs' obsp: 'connectivities', 'distances'
Please let me know if you need more info. Thank you!
I don't think this is the issue, but that might be a bit too many SEACells - you want approximately SEACell for every 100 cells or so, so something like 70 SEACells might be a bit better to overcome sparsity. Debugging-wise, can you run:
palantir.utils.run_diffusion_maps(ad.obsm['X_svd'], n_components = model.n_neighbors
and let me know what happens. Also, can you print out model.n_neighbors
as well as n_waypoint_eigs
? Thanks!