Coder Social home page Coder Social logo

Comments (5)

Kdreval avatar Kdreval commented on September 27, 2024

In another use case, the issue with factor was also discovered. So when the metadata column is factor, ComplexHeatmap tries to map to numeric value of factor level, causing similar issue.
We should add another internal call to convert metadata columns to characters if/when they are factors.
So the fix should contain two steps: 1. convert from factor to string then 2. replace NA values with β€œNA”

from gamblr.viz.

rdmorin avatar rdmorin commented on September 27, 2024

I think there is a related issue here that should be resolved. Have those standard columns in the metadata (e.g. pathology) always been set as factors or is this a recent change?

from gamblr.viz.

Kdreval avatar Kdreval commented on September 27, 2024

I think I got the idea of what is going on

from gamblr.viz.

Kdreval avatar Kdreval commented on September 27, 2024

In the recent update that I made to get rid of colors in the annotation colors that are displayed when no values for them are present in the metadata (PR #36, issue #35) I did not account for the metadata columns that had been passed to the prettyOncoplot as factors. This resulted in a bug that during subsetting of the colors list, the NA values were not properly handled, which generated this issue.
There was already a call that was converting factors to the characters, but it was done during subsetting for the remaining colors, and to fix the reported issue I have moved this call to occur prior to the color subsetting. Now the example works properly and can handle the sex column that is passed as factor. Here is the sample plot:
image

from gamblr.viz.

Kdreval avatar Kdreval commented on September 27, 2024

This is fixed in PR #44

from gamblr.viz.

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.