Saturday, March 24, 2007

Food, a thought...

Guys I admit, I am feeling hungry! But I am stuck at a place where I do have internet but no food in sighting... so I got to cook myself and it better be something whose taste is alien to my buds otherwise it will be hard to swallow! So I decided I will check out which websites offering exotic recipes. I hit upon channels like http://www.kiplog.com/food/, http://cookingwithamy.blogspot.com/, http://www.foodblogblog.com/, http://www.foodportfolio.com/blog/, http://foodmuseum.typepad.com/, http://www.foodnetwork.com/, http://food.rediff.com/, http://www.asianfoodchannel.com/index.php, http://uktv.co.uk/index.cfm/uktv/Food.homepage/sid/566, http://www.foodtv.ca/, http://www.foodchannel.com.au/ and http://www.foodchannel.com/. But the one which really attracted me is http://www.ifood.tv/.
iFood.tv is like Youtube+Orkut+Google+FoodChannels rolled into one! It turns out to be the best one in the lot for several reasons. It is well designed; probably the only site which has kept young users in mind and it has got great videos! Look and feel is Web 2.0 with expanded shot on mouse-over, a class apart. Anyone can register and upload their recipe (youtube for food?). I liked browsing via the Featured-Blogs section and since the videos are rated by the user, I could easily guess which one to check out (keyword are really helpful)! The whole visual appeal is tempting, believe me, you guys will drool while browsing this channel. I am settling for Baked-Potato-with-Onions (http://www.ifood.tv/node/1794) as it sounds easy (?) and I am not aware of how it will taste!
clipped from www.ifood.tv
Welcome to ifood.tv, your food channel. Celebrate your love of food, share your culinary skills and food experiences through videos, recipes and blogs. Its all about food, family, friends and fun.
Latest Event The Culinary Arts Festival of India was held in New Delhi between 8-10th March. iFood.tv was there to cover the event. Watch this space for footage of some amazing food at the festival.
 powered by clipmarksblog it

Wednesday, January 03, 2007

Beginning Bioinformatics with MySQL, PHP, phpMyAdmin, PERL (for CGI) on IIS (Quick and Dirty Way!)

Beginning Bioinformatics with MySQL, PHP, phpMyAdmin, PERL (for CGI) on IIS (Quick and Dirty Way!) Guys I need to switch from FreeBSD to Windows for a while and thus I am trying to run MySQL with PHP on Windows IIS (Yes it is possible!).Here are the steps: 0. Make sure IIS is installed and working in your Windows machine. Otherwise follow the instruction. 1. Install MySQL and put the mysql-install-dir/bin/ in the Windows PATH Variable. Instruction available at php site . To test installation open command-prompt and type "telnet localhost 3306" [without quotes]. This should dump something like the following junk in the console: 7 5.0.14-nt#UpU;dh[n,?8i.CJ(&'1_m( Press ENTER and get rid of it, your MYSQL is working!If this fails, then you might need to start the service of mysql by tryping "net start mysql" [without quotes]. Then try telnet as earlier. Remember the password you have set up for the root login of mysql, we will need it in step3. 2. Install PHP in C:/PHP folder by downloading MSI from http://in.php.net/get/php-5.2.0-win32-installer.msi/from/www.php.net/mirror and then download http://in.php.net/get/php-5.2.0-Win32.zip/from/www.php.net/mirror and extract into the C:/php folder as well (Yes it will overwrite many files, let it do, because we need the files in EXT folder). Download and extract the dlls from http://in.php.net/get/pecl-5.2.0-Win32.zip/from/www.php.net/mirror in c:/php/ext if you plan to use those extra PHP Dll's (not needed for our job though).Make sure that C:/PHP/ext directory has the php_mysql.dll otherwise download this specific dll from http://dev.mysql.com/downloads/connector/php/ (Direct link) and extract the dll into C:/PHP/ext .Add PHP to PATH as explained in http://in.php.net/manual/en/faq.installation.php#faq.installation.addtopath . Now to test PHP installation create a file phpinfo.php inside the C:/Inetpub/wwwroot and type just the following one line and save:

Now open the browser and type http://localhost/phpinfo.php and you should see the PHP Version and other details about your PHP Installation. Enjoy :) 3. Now to manage MySQL, there is a cool tool called phpMyAdmin which can be downloaded from this link. You need to extract this in a folder. For me it is C:/phpMyAdmin.Now you need to do certain tweaks to make it work.Create a file config.inc.php inside the C:/phpMyAdmin and type the following: Save the config.inc.php file. Now open the C:/WINDOWS/php.ini file and search for

"extension_dir ". Replace the line with: extension_dir = "C:/PHP/ext/" Also uncomment the line saying extension=php_mysql.dll in the C:/WINDOWS/php.ini . Now save the C:/WINDOWS/php.ini file. You need to give 'web share' access to C:/phpMyAdmin directory by opening it in explorer and right-click on the C:/phpMyAdmin directory and go to 'properties' now in the pop-up window go to 'web-sharing' tab and select the share-this-folder radio button and this will pop-up (I know it is windows and this sounds like pop-up-video of VH1). Write phpMyAdmin in the ALIAS Text Box of pop-up and select on WRITE and SCRIPT SOURCE ACCESS box. In APPLICATION PERMISSION choose SCRIPTS radio button. To test phpMyAdmin open http://localhost/phpMyAdmin/index.php in browser and you should see "localhost phpMyAdmin - 2.9.1.1". You are done with this now :) 4. For PERL. you need http://www.activestate.com/store/activeperl/download anyways, so click and download it first. Install this in C:/PERL directory then use the instruction at http://www.visualwin.com/Perl/ . To test the PERL - CGI installation, create a file called test.pl inside the directory C:\Inetpub\wwwroot\cgi-bin and type: #!/usr/bin/perl $time=time; $len=80; print "Content-type:text/html\n\n"; @base=qw/A T G C/; print ">Seq$time $len random bases\n"; while($c<$len){ $c++; print "@base[int(rand(4))]"; } Now save the test.pl in C:\Inetpub\wwwroot\cgi-bin. Open the link http://localhost/cgi-bin/test.pl in browser, this should generate a random DNA Fasta file of 80 bases.

In the next tutorial I will lead you into creating a bioinformatics database of sequences and then using it to align using muscle and store back in MySQL db... till then bye!

Friday, December 29, 2006

Code to get GenBank file using Bioperl

#!/usr/local/bin/perl -w # Modified by sharma.animesh@gmail.com using # "How to retrieve GenBank entries over the Web" # by Jason Stajich # Downloads E. dispar WGS sequence from
# AANV01000001:AANV01018095 # and invadens: AANW01000001:AANW01015173 # Just for Info:
# Histolytica: AAFB01000001:AAFB01001819 # Avoiding get_Stream_by_batch so that
# individual file can be written use Bio::DB::GenBank; use Bio::SeqIO; use strict; #for dispar getGB(1,18095,"AANV010"); #for invadens getGB(1,15173,"AANW010"); sub getGB{ my $start=shift; my $end=shift; my $common=shift;
for(my $c=start;$c<=$end;$c++){
$c=sprintf('%05d', $c); my $accession_no=$common.$c; my $fname=$accession_no.".gbk"; print "Writing $fname\t"; my $seqout = new Bio::SeqIO( -file => ">$fname", -format=>'GenBank');
my $getseq = new Bio::DB::GenBank;
my $seq = $getseq->get_Seq_by_acc($accession_no);
$seqout->write_seq($seq);
} }

