JSFiddle - React, Tailwind, and code Playground
by ddtxra
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.js"></script>
<script src="https://cdn.rawgit.com/calipho-sib/nextprot-js/v0.0.23/dist/nextprot.min.js"></script>
<script src="https://cdn.rawgit.com/calipho-sib/sequence-viewer/master/dist/sequence-viewer.min.js"></script>
<body>
<div id="nx-overview" style="margin: 50px"></div>
<div id="seq1" style="margin: 50px"></div>
</body>
JavaScript
// Create an instance of nextprot client
var appName = "demo app for showing how to extract sequences"; //replace this with what your application is doing
var clientInfo = "calipho group at SIB"; //replace this with who you are
var nextprotClient = new Nextprot.Client(appName, clientInfo);
//Gets the protein overview
nextprotClient.getProteinSequence('NX_P01308').then(function(isoSequences){
//Shows sequence of the isoform 1
var seq1 = new Sequence(isoSequences[0].sequence);
seq1.render('#seq1');
});