Comments (37)
Hi Fadhl,
If you are running the Jupyter server on the HPC and then accessing the widget through visiting the Jupyter client on your personal computer, can you try the following:
- install the
jupyter-server-proxy
package - set the
proxy=True
flag when you run the widget methodvw=vc.widget(proxy=True) vw
from vitessce-python.
Thank you, @keller-mark
I tried it but does not work.
I also added 8002 as a tunnel port in puTTy. but still get the same.
I think there is something wrong. Could you help?
from vitessce-python.
is it because:
Error displaying widget model not found
from vitessce-python.
I apologize, I think our documentation is missing a step for bundling the JavaScript file for the widget. Can you try:
cd js
npm install
npm run build
cd ../docs/notebooks
jupyter labextension install ../../js
from vitessce-python.
thank you,
npm instatll gave me many warrnings
BTW I installed nodeJs by
conda install -c conda-forge nodejs
from vitessce-python.
@keller-mark any help is appreciated
from vitessce-python.
@FADHLyemen What version of node
and/or npm
do you have? Could you provide that debug log file (or a more complete error) - hard to tell what's going on since the screenshot is truncated. Thanks!
from vitessce-python.
@FADHLyemen I see you only have node 6. @keller-mark can correct me, but I believe you probably need node 14
from vitessce-python.
See https://github.com/vitessce/vitessce-python/blob/master/.github/workflows/test.yml for how we set up an example environment in our CI workflow
from vitessce-python.
Thank you @ilan-gold. Yes, I would also check that you have NodeJS version 14. We should note this in the development section of the README, or point users to the JS repo's README for that step.
Also, I just made this pull request #89 which allows using the vitessce.io web app in place of the Jupyter widget, in case you are interested. That would avoid the need to build the JS files locally, (but opens Vitessce in a separate tab rather than embedded in the notebook).
from vitessce-python.
$ node -v
v13.13.0
BTW:
where is web_app_brain.ipynb to try?
sorry for this, I saw one of your team member presented at ISMB this tool:
http://avivator.gehlenborglab.org/?image_url=https://viv-demo.storage.googleapis.com/LuCa-7color_Scan1
can you do the same for Viteesce, so we only need to upload our h5ad file?
from vitessce-python.
@FADHLyemen For Vitessce, we only accept zarr
backed AnnData
so an h5ad
file would need to be converted via write_zarr
. We have considered building wrapper tools around AnnData
stores (similar to what Avivator does for OME) to make access easier than having to set up a view config, but for now it hasn't been something we've focused on.
from vitessce-python.
where is web_app_brain.ipynb to try?
That is in a PR currently #89 and will be merged eventually
from vitessce-python.
As for the node version, I would recommend upgrading. If you could provide that debug log file that NPM is pointing out (npm-debug.log
) it might also help us to debug with you.
from vitessce-python.
I installed nodejs 14, please see below
now I run it in jupyter notebook with option proxy =TRUE
However can not access
http://127.0.0.1:8000/
did I miss any thing?
from vitessce-python.
This is correct. There is no web page to see at the 127.0.0.1:8000 URL, it is just the hostname of the web server where the raw data is being served from.
Also, the http://127.0.0.1:8000/ URL is local to the HPC where the Jupyter server is running (rather than your local machine). I will make an issue to change the log message to make it clearer about the context of that URL for the remote/HPC use cases.
from vitessce-python.
you make it easy for me.
Here what I want to do. I want to put my h5ad file in amazon s3 and visualize the data using vitessce. I want to send our collaborator a link so they can visualize the data without installing any thing at their end. is this an option in current version of vitessce? could you direct me to do it correctly
thank you
from vitessce-python.
@FADHLyemen Yes that is very doable. We have a notebook for doing just that, which starts with an h5ad
file (that you download, so you may simply substitute your own), and then proceeds to set up the vitessce view configuration for it and upload to amazon s3.
from vitessce-python.
Please see these instructions to make sure that your AWS S3 bucket permissions allow accessing the data on the web http://beta.vitessce.io/docs/data-hosting/index.html#aws-s3
from vitessce-python.
Thank you, how to get the VITESSCE_S3_ACCESS_KEY_ID.txt
and VITESSCE_S3_SECRET_ACCESS_KEY.txt
from vitessce-python.
I got it,
https://supsystic.com/documentation/id-secret-access-key-amazon-s3/
from vitessce-python.
I still get some error, I appreciate your help
from vitessce-python.
You can replace the entire part after the equals sign with the string.
like this:
s3 = boto3.resource(
service_name="s3",
aws_access_key_id="my_access_key_id",
aws_secret_access_key="my_secret_access_key"
)
from vitessce-python.
when I run
config_dict = vc.export(to='S3', s3=s3, bucket_name='kidneyscrnaseq')
I got below error:
boto3.exceptions.S3UploadFailedError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
I read this [solution]
and modify the bucket privacy to:
{
"Version": "2012-10-17",
"Id": "Policy12345",
"Statement": [
{
"Sid": "Stmt6789",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::kidneyscrnaseq/*"
}
]
}
it uploaded successfully.
now when I run webbrowser.open
the cell is busy for long time. I do not know which link to send to collaborator and how to open the link.
from vitessce-python.
The string contents of the "Out[7]" cell are the url you can copy, paste, share, and navigate into a web browser
from vitessce-python.
I just got this for long time, I do not know what is going on:
from vitessce-python.
from vitessce-python.
@keller-mark I am trying his URL but getting a 403. Please correct me if I'm wrong @keller-mark but I believe you @FADHLyemen need to add s3:ListBucket
to your bucket actions. I think we had someone else have this problem where they got 403 not 404 - I think the documentation has been updated but not redeployed.
from vitessce-python.
Also s3:GetObjectAcl
probably just to be safe....
from vitessce-python.
from vitessce-python.
Yes, sorry I thought it had been re-deployed.
https://github.com/vitessce/vitessce/blob/keller-mark/docs/docs/docs/data-hosting.md#bucket-policy
{
"Version": "2012-10-17",
"Id": "Policy12345",
"Statement": [
{
"Sid": "Stmt6789",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::foo-bar",
"arn:aws:s3:::foo-bar/*"
]
}
]
}
from vitessce-python.
@keller-mark if I did not include s3:PutObject" in action, I got access denied.
so below is my bucket policy
{
"Version": "2012-10-17",
"Id": "Policy12345",
"Statement": [
{
"Sid": "Stmt6789",
"Effect": "Allow",
"Principal": "",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:ListBucket",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::kidneyscrnaseq",
"arn:aws:s3:::kidneyscrnaseq/"
]
}
]
}
I rerun
s3 = boto3.resource(
service_name='s3',
aws_access_key_id='my code',
aws_secret_access_key='my secret code',
)
config_dict = vc.export(to='S3', s3=s3, bucket_name='kidneyscrnaseq')
vitessce_url = "http://vitessce.io/?url=data:," + quote_plus(json.dumps(config_dict))
vitessce_url is
which is still not working. did I miss any thing?
from vitessce-python.
In your view config, you have
"embeddingType": {
"A": "X_umap"
}
which should be
"embeddingType": {
"A": "UMAP"
}
because your anndata-cells
loader looks like:
{
"type": "cells",
"fileType": "anndata-cells.zarr",
"url": "https://kidneyscrnaseq.s3.amazonaws.com/A/0/anndata.zarr",
"options": {
"mappings": {
"UMAP": {
"key": "obsm/X_umap",
"dims": [
0,
1
]
}
}
}
}
i.e the mapping needs to match the embeddingType
.
It looks like this is a bug in our example that you followed. So replace
scatterplot = vc.add_view(dataset, cm.SCATTERPLOT, mapping="X_umap")
with
scatterplot = vc.add_view(dataset, cm.SCATTERPLOT, mapping="UMAP")
Once I fix that I am able to see your dataset - sorry about that!
from vitessce-python.
Wow, it works, thank you @keller-mark and @ilan-gold for your patience.
I have two things. first this is a very long link, any suggestion to short it? second, do you have example of vitessce with umap for scrna-seq and image. I can not find this in your example. how to connect the h5ad with the image coordinates. thank you again
from vitessce-python.
@FADHLyemen Yes it is completely possible. Perhaps you can open a discussion for this new issue and we can resolve the issue there - especially if you have any data to share, I'd be happy to create an example notebook as this seems to be an increasingly common request.
from vitessce-python.
As for the URL length, you can use a URL shorten-er like tinyurl
from vitessce-python.
In the meantime I am going to close this issue @FADHLyemen but please do open a discussion post!
from vitessce-python.
Related Issues (20)
- Convert spatialdata-plot plotting tree to Vitessce config
- Failed to load model class "Anymodel" HOT 2
- Publish a Vitessce notebook on Posit Connect HOT 11
- AnnDataWrapper - support for obsSpots, obsPoints, etc.
- OmeTiffWrapper - support coordinationValues and fileType: "image.ome-tiff"
- Minimal example for obsSegmentations.json for visualizing polygons in Spatial View HOT 2
- Adding scale bar to spatial view image
- ValueError: data too large for non-BigTIFF file HOT 4
- Additional improvements to adata_to_multivec_zarr function
- Add option for widget to communicate directly with Zarr store (no local HTTP server) HOT 2
- Bumping supported Anndata Version? HOT 1
- Support automatic instantiation of Wrapper objects HOT 2
- Support using JSX for writing plugin views
- Setting colors for obsSets? HOT 2
- Helper function to use adata.uns[obs_set_col + "_colors"] for initial obs set colors
- Notebooks environment.yml PackageNotFoundError for starlette==0.14.0
- Notebooks errors (list)
- Adding Vitessce widgets to a visualization dashboard HOT 1
- Define a plugin class/dataclass to couple on_config_change and anywidget.invoke handlers with plugin_esm
- Support writing plugin_esm using local file with anywidget FileContents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitessce-python.