sdsc-ordes / modos-api

Python API to manage multi-omics digital objects
https://sdsc-ordes.github.io/modos-api
Apache License 2.0
0 stars 0 forks source link

feat(cli, api):show only target element #98

Closed cmdoret closed 3 months ago

cmdoret commented 3 months ago

Quality of life feature to target a specific element when inspecting an object:

CLI:

$ modos show data/ex sample/sample1
sample/sample1:
  '@type': Sample
  cell_type: astrocyte
  description: Dummy sample for tests
  name: Sample 1
  sex: Male
  source_material: brain tissue

$ modos show --zarr data/ex assay
assay
 └── assay1

API:

m = MODO('data/ex')
m.show_contents('sample/sample1')
m.list_arrays('data')

Limitations

Does not work with the --files option, as I was not sure whether it makes sense; e.g. should this list the index files (.crai, .csi, ...), should we list files directly linked to the element, or also recursively (sample1 -> data1 -> file).