I have been invited as part of the BioJS team so that's nice too.
I have spent most of the day trying to work out how to use the new BioJS 2.0 files in html pages.
Unfortunately, not with much success.
However, I have managed to get one to work at last!!
The file:
file:///Users/paulbrennan/Documents/Aptana%20Studio%203%20Workspace/biojs/index20140909.html
doesn't write any text to the screen but does write something to the console.
It loads up the script from
<script src="https://drone.io/github.com/greenify/biojs-io-fasta/files/build/biojs_io_fasta.min.js"></script>
and runs it in the script tag:
It pulls some code from in this way:
biojs.io.fasta.parse.read("http://dev.biojs-msa.org/v1/dummy/PF00072.fasta", function(seqs){ console.log(seqs); });
This is all fine as far as it goes but it's a bit artificial.
However, it does at least show that it works and that I can make it work in some naive format.
Full set of code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Paul Brennan">
<link rel="icon" href="../../favicon.ico">
<title>Playing with BioJS 2...</title>
<!-- load up the scripts -->
<script src="https://drone.io/github.com/greenify/biojs-io-fasta/files/build/biojs_io_fasta.min.js"></script>
<script>
biojs.io.fasta.parse.read("http://dev.biojs-msa.org/v1/dummy/PF00072.fasta", function(seqs){ console.log(seqs); });
</script>
</head>
<body>
</body>
No comments:
Post a Comment