vjcitn / rhdf5client

2 stars 1 forks source link

Single row queries are bugged #2

Open vjcitn opened 1 year ago

vjcitn commented 1 year ago
library(rhdf5client)
x = HSDSArray(URL_hsds(), 
         "hsds", "/shared/bioconductor/darmgcls.h5", "/assay001")
x
<65218 x 3584> matrix of class HSDSMatrix and type "double":
                [,1]        [,2]        [,3] ...    [,3583]    [,3584]
    [1,]    0.000000    0.000000  112.394374   .    0.00000    0.00000
    [2,]    0.000000    0.000000    0.000000   .    0.00000    0.00000
    [3,]    0.000000    0.000000    0.000000   .    0.00000    0.00000
    [4,]    5.335452   11.685833    0.000000   .    0.00000   14.01612
    [5,]    0.000000    0.000000    0.000000   .    0.00000    0.00000
     ...           .           .           .   .          .          .
[65214,]     0.00000     0.00000     0.00000   .    0.00000    0.00000
[65215,]   480.68946  1228.13851   112.75566   .    0.00000    0.00000
[65216,]     0.00000     0.00000     0.00000   .    0.00000    0.00000
[65217,]     0.00000   610.82997    46.86639   .    0.00000    0.00000
[65218,] 10155.80336 25366.30099  2068.63983   .    4.01555 2531.88862
> x[1:4,1:3]
<4 x 3> matrix of class DelayedMatrix and type "double":
           [,1]       [,2]       [,3]
[1,]   0.000000   0.000000 112.394374
[2,]   0.000000   0.000000   0.000000
[3,]   0.000000   0.000000   0.000000
[4,]   5.335452  11.685833   0.000000
> x[4,1:3]
[1] NA NA NA
vjcitn commented 1 year ago

Fixed with checks on content type to identify binary return

> x[4,1:3]
[1]  5.335452 11.685833  0.000000
> x[65218,1:5]
[1] 10155.803 25366.301  2068.640  7268.275  6691.871
vjcitn commented 1 year ago

Will close when tests introduced