QIIME2 on JupyterLab on CyVerse

Hi!

My name is Alyssa, I work for CyVerse and have recently updated our QIIME2 availability for our users.

Here is a QuickLaunch for our new QIIME2 app on JupyterLab with capabilities for in-line visualizations and access to the Artifact API (note: you'll need to create a free CyVerse account to access this). In the workspace you will find a Jupyter Notebook containing commands from the moving pictures tutorial and information on how to make the in-line visualizations work:

https://de.cyverse.org/de/?type=quick-launch&quick-launch-id=a02c1fa2-648b-4cb4-ae40-d5ca5c8cdbb6&app-id=2035c1ce-d031-11e9-a43f-008cfa5ae621

and documentation on using the app:

https://cyverse-jupyter-qiime2.readthedocs-hosted.com/en/latest/

I am hoping this makes QIIME2 more accessible for those who want to use it but don't necessarily have the computational resources or knowledge to make it happen.

-Alyssa

9 Likes

Hi Alyssa,

Thanks for sharing the much needed Jupyter notebook for running QIIME2 scripts. Do you have tutorial materials on how to set up and run the notebook locally?

Yanxian

2 Likes

Hi Yanxian,
Thanks for your question.

Here is the link to download the notebook locally:

http://datacommons.cyverse.org/browse/iplant/home/shared/iplantcollaborative/example_data/QIIME2-2019-7

In order to run this locally and have the inline visualizations work, you will need to open jupyter notebooks from a terminal that is already running qiime2. From the jupyter web interface, navigate to the notebook in your locally directory and it should work from there.

Please let me know if you need any help accessing the notebook.

-Alyssa

2 Likes

Great, thanks! I'll give it a shot and let you know how it goes.

Hi Alyssa, finally I got a chance to run the jupyter notebook you shared. I right-clicked the notebook and saved the link as QIIME2-2019-7-moving-pictures.ipynb. When I tried to launch the notebook from terminal, there was an error saying something like:

Unreadable Notebook: /path/FILENAME.ipynb NotJSONError("Notebook does not appear to be JSON: ''...",).

I googled the error. The possible cause seems to be not saving the notebook in a right format. When I tried to save the notebook by clicking the download button, I was redirected to a webpage with plain text. How should I download the jupyter notebook in a correct way?

Yanxian

2 Likes

Hi Yanxian, sorry for the late response. This issue seems to be on the cyverse side, I would contact them at contact them at support@cyverse.org and explain the issue.

Sorry I couldn't be of much help! they should be able to get the file for you.

Best,
Alyssa

2 Likes

This is great! :metal:

I was already planning to teach how to run :qiime2: via CyVerse for my microbiome class in the Spring. :man_teacher:

I'll plan on reaching out to you and the CyVerse team before then to work out logistics. I'd like to know the best way to set things up for my students.

-Mike

2 Likes

Just wondering if anyone has gotten past this error when launching the notebook locally:

Unreadable Notebook: /Users/sapers/Downloads/QIIME2-2019-7-moving-pictures.ipynb   NotJSONError('Notebook does not appear to be JSON: \'\\n<!DOCTYPE html>\\n<html lang="en" ng-a...',)

When trying to follow the workbook in a Jupyter notebook launched from a terminal also running qiime2, I was unable to use the in-line visualizations (after importing qiime2 and running other recommended import statements):

AttributeError: module 'qiime2' has no attribute 'Visualizations'

Import statements:

import qiime2
from qiime2.metadata.metadata import Metadata
from qiime2.metadata.metadata import CategoricalMetadataColumn
from qiime2.sdk import Artifact
from qiime2.sdk import PluginManager
from qiime2.sdk import Result

Thanks

Hi @hsapers - I am not involved in the development of CyVerse, but I am one of the lead developers of QIIME 2 - it looks to me like there is just a minor typo in the CV docs:

qiime2.Visualizations.load('demux.qzv')

should actually be

qiime2.Visualization.load('demux.qzv')

Are you able to make edits to the notebook or source you're running? If so, just drop the trailing s from the word Visualization.

:qiime2:

Thank you @thermokarst! Worked perfectly. I don't have access to the CyVerse notebook or source so I couldn't make corrections there, but I do have access to our local and server environments so I could make the required changes. I also had to (re?)install the following:

jupyter serverextension enable --py qiime2 --sys-prefix

Thanks!