Giter VIP home page Giter VIP logo

Comments (5)

keller-mark avatar keller-mark commented on July 20, 2024

We probably need to refactor the data wrapper classes so that many view config file definitions can be created while only a single file / directory is served

from vitessce-python.

ilan-gold avatar ilan-gold commented on July 20, 2024

@keller-mark Could you make that a bit clearer? I made a "multi-file" config in #32 but feel like I don't know quite know what I am doing. If you want to review there to make your ideas clear that's ok.

from vitessce-python.

keller-mark avatar keller-mark commented on July 20, 2024

That looks fine, I am referring more specifically to this loop https://github.com/vitessce/vitessce-python/blob/07a2721/vitessce/routes.py#L20 over data types: the loop assumes that for a specific data wrapper object obj, the obj._get_data function for a particular data type such as cells will return both:

  • dt_obj_file_defs like
       [
             {
                   "url": "http://localhost:4000/my-anndata.zarr",
                   "fileType": "anndata-cells.zarr",
                   "type": "cells"
             }
        ]
  • dt_obj_routes which is a list of starlette Routes like
      [
            Mount(self._get_route(dataset_uid, obj_i, "cells"),
                    app=StaticFiles(directory=os.path.dirname(zarr_filepath), html=False, check_dir=False)),
       ]

but for the AnnData data types, we can get multiple data types out of the same anndata Zarr store ("cells", "expression-matrix", "cell-sets"), so if the loop iteration gets to "cell-sets" the route will return different dt_obj_file_defs but will try to mount the same Zarr directory again. I am not actually sure if serving the same zarr store twice on two different routes will cause any issues but I figured there is a possibility

from vitessce-python.

ilan-gold avatar ilan-gold commented on July 20, 2024

@keller-mark That makes sense ok. Thanks for explaining.

from vitessce-python.

keller-mark avatar keller-mark commented on July 20, 2024

Done in #39

from vitessce-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.