Tuesday, January 24, 2012

First worked tableviewer example

Follow this Link. you should be able to create the picture below.

Note: In windows, there is no cat command, use 'more' instead. Pipe operator still applies in windows. 

A modified tutorial for Windows 7/Vista; first you need to call up strawberry perl terminal and navigate to tableviewer directory

first, create a 3x3 table (use a random seed so that this step is reproducible)
> perl bin\make-table -row 3 -seed 123 -brief > samples\table-basic.txt
# let's see the table
> more samples\table-basic.txt
 lbl    A    B    C
   A  262  209  168
   B   28   86   45
   C   58   95   69
# now parse the table
> more samples\table-basic.txt | bin\parse-table > tmp.txt
# now create configuration and data files
> more tmp.txt | bin\make-conf -dir data
# let's see what was created
> dir data/
 Directory of c:\circos-0.55\tools\tableviewer\data

01/24/2012  10:35 PM    <DIR>          .
01/24/2012  10:35 PM    <DIR>          ..
01/24/2012  10:35 PM               255 all.txt
01/24/2012  10:35 PM               261 cap.col.txt
01/24/2012  10:35 PM               247 cap.row.txt
01/24/2012  10:35 PM               740 cells.txt
01/24/2012  10:35 PM               255 col.txt
01/24/2012  10:35 PM                62 colors.conf
01/24/2012  10:35 PM               598 colors_percentile.conf
01/24/2012  10:35 PM                72 karyotype.txt
01/24/2012  10:35 PM               249 row.txt
01/24/2012  10:35 PM                48 scaling.conf
01/24/2012  10:35 PM                33 segmentlabel.txt
              11 File(s)          2,820 bytes
               2 Dir(s)  20,571,529,216 bytes free
# now draw the image (circos.conf is already defined to use the data files from data/) (suppose you are still in 'tableviewer' directory
> perl ..\..\bin\circos -conf etc/circos.conf -outputfile table-basic.png

Friday, September 2, 2011

Install Circos on Windows

Circos is an excellent software to create nice visualization of your data (esp Genetic data,see below for examples).

To install Circos on your PC is not too straightfoward since it is written in Perl (which is not natively supported in Windows). So to get Circos running on your computer, you need
1) Download Circos (along with the tutorial,courses)  Current version: 0.55
2) Get a copy of Strawberry Perl and install on your computer
3) You need some extra modules to get Circos running. The required list of moduels in http://circos.ca/tutorials/lessons/configuration/perl_and_modules/ doesn't apply for Windows installation. I posted mine (Windows Vista+Fresh installation of Strawberry Perl),Some more mudules are required to run circos and use the tools

  • Config::General
  • List::MoreUtils
  • Math::Bezier
  • Math::Round
  • Math::VecStat
  • Params::Validate
  • Readonly
  • Regexp::Common
  • Set::IntSpan
  • Math::Random (required to use tableviewer::make-table tool)
  • Statistics::Descriptive (required to use tableviewer::parse-table tool)
  • Graphics::ColorObject
  • Color::LIbrary
  • Pod::Readme
  • Test::Pod
  • Test::Pod::Coverage
  • Test::Portability::Files
  • Tie::Sub

To install modules in perl, run
perl -MCPAN -e shell

then use
install [module name]
In order to test if your installation works. Download circos tool and decompress into circos installation directory (for example on my computer it is c:\circos-0.55\tools). Follow instructions on http://circos.ca/presentations/articles/vis_tables2/ see if you can create an image. Note: The instructions on that page doesn't apply to windows users. Add perl before each commonad in ourder to get perl scripts running. Alternatively, you can install Cygwin. But you need to put circos in the scope of Cygwin installation.