theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
409 stars 102 forks source link

not able to visualize the marker gene expression for my own dataset. #321

Closed eynullazada closed 3 years ago

eynullazada commented 3 years ago

when I execute the command : scv.pl.velocity(adata, ['Cpe', 'Gnao1', 'Ins2', 'Adk'], ncols=2)

it gives the following error: _>>> scv.pl.velocity(adata, ['Cpe', 'Gnao1', 'Ins2', 'Adk'], ncols=2,save='pancreas_genes2') Traceback (most recent call last): File "", line 1, in File "/mnt/ws/home/keynullazada/.conda/envs/p3_env/lib/python3.8/site-packages/scvelo/plotting/velocity.py", line 152, in velocity gs = pl.GridSpec(nrows, ncols, wspace=0.5, hspace=0.8) File "/mnt/ws/home/keynullazada/.conda/envs/p3_env/lib/python3.8/site-packages/matplotlib/gridspec.py", line 420, in init GridSpecBase.init(self, nrows, ncols, File "/mnt/ws/home/keynullazada/.conda/envs/p3env/lib/python3.8/site-packages/matplotlib/gridspec.py", line 48, in init raise ValueError( ValueError: Number of rows must be a positive integer, not 0

my data: _>>> adata AnnData object with n_obs × n_vars = 37001 × 2000 obs: 'initial_size_spliced', 'initial_size_unspliced', 'initial_size', 'n_counts', 'velocity_self_transition', 'louvain' var: 'Accession', 'Chromosome', 'End', 'Start', 'Strand', 'gene_count_corr', 'means', 'dispersions', 'dispersions_norm', 'highly_variable', 'velocity_gamma', 'velocity_r2', 'velocity_genes' uns: 'pca', 'neighbors', 'velocity_params', 'velocity_graph', 'velocity_graph_neg', 'umap', 'louvain', 'louvain_colors' obsm: 'X_pca', 'X_umap', 'velocity_umap' varm: 'PCs' layers: 'ambiguous', 'matrix', 'spliced', 'unspliced', 'Ms', 'Mu', 'velocity', 'variancevelocity' obsp: 'distances', 'connectivities'

Error ```pytb ... ```

Versions:

scv.logging.print_versions() scvelo==0.2.3.dev26+g8351f46 scanpy==1.6.0 anndata==0.7.4 loompy==3.0.6 numpy==1.19.2 scipy==1.5.2 matplotlib==3.3.2 sklearn==0.23.2 pandas==1.1.3

looking forward to hearing from you

Khagani

eynullazada commented 3 years ago

Never mind. I solved the issue

WeilerP commented 3 years ago

@eynullazada, sorry for the late reply. Was the issue related to scVelo? If not, I believe we can close the issue?

jinyoung5484 commented 3 years ago

I also ran into this error, @eynullazada how did you solve this issue?

eynullazada commented 3 years ago

I also ran into this error, @eynullazada how did you solve this issue?

Hi

I found out actually scvelo filters out many genes while calculating velocity and maker genes that I was interested in were filtered out too. I confirmed it by visualizing random genes that are not filtered.

I hope it helps

Khagani

jinyoung5484 commented 3 years ago

It works perfectly fine! Thank you!