Giter VIP home page Giter VIP logo

Comments (2)

keller-mark avatar keller-mark commented on September 23, 2024 1
vc.link_views_by_dict([spatial_view, another_view], {
    ct.OBS_COLOR_ENCODING: "cellSetSelection",
    ct.OBS_SET_SELECTION: [
        ["colname", "obs_set_one"],
        ["colname", "obs_set_two"],
    ],
    ct.OBS_SET_COLOR: [
        {
          "path": ["colname", "obs_set_one"],
           "color": [0, 12, 123],
        },
        {
          "path": ["colname", "obs_set_two"],
           "color": [240, 123, 58],
        },
    ]
}, meta=False)

Hi @srivarra this can be done with the above. The OBS_COLOR_ENCODING tells Vitessce whether to use the sets (categorical) vs. the gene expression values (quantitative) for colors. (For historical reasons the accepted values for this are the strings cellSetSelection or geneSelection despite moving to the more general obs prefix everywhere else). The OBS_SET_SELECTION is a list of paths for currently-selected sets. The OBS_SET_COLOR is a list of objects like { path, color } where color is an array of [r, g, b] values.

Thanks for the suggestion about using the adata.uns option, I did not know about the _colors convention in scanpy. I will make a new issue to track that

from vitessce-python.

srivarra avatar srivarra commented on September 23, 2024

@keller-mark Thank you very much! I'll go ahead and give this a try!

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.