merging with a loom file
See original GitHub issueHej,
I am trying to use scv.utils.merge(adata, adata_loom)
to merge my dataset used with scanpy and the related loom dataset opened with scvelo. However, adata has dimension 7370x15000, while adata_loom has dimension 282016x33694. adata is the concatenation of 3 datasets, one from each individual, and the loom file I used is the combination of the 3 separate individuals’ file through loompy.combine.
I am pretty ok with the second dimension (I kept the most expressed 15000 genes in scanpy), but the first dimension is not clear to me, since it is really large, and generates an error because adata and adata_loom have the attribute layers
containing matrices of incompatible shape.
Is the first dimension to be interpreted in another way than just cells? Should I run the velocity analysis on the loom file without being allowed to merge?
Cheers, Samuele
Issue Analytics
- State:
- Created 5 years ago
- Comments:34 (15 by maintainers)
Top GitHub Comments
If the var_names are the same, but in different order, you can simply put them in the right order with
adata_loom = adata_loom[:, adata.var_names]
Good point though. I’ll include that in the
merge
module, so that one does not have to care about it anymore.Ah, I see. Thank you Weiler.