Neurologically Paralyzing Mouseovers
Miss any of our Open RFC calls?Watch the recordings here! »

@jupyterlab/fasta-extension

2.0.0 • Public • Published

fasta-extension

A JupyterLab extension for rendering Fasta data. This extension uses the MSA Fasta viewer.

demo

Requirements

  • JupyterLab ^0.30.0
  • Node.js >= 5

Install

jupyter labextension install @jupyterlab/fasta-extension

Usage

To render fasta output in IPython:

from IPython.display import display
 
def Fasta(data=''):
    bundle = {}
    bundle['application/vnd.fasta.fasta'] = data
    bundle['text/plain'] = data
    display(bundleraw=True)
 
Fasta(""">SEQUENCE_1
MTEITAAMVKELRESTGAGMMDCKNALSETNGDFDKAVQLLREKGLGKAAKKADRLAAEG
LVSVKVSDDFTIAAMRPSYLSYEDLDMTFVENEYKALVAELEKENEERRRLKDPNKPEHK
IPQFASRKQLSDAILKEAEEKIKEELKAQGKPEKIWDNIIPGKMNSFIADNSQLDSKLTL
MGQFYVMDDKKTVEQVIAEKEKEFGGKIKIVEFICFEVGEGLEKKTEDFAAEVAAQL
>SEQUENCE_2
SATVSEINSETDFVAKNDQFIALTKDTTAHIQSNSLQSVEELHSSTINGVKFEEYLKSQI
ATIGENLVVRRFATLKAGANGVVNGYIHTNGRVGVVIAAACDSAEVASKSRDLLRQICMH""")

To render a .fasta file, simply open it.

Contributing

Install

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment 
git clone https://github.com/jupyterlab/jupyter-renderers.git
cd jupyter-renderers
# Install dependencies 
jlpm
# Build Typescript source 
jlpm build
# Link your development version of the extension with JupyterLab 
jupyter labextension link packages/fasta-extension
# Rebuild Typescript source after making changes 
jlpm build
# Rebuild JupyterLab after making any changes 
jupyter lab build

You can watch the jupyter-renderers directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.

# Run jupyterlab in watch mode in one terminal tab 
jupyter lab --watch
# Watch the jupyter-renderers directory in another terminal tab 
jlpm watch

Uninstall

jupyter labextension uninstall @jupyterlab/fasta-extension

Install

npm i @jupyterlab/fasta-extension

DownloadsWeekly Downloads

285

Version

2.0.0

License

BSD-3-Clause

Unpacked Size

16.7 kB

Total Files

8

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar