hoffmangroup / genomedata

The Genomedata format for storing large-scale functional genomics data.
https://genomedata.hoffmanlab.org/
GNU General Public License v2.0
2 stars 1 forks source link

Fix consistency in array shape output when track indexing on bigWig files #69

Closed EricR86 closed 8 months ago

EricR86 commented 8 months ago

This fixes an inconsistency in array shape output depending on how the "track" portion of bigWig files are indexed. The tests have been updated to be consistent with the expected shape output.

There is notable undefined behaviour discovered when matching implementations. Specifically in the case when track indexing with tracknames in an array-like.

The following is allowed:

chr1[0, [0]] = [[data]]

The following is not and currently is not defined by the implementation anywhere and is an error:

chr1[0, ["trackname"]]

Notably the track indexing can be a list of lists as deep as you want to shape your output. e.g.

chr[0, [[0]]] = [[[data]]]