cmapPy icon indicating copy to clipboard operation
cmapPy copied to clipboard

reading gctx from a non-fs file object

Open idavydov opened this issue 4 years ago • 1 comments

Hi, In our settings there is often a need to read a .gctx file from a non-file (i.e. python file object). Currently it is not possible with cmapPy. The parse method explicitly checks for the filename:

https://github.com/cmap/cmapPy/blob/f3fdf016095bb08d9402ec9b6d3ebf6e603d20a1/cmapPy/pandasGEXpress/parse_gctx.py#L64

On the other hand h5py supports any file objects.

Would it be possible to rely on duck-typing in the parse function instead to allow for different types of input file objects?

idavydov avatar Apr 08 '20 14:04 idavydov

Apparently, there are problems reading HDF5 from S3 at the moment. See here: https://github.com/h5py/h5py/issues/1530

So currently depends on the upstream functionality of h5py.

idavydov avatar Apr 09 '20 10:04 idavydov