Tuesday, June 22, 2010

Install :: Treeview

Download
http://darwin.zoology.gla.ac.uk/~rpage/treeviewx/download.html

$ wget http://darwin.zoology.gla.ac.uk/%7Erpage/treeviewx/download/0.5/tv-0.5.1.tar.gz
$ tar zxvf tv-0.5.1.tar.gz
$ cd tv-0.5.1/
$ ./configure

I got an error
configure: error: "Could not find wx-config: is wxWindows installed?"

$ sudo apt-get install libwxgtk2.6-0 libwxgtk2.6-dev libwxgtk2.8-0 libwxgtk2.8-dev
$ ./configure
$ make

Still having problems
charactersblock.cpp: In member function ‘char CharactersBlock::GetState(int, int, int)’:
charactersblock.cpp:1048: error: ‘strlen’ was not declared in this scope
charactersblock.cpp: In member function ‘int CharactersBlock::IsInSymbols(char)’:
charactersblock.cpp:1286: error: ‘strlen’ was not declared in this scope
charactersblock.cpp: In member function ‘virtual void CharactersBlock::HandleFormat(NexusToken&)’:
charactersblock.cpp:1900: error: ‘strcpy’ was not declared in this scope
charactersblock.cpp: In member function ‘int CharactersBlock::PositionInSymbols(char)’:
charactersblock.cpp:3029: error: ‘strlen’ was not declared in this scope
charactersblock.cpp: In member function ‘virtual void CharactersBlock::Report(std::ostream&)’:
charactersblock.cpp:3271: warning: deprecated conversion from string constant to ‘char*’
charactersblock.cpp: In member function ‘void CharactersBlock::ResetSymbols()’:
charactersblock.cpp:3345: error: ‘strcpy’ was not declared in this scope
charactersblock.cpp: In member function ‘void CharactersBlock::WriteStates(DiscreteDatum&, char*, int)’:
charactersblock.cpp:3609: error: ‘strlen’ was not declared in this scope
make[2]: *** [charactersblock.o] Error 1
make[2]: Leaving directory `/home/krevanna/Desktop/tv-0.5.1/ncl-2.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/krevanna/Desktop/tv-0.5.1/ncl-2.0'
make: *** [all-recursive] Error 1


Alternative, get the DRAWTREE program
Download from http://www.daimi.au.dk/~mailund/drawtree.html

$ wget http://www.daimi.au.dk/~mailund/drawtree/drawtree-0.1.3.tar.gz
$ tar zxvf drawtree-0.1.3.tar.gz
$ cd drawtree-0.1.3/
$ drawtree.py -b < ../idealSeqs.AAG.phy.dnadist.neighbor.outtree > mytree.eps


Sunday, June 6, 2010

RORails :: Stylesheet

I had a problem with the CSS Stylesheet

Order of events
- file style.css created 
- file is saved in public/stylesheets/ folder
- below line included in layout page.
 <%= stylesheet_link_tag "style", :media => "all" %>
- It worked first time, but then when i refresh the page, 
the error was something like this,

=============================
ERROR NoMethodError: private method `gsub!' called for #
    /usr/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'
    /usr/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'
    /home/krevanna/Public/MBAP/vendor/rails/railties/lib/webrick_server.rb:94:in `handle_file'
    /home/krevanna/Public/MBAP/vendor/rails/railties/lib/webrick_server.rb:73:in `service'
    /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
    /home/krevanna/Public/MBAP/vendor/rails/railties/lib/webrick_server.rb:60:in `dispatch'
    /home/krevanna/Public/MBAP/vendor/rails/railties/lib/commands/servers/webrick.rb:66
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /home/krevanna/Public/MBAP/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    /home/krevanna/Public/MBAP/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /home/krevanna/Public/MBAP/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    /home/krevanna/Public/MBAP/vendor/rails/railties/lib/commands/server.rb:49
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    script/server:3
127.0.0.1 - - [06/Jun/2010:12:57:41 CDT] "GET /stylesheets/style.css?1275762019 HTTP/1.1" 500 343
Referer -> /stylesheets/style.css?1275762019
=================================

- This totally takes of the css from the page.
- there is this number associated after the style.css page i am not sure why is this, and what it means
- I tried changing the setting with the cache, but didnt work
- i am still not sure whats causing this problem.

I think it was something to do with WebBrick, so i changed the server gem to mongrel
$ sudo gem install mongrel
$ ruby script/server mongrel
- now it all worked good for me.

Friday, June 4, 2010

Install :: Phylip

Get the tar file from
http://evolution.genetics.washington.edu/phylip/getme.html

Steps
$ wget http://evolution.gs.washington.edu/phylip/download/phylip-3.69.tar.gz
$ tar zxvf phylip-3.69.tar.gz
$ cd phylip-3.69/src
$ make install

All the executables are in src folder.
To execute the programs.
$ ./cliqu
$ ./penny
$ ./protdist
$ ./seqboot
$ ./contrast
$ ./dnadist
$ ./dnapars
$ ./dolpenny
$ ./move
$ ./protpars
$ ./consense
$ ./dnainvar   
$ ./dnapenny
$ ./restdist
$ ./treedist
$ ./gendist
$ ./dnaml
$ ./neighbor
$ ./proml
$ ./restml
$ ./dnamlk
$ ./factor
$ ./mix
$ ./promlk
$ ./contml
$ ./pars
$ ./retree
$ ./fitch
$ ./dnacomp
$ ./dnamove
$ ./dolmove
$ ./kitsch