-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Things left for the Python package #98
Comments
@manzt Can you suggeset a way to enable the Python package to visualize individual views of Chromoscope? My thought was that (1) we can publish a JS library that exposes several Gosling spec template functions (e.g., |
You shouldn't need to publish a second package. You could easily create an HTML template and inline the JavaScript like in Gos and write the spec directly: _HTML_TEMPLATE = jinja2.Template("""
<div id="{{ output_id }"></div>
<script type="application/javascript">// load gosling</script>
<script>
const templateType = "{{ template_type }}";
let templateFn;
if (templateType === "sv") {
templateFn = ...
} else if (templateType == "overview") {
templateFn = ...
}
const spec = templateFn(JSON.parse(({{ config_json }}));
gosling.embed(document.getElementById("#{{ output_id }}", spec);
</script>
""")
html = _HTML_TEMPLATE.render(
output_id=uuid.uuid4().hex, # unique id for the page
template_type="sv",
config_json=json.dumps(config),
) |
|
Required
If Possible
chromoscope.overview()
)The text was updated successfully, but these errors were encountered: