BiocPy/BiocFrame

Slicing doesn't handle nested BiocFrames correctly

Closed this issue · 0 comments

LTLA commented
custom_thresholds=BiocFrame({
    "sums": [1, 2, 3],
    "detected": [4, 5, 6],
    "subset_proportions": BiocFrame({
        "foo": [7, 8, 9]
    }),
}, rowNames = [ "C", "B", "A" ])

custom_thresholds.column("subset_proportions")
## <biocframe.BiocFrame.BiocFrame object at 0x7fb82e15a0b0>

out = custom_thresholds[[2,1,0],:]
out.column("subset_proportions")
## [<biocframe.BiocFrame.BiocFrame object at 0x7fb82e1596f0>, <biocframe.BiocFrame.BiocFrame object at 0x7fb82e159d80>, <biocframe.BiocFrame.BiocFrame object at 0x7fb82e159c90>]

As you can see, the slicing causes the creation of a list of BiocFrames, rather than returning the nested BiocFrame itself.