Thursday, May 11, 2006

Song Ik Onkar from Rang De Basanti ( http://www.geocities.com/drinsilence/IkOnkar.mp3 ) Simply amazing... you can feel the words creating a matrix around you... Music: A R Rehman Vocals: Harshdeep Kaur ek onkar satnam kartapurakh nirmoh nirvair akaal murat ajuni sabham guru parsad jap aad sach jugaad sach hai bhi sach nanak hose bhi sach soche soch na ho wai jo sochi lakh waar chhupe chhup na howai je laai har lakhtaar ukhiya pukh na utari je banna puriya paar sahasyanpa lakh woh hai ta ek na chale naal ke ve sach yaara hoi ae ke ve kude tutte paal hukum rajai chalna nanak likheya naal Hope you enjoyed :)

Thursday, April 20, 2006

Life is a highway... a thought

Life is a highway... a thought for a Game! The title reminds me of Tom Cochran's song "Life Is A Highway ..." and Bhagwat Gita Verse 2.22: Vasansi jeernani yatha vihaya navani grunhati naroparani, Tatha shareerani vihaya jeeranyanyani sanyati navani dehi. which essentially means "As a person puts on new garments, giving up old ones, the soul similarly accepts new material bodies, giving up the old and useless ones" [Taken from Srila Prabhupada's GITA translation]. I have a weird idea for a game, I have been thinking this quite often, making a game, Life is like a highway, with Soul being the Traveller in time, Body being the carrier, several distractions with their sign boards and exits (Like millions of McDonald's sign and the exits to them on US highways!). The journey starts with soul coming out of the super-soul due to its Karm vector changing its score from NULL to NOT NULL (Discussed below). The highway it has to go through is also based on Karm vector (Like say, the super-soul reads the Karm verctor and decides that the soul has to ride Highway 911!). The purpose is to reach back the super-soul (but you are not allowed to travel backwards, it is a one way road!). There are various short cuts (Like various Yog [Karm, Gyaan, Raaj, Bhakti]) and long cuts (the distraction exit, some of them just prolong the length and some of them take you on a circle!). While you are on the way, based on your behavior (with other travelers [material and non-material] and yourself) your Karm points go up (Good behavious) or down (Bad behaviour) on various dimensions (Karm score is a multidimensional vector, so the counter of specific Karm increments). You can reduce the time of journey by either Moving FAST (Better tools of journey eg, making the mind and body efficient) and/or Taking SHORTCUTS and/or Avoiding LONG-CUTS. The body and other material things might time-out but you will again get a new body based on your latest Karm vector. By the time you reach the Final Destination, your Karm vector should be a null vector too, to get in union with Super-soul, the time when your game ENDS. I have avoided the complication of having Enemies... I feel the LONG CUTS are enemies anyways! I wish I could do some game programming too... like the way GOD does... Lets see what is humanly possible first... I guess everything is possible though!