Last updated
Was this helpful?
Last updated
Was this helpful?
DXJupyterLab is accessible to all users of the UK Biobank Research Analysis Platform and the Our Future Health Trusted Research Environment.
A license is required to access DXJupyterLab on the DNAnexus Platform. for more information.
First, launch DXJupyterLab in the project of your choice, as described in the guide.
Once your JupyterLab session is running, click on the DNAnexus
tab on the left sidebar to see all the files and folders in the project.
To create a new empty notebook in the DNAnexus project, select DNAnexus
> New Notebook
from the top menu.
An untitled ipynb
file will be created and viewable in the DNAnexus project browser, which refreshes every few seconds.
You can rename your file by right-clicking on its name and selecting Rename
.
You can open and edit the newly created notebook directly from the project (accessible from the DNAnexus
tab in the left sidebar). To save your changes, simply hit Ctrl/Command + S
or click on the save
icon in the Toolbar (an area just below the tab bar at the top). A new notebook version will land in the project, and you should see in the "Last modified" column that the file was created recently.
Since DNAnexus files are immutable, whenever you save the notebook, the current version is uploaded to the project and replaces the previous version, i.e. the file of the same name. The previous version is moved to the .Notebook_archive
with a timestamp suffix added to its name. Saving notebooks directly in the project as new files ensures that your analyses won't be lost when the DXJupyterLab session ends.
To process your data in the notebook, the data must be available in the execution environment (as is the case with any DNAnexus app).
You can for your notebook using dx download
in a notebook cell:
You can also use the to execute the dx
command.
If your notebook generates any data you'd like to keep, you should before the session ends, i.e. before the worker in which the JupyterLab runs is terminated. You can do it directly in the notebook by running dx upload
from a notebook cell or from the terminal:
If you create a notebook from the Launcher or from the top menu (File
> New
> Notebook
), the notebook will not be created in the project but in the . In order to move it to the project, you will have to upload it to the project manually. Make sure you upload your local notebooks to the project before the session expires, or , so as not to lose your work.
Check the guide for tips on the most useful operations and features in the DNAnexus JupyterLab.
In this tutorial, you will learn how to create and run a notebook in JupyterLab on the platform, download data from the notebook, and upload results to the platform.