Bioconductor / LoomExperiment

A package to read, write, and manipulate loom files using LoomExperiments. Uses the loom file format from the Linnarson Lab. https://linnarssonlab.org/loompy/
https://www.bioconductor.org/packages/LoomExperiment
6 stars 5 forks source link

index issue when reading graphs from loom #4

Closed nh3 closed 5 years ago

nh3 commented 5 years ago

Hi,

According the loom spec (https://linnarssonlab.org/loompy/format/index.html#row-and-column-sparse-graphs) on column or row graphs:

Vertex indexing is zero-based. When an entry in a or b is zero, this denotes the first column in the matrix. If there are N columns, then vertices are numbered from 0 to N - 1.

However, SelfHits(), which is called by LoomGraph(), expects 1-based index. Is it possible to add 1 when reading and subtract by 1 when writing the graphs?

Many thanks!

dvantwisk commented 5 years ago

Thank you for the issue. I will be reviewing it and making changes shortly.

dvantwisk commented 5 years ago

I've addressed the issue on both release and devel by essentially doing what your issue suggests. Please try it out and inform me about any further issues you experience.