Sunday, July 18, 2010

Git :: Install :: Setup

Install GUI
$ sudo apt-get install git-core gitk git-gui

URL: http://www.digitalmediaminute.com/article/3264/git-tutorial

To create a repository
$ cd testGit
$ git init

This is to setup the configuration to contain ur name and email
This will be used to give information on who committed
$ git config --global user.name "Kashi Revanna"
$ git config --global user.email "Kashi.Revanna@unt.edu"

So now create a file and a directory
$ touch file1
$ mkdir dir
$ git commit

Now to check git, open the file and enter a line
$ git diff
- will list the lines which are different from the ones in the repository

To add a file to the repository
$ touch file2
$ mkdir dir1
$ git add file2
$ git add dir1
$ git commit -m "Add files"

Observe the log files created
$ git log
$ git log -n3
$ git log --stat --summary
$ git log -p

For GUI,
$ gitk

Wednesday, July 14, 2010

R :: Install :: ClassComparison :: ClassDiscovery

Install R
$ sudo apt-get install r-base
$ sudo apt-get install r-base-dev r-base-core

Go to R
$ sudo R
> install.packages(repos="http://bioinformatics.mdanderson.org/OOMPA", dependencies=TRUE)
- ran into warnings and errors
- Error : package 'Biobase' could not be loaded
- Information to install biobase, http://www.bioconductor.org/packages/2.2/bioc/html/Biobase.html
> source("http://bioconductor.org/biocLite.R")
> biocLite("Biobase")
> install.packages(repos="http://bioinformatics.mdanderson.org/OOMPA", dependencies=TRUE)
- select ClassComparison
- you should get the following sentence
* DONE (ClassComparison)
check if the package is installed
> library('ClassComparison')
> install.packages(repos="http://bioinformatics.mdanderson.org/OOMPA", dependencies=TRUE)
- select ClassDiscovery
- Error : package 'mclust' could not be loaded
To install mclust
> install.packages("Rserve")
* Done (Rserve)

On unix:
$ wget http://bioconductor.org/packages/1.9/bioc/src/contrib/vsn_1.12.0.tar.gz
$ sudo R CMD INSTALL vsn_1.12.0.tar.gz
* Done (vsn)

Go to R
$ sudo R
> install.packages('mclust')
* Done (mclust)
> install.packages(repos="http://bioinformatics.mdanderson.org/OOMPA", dependencies=TRUE)
 * DONE (ClassDiscovery)

check installation
> library('ClassDiscovery')

Ubuntu :: Sort :: Numbers and Alphabets

$ sort -n characters
a
about
1
3
5
12
33
44

Friday, July 9, 2010

Install :: ClustalW :: Local

Download the ClustalW source code from 
ftp://ftp.ebi.ac.uk/pub/software/clustalw2/2.0.12/


$ wget ftp://ftp.ebi.ac.uk/pub/software/clustalw2/2.0.12/clustalw-2.0.12.tar.gz
$ tar zxvf clustalw-2.0.12.tar.gz 

$ cd clustalw-2.0.12
$ ./configure 
$ make
If you have sudo access, run 'make install', else use clustalw2 in the src directory.
$ cd src/
$ ./clustalw2

 **************************************************************
 ******** CLUSTAL 2.0.12 Multiple Sequence Alignments  ********
 **************************************************************


     1. Sequence Input From Disc
     2. Multiple Alignments
     3. Profile / Structure Alignments
     4. Phylogenetic trees

     S. Execute a system command
     H. HELP
     X. EXIT (leave program)


Your choice: X


Now run the clustalW

Wednesday, July 7, 2010

Ruby :: Pie :: SVG :: Graph

Download SVG from http://www.germane-software.com/software/SVG/SVG::Graph/

Place the SVG folder in the current folder
=====
require 'SVG/Graph/Pie'

fields = %w(Staphylococcus Corynebacterium Acinetobacter Propionibacterium Rothia Pseudomonas Leptotrichia Herbaspirillum Stenotrophomonas Streptococcus)

dataVal = [0.46494, 0.43779, 0.02067, 0.01934, 0.01081, 0.00155, 0.00109, 0.00105, 0.00027, 0.00014]

graph = SVG::Graph::Pie.new({:height => 400, :width => 800, :fields => fields })
graph.add_data({
    :data => dataVal,
    :title => 'TITLE',
})

graph.expanded = false
graph.expand_gap = 3
graph.show_data_labels = true
graph.show_key_data_labels = true
graph.show_percent = true
graph.show_shadow = false
graph.datapoint_font_size = 40

output = File.open('test1.svg', "w+")
output.write graph.burn()
output.close
=================================

The file should be written










Another method is to 
 $ sudo gem install gruff