Open J-Yash opened 10 months ago
Hi @J-Yash
Can you try removing the data_type
parameter in the add_file
?
This is a minimal example of how the config would look as JSON
{
"name": "Codeluppi et al., Nature Methods 2018",
"description": "Spatial organization of the somatosensory cortex revealed by osmFISH",
"version": "1.0.15",
"initStrategy": "auto",
"datasets": [
{
"uid": "codeluppi",
"name": "Codeluppi",
"files": [
{
"fileType": "obsSegmentations.json",
"url": "https://s3.amazonaws.com/vitessce-data/0.0.33/main/codeluppi-2018/codeluppi_2018_nature_methods.cells.segmentations.json"
}
]
}
],
"coordinationSpace": {
"spatialSegmentationLayer": {
"A": {
"opacity": 1,
"radius": 0,
"visible": true,
"stroked": false
}
}
},
"layout": [
{
"component": "layerController",
"coordinationScopes": {
"spatialSegmentationLayer": "A"
},
"x": 0,
"y": 1,
"w": 2,
"h": 4
},
{
"component": "spatial",
"coordinationScopes": {
"spatialSegmentationLayer": "A"
},
"x": 2,
"y": 0,
"w": 4,
"h": 4
}
]
}
You may need to add the line
vc.link_views([spatial, lc], ["spatialSegmentationLayer"], [{ "opacity": 1, "radius": 0, "visible": True, "stroked": False }]
Awesome! That worked. Thanks for the quick response! On a separate note, is it also possible to set the color of the polygons to a specific color?
Hi, I'm trying to visualize polygons (given in a JSON file similar to the example at http://vitessce.io/docs/data-file-types/#obssegmentationsjson) in the Spatial view but am unable to do so. I get a blank screen in the widget (in Jupyter notebook) and get an error message in the status window ("Error while validating undefined.")
Here is the code I use to create this:
The obsSegmentations-example.json file has cell polygons defined based on the example in the documentation (the first link above):
Could you please provide a minimal example of how to use a JSON file to visualize the polygons?