Tuesday, 9 September 2014

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....




Using BioJS in your own webpage

Go to github:

https://github.com/biojs/biojs

This has the library of components.

Download these by pressing the "Download ZIP" button.
Then unzip the library.

No this is NOT the right place!

To actually down load the libraries, you need to go here:
https://github.com/biojs/biojs/releases
N.B. This is a large file that contains all the dependencies for BioJS.
These in themselves are very large files!!!!

59.6 MB
so it contains a lot.


Another option:
Point to somewhere that the library is.

myFavouriteProtein

So, I am trying to link BioJS with bootstrap and write a tutorial that allows this.

I can successfully, put in the sequence module.

The ProteinPortafolio module gives structure but not the proper information.

Let's spend some time trouble shooting that.


Ok, so I tried to simplify.
Get rid of all the bootstrap stuff in case there was some kind of CSS conflicts.

Sadly, still no text.
Also, I think there is an error in the documentation which I have circumvented by including the

Biojs.Tooltip.js script. 

I am not sure why this work but without this script there is no structure. 

Let's try just the 3D structure file. 
Simplify!

Arghhh!
The only BioJS that I can really get to work is the Sequence module. 
Why is this?

Need to try again from a different direction.