Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hello there,

below is my code:

from vitessce import VitessceConfig, AnnDataWrapper, Component as cm
from urllib.parse import quote_plus
import json

zarr_path = r"D:\data\h5\adata_processed.zarr"

vc = VitessceConfig(schema_version="1.0.15", name='Habib et al', description='COVID-19 Healthy Donor Brain')
dataset = vc.add_dataset(name='Brain').add_object(
    AnnDataWrapper(
        adata_path=zarr_path,
        obs_embedding_paths=["obsm/X_umap"],
        obs_embedding_names=["UMAP"],
        obs_set_paths=["obs/leiden"],
        obs_set_names=["Leiden"],
        obs_feature_matrix_path="X",
        feature_filter_path="var/highly_variable",
        obs_locations_path="obsm/spatial"
    ))

# 创建 spatial 视图
spatial = vc.add_view(cm.SPATIAL, dataset=dataset, props={"cellRadius": 100, "fill": "Leiden", "fillOpacity": 1})


scatterplot = vc.add_view(cm.SCATTERPLOT, dataset=dataset, mapping="UMAP", props={"xAxisColumn": "0", "yAxisColumn": "1"})
cell_sets = vc.add_view(cm.OBS_SETS, dataset=dataset)
genes = vc.add_view(cm.FEATURE_LIST, dataset=dataset)
heatmap = vc.add_view(cm.HEATMAP, dataset=dataset)
vc.layout((scatterplot | (cell_sets / genes)) / heatmap)
vc.layout(
    (spatial | (scatterplot | (cell_sets / genes))) / heatmap
)
config_dict = vc.export(to='files', base_url='http://localhost:3000', out_dir='./test')
vitessce_url = "http://vitessce.io/?url=data:," + quote_plus(json.dumps(config_dict))
import webbrowser

webbrowser.open(vitessce_url)

I do not know why the "spatial" graph not showing up in the browser

You must be logged in to vote

Replies: 3 comments · 1 reply

Comment options

I dont even know how to debug this. Any help will be appreciated. Btw, Umap, heatmap and gene list are showing up. And when I hover on the heatmap or umap, I can see the coordinate line in the spatial plot. But the spatial plot is all black.
image

You must be logged in to vote
0 replies
Comment options

@keller-mark Hi there, please give me some tips when you have a moment.

You must be logged in to vote
1 reply
@keller-mark
Comment options

Hi, there is no spatial information specified within the adding-data part of the configuration. For example, you have not added an image file or specified spatial coordinates within the AnnData object

Comment options

@keller-mark hi there, I dont have the image file for now. I just wanna show the spatial info for now. I think this is possible because I saw this in the demo (the spatial plot in http://vitessce.io/#?dataset=eng-2019). Could you please tell me how to achieve that? I thought the spatial coordinate has been specified by obs_locations_path="obsm/spatial"

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.