This guide will show you how to install JupyterLab Extension. You can use these extensions to customize the JupyterLab UI.
Steps to Install
-
Go to the Commands (Ctrl+Shift+C) -> Extension Manager -> Enable Extension Manager in the left panel.
Figure 1 - Enable Extension Manager
-
It will show you the prompt asking for confirmation, click on Enable.
Figure 2 - Enable Extension Manager Prompt
-
Now you would be able to see Extension Manager option in the left panel. Once you go to the Extension Manager, you could search for an extension and install it. For the example purpose, we are going to install
@jupyterlab/fasta-extension
.Figure 3 - Search For An Extension
-
Once extension is installed, open Terminal and run following command:
jupyter lab build --minimize=False --dev-build=False
-
After successful build, refresh the page. Now you are ready to use the extension.
Example Notebook
In the following example, you will use a newly installed extension.
Open a Python Notebook
and put the following in a code cell:
from IPython.display import display
def Fasta(data=''):
bundle = {}
bundle['application/vnd.fasta.fasta'] = data
bundle['text/plain'] = data
display(bundle, raw=True)
Fasta(""">SEQUENCE_1
MTEITAAMVKELRESTGAGMMDCKNALSETNGDFDKAVQLLREKGLGKAAKKADRLAAEG
LVSVKVSDDFTIAAMRPSYLSYEDLDMTFVENEYKALVAELEKENEERRRLKDPNKPEHK
IPQFASRKQLSDAILKEAEEKIKEELKAQGKPEKIWDNIIPGKMNSFIADNSQLDSKLTL
MGQFYVMDDKKTVEQVIAEKEKEFGGKIKIVEFICFEVGEGLEKKTEDFAAEVAAQL
>SEQUENCE_2
SATVSEINSETDFVAKNDQFIALTKDTTAHIQSNSLQSVEELHSSTINGVKFEEYLKSQI
ATIGENLVVRRFATLKAGANGVVNGYIHTNGRVGVVIAAACDSAEVASKSRDLLRQICMH""")
Expected output would be: