Coder Social home page Coder Social logo

Comments (2)

Zulko avatar Zulko commented on June 8, 2024

Hey, there is no feature for a proper popup, sorry, however GraphicFeatures can have an "html" attribute which indicates what appears when you hover the feature in Bokeh (I don't use the Bokeh backend that much to be honnest).

from dnafeaturesviewer.

zchen15 avatar zchen15 commented on June 8, 2024

Hi Zulko, I am having the following issues with these lines of code

import dna_features_viewer as dfv
import bokeh
import bokeh.plotting
bokeh.io.output_notebook()

features = [
    dfv.GraphicFeature(
        start=5, end=20, strand=+1, color="#ffd700", label="Small feature"
    ),
    dfv.GraphicFeature(
        start=20,
        end=500,
        strand=+1,
        color="#ffcccc",
        label="Gene 1 with a very long name",
    ),
    dfv.GraphicFeature(
        start=400, end=700, strand=-1, color="#cffccc", label="Gene 2"
    ),
    dfv.GraphicFeature(
        start=600, end=900, strand=+1, color="#ccccff", label="Gene 3"
    )
]
for f in features:
    f.linecolor='green'
    f.box_color='orange' # box color is not being changed??
    f.label_link_color='#ccccff' # label link color is note being changed??

record = dfv.GraphicRecord(sequence_length=1000, features=features)
record.plot()

bokeh.plotting.show(out) # bokeh figure is not being output to notebook because it is formatted as html doc

First, the label_link_color and box_color do not seem to be changed even though I specify it in graphic features. This is particularly annoying when working with jupyter notebook dark theme as I cannot see the lines.

Second, the bokeh plot output is not being properly displayed. The error statement is saying this is some kind of html doc and not a bokeh figure handle.

I prefer to output bokeh plots to the notebook or as bokeh figure so I can add other glyphs or customized toolbars as needed. I can export this to html by myself in bokeh later if needed.

I am using dna_features_viewer 3.0.3

Please let me know if there is a sufficient work around for these issues!

Thank so for this plotting library

from dnafeaturesviewer.

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.