Closed akramdi closed 3 years ago
I am also wondering if there is any explanation as to why I am missing genes ? Most of the genes of interest in my analysis that I got using Velocyto.R do not come up using scVelo.
@akramdi, yes, scv.utils.merge
performs an inner merge, i.e. only features contained in both AnnData objects are kept.
>>> import numpy as np
>>> import pandas as pd
>>> from anndata import AnnData
>>> import scvelo as scv
>>>
>>> adata_1 = AnnData(pd.DataFrame(np.eye(2), columns=['gene_1', 'gene_2']))
>>> adata_2 = AnnData(pd.DataFrame(np.eye(2), columns=['gene_1', 'gene_3']))
>>>
>>> adata = scv.utils.merge(adata_1, adata_2)
>>> adata
AnnData object with n_obs × n_vars = 2 × 1
>>> adata.var_names
Index(['gene_1'], dtype='object')
You should check that
scv.pp.filter_and_normalize
. In scvelo>=0.2.2
you can use the keyword argument retain_genes
to exclude specific genes from being filtered out.
Hello everyone,
I'm just getting started at scVelo and I struggled a lot to put together the input data that combines splicing info from the loom file obtained by
velocyto
and extra information (umap, clusters, cells) stored in a Seurat object after data analysis. I followed the steps Originally posted by @Mevelo in https://github.com/theislab/scvelo/issues/161#issuecomment-591445362 in order to usescv.utils.merge
that does the job of merging the two. However, at one point, when I try to interpret the velocity by plotting some marker genes usingscv.pl.scatter(adata, gene_names)
, I get a warning that some genes are not found. This rises a big red flag for me as these are my favourite genes and they should be expressed (it is the case in the Seurat analysis). This made me doubt the initial steps where I put the input together. Could you please tell me if I'm doing something wrong?Does the structure of
sceMerge
object look ok?Does anything seem off? Because I'm missing some genes, I was wondering if
scv.utils.merge
function also merges features between the two files ? or is it used to subset cells and import umap embeddings and such?Thank you in advance for your comments! Best,