scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.87k stars 595 forks source link

The seurat converted into anndata to analyze the trajectory inference occurred the weird circumstance #1880

Open honghh2018 opened 3 years ago

honghh2018 commented 3 years ago

Hi , In my case, the seurat object using the sceasy algorithm to transfer into anndata object for trajectory inference analysis. The code lying below: import numpy as np import pandas as pd import matplotlib.pyplot as pl from matplotlib import rcParams import scanpy as sc sc.pp.recipe_zheng17(adata) sc.tl.pca(adata, svd_solver='arpack') sc.pp.neighbors(adata, n_neighbors=4, n_pcs=20) sc.tl.draw_graph(adata) sc.pl.draw_graph(adata, color='paul15_clusters', legend_loc='on data') The picture showing confused result posted below: ![Uploading image.png…]()

The object information:

adata AnnData object with n_obs × n_vars = 17885 × 999 obs: 'orig.ident', 'nCount_RNA', 'nFeature_RNA', 'percent.mt', 'RNA_snn_res.0.5', 'seurat_clusters', 'pANN_0.25_0.02_752', 'DF.classifications_0.25_0.02_752', 'percent.rp', 'pANN_0.25_0.02_826', 'DF.classifications_0.25_0.02_826', 'group', 'celltype', 'n_counts_all' var: 'vst.mean', 'vst.variance', 'vst.variance.expected', 'vst.variance.standardized', 'vst.variable', 'n_counts', 'mean', 'std' uns: 'seurat_clusters_colors', 'log1p', 'pca', 'neighbors', 'draw_graph' obsm: 'X_pca', 'X_tsne', 'X_umap', 'X_draw_graph_fr' varm: 'PCs' obsp: 'distances', 'connectivities'

honghh2018 commented 3 years ago

image

honghh2018 commented 3 years ago

Can any hear this?