Wednesday, 10 September 2014

Finding out more about BioJS workflows...

Key aspects of the work flow include:

testing - mocha

http://visionmedia.github.io/mocha/

Some interesting stuff here:
http://blog.codeship.io/2014/01/22/testing-frontend-javascript-code-using-mocha-chai-and-sinon.html



GULP (what is this?)

Tuesday, 9 September 2014

BioJS Edu....

So I made my first pull request on BioJS edu and it has been accepted.
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>

BioJS 101 tutorials

Headstart

So first thing is to write a very simple script with javascript.

This can then be run by node so long as you are in the correct folder.



Package basics

Important point:
For BioJS 2 components, we have following naming conventions:
biojs-[io/rest/vis/algo/…]-[name]
  • Use io for components which are responsible for parsing data into a specific format (aka parser)
  • Use vis for components which are visualizing data sets
  • Use rest for REST apis to databases
  • Use algo for server/client side algorithms processing the data (e.g. alignments, neural networks, markov models, graph algorithms)

require is a special function provided by node.js

package.json
   this seems to contain the key information about the package.

npm

npm
stands for node packaged modules.

But what does it really mean?

According to Wikipedia:
npm (Node Packaged Modules) is the official package manager for Node.js.

Brew, git and node.js AND my first pull request...

So these are three packages that are worth having on your mac to do software development.

Homebrew, git and node.js are three packages that are worth having on your Mac if you want to do software development.
Homebrew is called the 'missing package manager for OS X'. It allows you to download packages onto your Mac from your command line.
Git is a version control system that will keep track of the changes you have made in code.
Node.js is an 'asynchronous event driven framework'.

So, I have made my first pull request to a tutorial. 
I hope I have done it correctly and I am pretty happy about it so far!!

Using Git in Aptana

So, you need to choose the 'App Explorer' to find the Git settings in Aptana.
Once you do this, you find the 'Stage' and 'Commit' Buttons.



Monday, 8 September 2014

BioJS again...

Getting started from

http://edu.biojs.net/series/101/20_getting_started.html#mac

installing npm

What is this again?
Let's find out...

Wikipedia: http://en.wikipedia.org/wiki/Npm_(software)
npm stands for Node Packaged Modules

It's for downloading software onto your computer


Arghh trying to update the page too and find a way to make it work.

Fork into github.
Then trying to import this into Aptana.

Import...
    Git repository as new project...
        Use URI....