jupyterlab/jupyterlab-fasta

Name: jupyterlab-fasta

Owner: The Jupyter Attic

Owner: JupyterLab

Description: A JupyterLab Fasta viewer

Created: 2017-07-13 16:23:38.0

Updated: 2018-01-17 17:54:10.0

Pushed: 2017-10-25 12:35:29.0

Homepage:

Size: 620

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

This repo is deprecated. The Fasta viewer has been moved to https://github.com/jupyterlab/jupyter-renderers

JupyterLab Fasta Viewer

A JupyterLab extension for viewing Fasta information. A file renderer for files with .fasta extensions and a mime renderer for the application/vnd.fasta.fasta mimetype is included. This extension uses the MSA Fasta viewer.

Screenshot

To use the file viewer, right-click on a .fasta file and choose the Fasta viewer.

To use the notebook viewer, you can define a Fasta display class like:

 IPython.display import display
s Fasta:
def __init__(self, data):
    self.data = data
def _ipython_display_(self):
    bundle = {
        'application/vnd.fasta.fasta': self.data,
        'text/plain': self.data
    }
    display(bundle, raw=True)

and then display Fasta('some fasta data')

a(""">SEQUENCE_1
TAAMVKELRESTGAGMMDCKNALSETNGDFDKAVQLLREKGLGKAAKKADRLAAEG
KVSDDFTIAAMRPSYLSYEDLDMTFVENEYKALVAELEKENEERRRLKDPNKPEHK
ASRKQLSDAILKEAEEKIKEELKAQGKPEKIWDNIIPGKMNSFIADNSQLDSKLTL
YVMDDKKTVEQVIAEKEKEFGGKIKIVEFICFEVGEGLEKKTEDFAAEVAAQL
UENCE_2
SEINSETDFVAKNDQFIALTKDTTAHIQSNSLQSVEELHSSTINGVKFEEYLKSQI
ENLVVRRFATLKAGANGVVNGYIHTNGRVGVVIAAACDSAEVASKSRDLLRQICMH""")
Prerequisites
Installation

Clone this repo into a directory (say jupyterlab-fasta), and then do

ter labextension install ./jupyterlab-fasta
Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

install
ter labextension link .

To rebuild the package and the JupyterLab app:

run build
ter lab build

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.