question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

merging with a loom file

See original GitHub issue

Hej,

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:closed
  • Created 5 years ago
  • Comments:34 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
VolkerBergencommented, Feb 22, 2019

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.

0reactions
denvercal1234GitHubcommented, Nov 22, 2021

Ah, I see. Thank you Weiler.

Read more comments on GitHub >

github_iconTop Results From Across the Web

combine (function) — loompy 3.0.6 documentation
Nothing, but creates a new loom file combining the input files. Note that the loom files must have exactly the same number of...
Read more >
how to merge 6 loom file? · Issue #74 · mojaveazure/loomR
First, I tried to merge 6 individual .loom files generated by ... You can convert the loom object to Seurat Object and then...
Read more >
Combine loom files in mojaveazure/loomR: An R interface for ...
Combine loom files. ... In mojaveazure/loomR: An R interface for loom files ... A list of loom objects or paths to loom files....
Read more >
loomR.pdf - Satija Lab
vides an interface for working with loom files in a loom-specific way; ... from each input loom should we stream to the merged...
Read more >
Tutorial 4 : How to work with Loom files created by ASAP
loom files handle only ONE fixed dimension for matrices (in terms of nb of cells/genes). This means that if you filter your main...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found