Posts

Showing posts from 2009

Abstraction

Image
Source: http://imgs.xkcd.com/comics/abstraction.png

Blizzard: modeling the climate change

Impressive and elegant new German supercomputer: Specifications: HPC Cluster ("blizzard") IBM p575 "Power6" cluster water cooled 16 dual core CPUs per node Total size: 264 nodes, 8448 cores 249 compute nodes 12 I/O nodes 3 interactive nodes 18,8 GigaFlops/core Total system peak performance: 158 TeraFlops/s Top500: Rank 27 in 06/09 20 TeraByte memory 3 PetaByte GPFS file system (additional 3 PetaByte in 2011) 8 x Qlogic 288 port 4 x DDR Infiniband switches bandwidth: 16 GigaByte/s node to node (bidirectional ) 25.4 km Infiniband cables http://www.dkrz.de/dkrz/about/hardware/HPC_Cluster But Blizzard is connected to the Data archive: HPSS: High Performance Storage System 6 Sun StorageTek SL8500 tape libraries 8 robots per library 10 000 media slots per library 73 tape drives total capacity: 60 PetaByte. 60.000 media (T10000 A/B, LTO4, 9940B and 9840C ) 500 TeraByte disk cache projected fill rate: 10 PetaByte/year bidirectional bandwidth: 3

Mac and HAL

An old commercial, Think different Dave ...

Size and capacity

Image
Source: Gizmodo / Curtiss Spontelli

Computer graphics in Star Wars (1977)

This is a video documentary about how one scene in Episode IV was prepared, the scene in particular is when the rebel pilots were planning how to attack the Death Star. The Commander showed them an animation of the Death Star and where to fire. Of course, this is 1976, no high end computer graphics cards exists yet, so Larry Cuba describe the steps in the 3D modeling based on photographs of the real miniature models. Check how he's controlling the rotation in real time (awesome) with big controls (no mouse neither exists). The final touch was to render each scene, shot by shot, in the computer screen with and automatic camera capturing in film. Via Topless Robot .

Updating nightmare

Before I must say, I have a laptop with dual boot, Mandriva in Dr. Jekyll and MS-Vista was Mr. Hyde. Yes, it was because two days ago I decided to update to the well recommended Win7. Few days ago I received a legal and nice DVD with the OS, the 64 bits version to upgrade Vista Home Premium. Then, I backup all my personal data. My laptop is an Acer Aspire 5520, AMD Athlon 64 x2, 2 GB RAM, 160 GB HD , Nvidia 7000M, since I have it, I never touch the disc partitions, because the disc was already divided into 3, one part for the Acer recovery tools (3 GB), 70 GB for Vista, and the rest I used for Mandriva (from 2007 to now 2010 versions). Everything works, well, of course Vista was slow and frustrating, I keep it because I share this computer and when I had time, I played games unsupported in Linux. After the bunnies convinced me to upgrade, I put the disc and upgrade to W7. Easy, after few clicks and 1 hr, W7 was installed. I rebooted the laptop, and waited for the final installat

The history of computing (video)

The next is nice and educational video about computer history and the future, I like the analogies with biological systems. Trillions from MAYAnMAYA on Vimeo .

Random lines in a text file

Sometimes I need to sample large data sets, so I randomly select some lines in the file. My files are generally text-records, one record by line, then I wrote this small script to do the task: #!/usr/bin/perl -w use strict; =head1 NAME selectRandomLines.pl =head1 DESCRIPTION Select random lines in a file. =cut $ARGV[2] or die "Usage: selectRandomLines.pl TOTAL_LINES_IN_FILE NUM_LINES_WANTED FILE_NAME\n"; my $total = shift @ARGV; # Total lines in the file my $want = shift @ARGV; # Total lines to select my $file = shift @ARGV; # The file my $line = 0; # Line counter my %select = randomSelect($total, $want); # Hash with selected lines open FILE, "$file" or die "cannot open $file\n"; while (<FILE>) { print "$_" if (defined $select{$line++}); } close FILE; =head1 SUBROUTINES randomSelect() CALL: randomSelect(TOTAL_ELEMENTS, TOTAL_WANTED) [NUM, NUM] RETURN: %s [HASH] =cut sub randomSelect { my $t = shift @_; my $n = shift

Error in DBI::SQLite

I was coding to query a SQLite database using Perl::DBI, I have a small code like this: #!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=db_file", "", "") or die "error in connection\n"; my $sth = $dbh->prepare($sql) or die "cannot prepare SQL\n"; $sth->execute(); while (my @data = $sth->fetchrow_array()) { #process data } $sth->finish; $dbh->disconnect; But, every time I execute this script I obtain this warning: closing dbh with active statement handles .... blah, blah, blah I double checked the code, the documentation and ran some debug examples, I obtained the expected result, so why this message? Finally, I found the solution in the PerlMonks website, the problem is a bad status return in the module when you use close() method, so the simple solution is to " undef $sth " at the end: $sth->finish; undef $sth; $dbh->disconnect;

Reading the DNA

Current DNA sequencing technologies are based on sequencing-by-synthesis or similar technics, where enzymatic reactions add one or more nucleic bases marked. But IBM is working in another way to know the composition of a DNA sequence, using nanotechnology and electronics to "read" base by base. No enzymes means faster and cheaper process. We're closer to the $1,000 genome ... Source: http://www.engadget.com/2009/10/08/ibms-ultra-cheap-dna-transistor-dream-could-lead-to-personalize/

R.O.B.O.T. Comics

Image
From the author of Ph.D. Comics via WillowGarage.com

Tron Tributes

The next video is a recompilation of Tron-like scenes in movies, music videos, tv commercials, even Tron on Ice, turn on the speakers because the video music if a Daft Punk (who else?) remix. I have the Tron screensaver in my Mac.

World twit "good morning"

Amazing video, please check the full details in their Vimeo page or in blog.blprnt.com . GoodMorning! Full Render #2 from blprnt on Vimeo .

Movie Time Travel

Image
Information is Beautiful created this image, amazing and mind-blowing: after admired it, please read the full description .

All begin with a Big Bang

The next video is a short explanation of how we think the Big Bang was. I prefer the Tolkien's version , an universe created with a symphonic music, and of course, I love " The Big Bang Theory " tv-serie.

Jackie Chan and antivirus software

This video almost convince me to buy and install a MS-Windows machine, Tron anyone?

Supported Features

Image
Image source: http://imgs.xkcd.com/comics/supported_features.png Who wants to watch a movie when you're crunching numbers (at least until = 42)?

MS + Yahoo!

Image
Source: http://www.denverpost.com/opinion/ci_12946782

Zero G

Last March, the Japanese astronaut Koichi Wakata joined the ISS, staying until few days ago. Besides his scientific task, he was doing a list of experiments for the people (selected in a contest), the list includes: 1. Calisthenics: Is it possible to follow an audio-guided workout program in zero gravity? 2. Backflips: On Earth, backflips take a lot of practice and leg strength. How about in zero gravity? 3. Volleying (soccer): Crumple a piece of paper into a ball and try kicking it around. How does the ball behave in zero gravity? Can you volley it? 4. Push-ups: In space, can you do push-ups while facing the ceiling or walls? 5. Cartwheels: In zero gravity, can you rotate yourself continuously like a windmill? 6. Swimming: Try to swim through the air as if you were in water. Can you move forward by swimming? If not, why not? 7. Spin like an ice skater: On Earth, ice skaters can increase their rotation speed by pulling their arms closer in to the body while they spin. Does the same th

One year on Mac

Image
I always admired Mac as computers, cool designs, functionality in the OS, *nix in the core, everything just works. Many years ago I wished to have my own Mac, unfortunately I never had the income to buy one (Mac are even more expensive in the third-world). Twelve months ago I started to use a Mac for my everyday coding/writing work. Before this, I used Linux principally for the same tasks, so the migration was painless. My Mac is a iMac with a nice large screen (I love it!), 2GB RAM, 300 GB HD, Intel Core 2 Duo, very stylish. The exception in the design is the damn mouse, why one button? Many applications require the missing button, forcing to use the Control key, besides the scroll button is failing and failing. When I find a nice and cheap white 3-button mouse I change it. Put the terminal in the bar as access was the first thing I did, I discovered that is a common pattern for coding people like me. I was not impressed with the desktop effects, after being a regular user of Compiz/

Analog random number generator

Image
With my new projects I had to use -and abuse- of (pseudo)random generators. I remember my first classes of statistics when the teacher used simple examples of probabilistic events with coins or dices. After going serious in random generations, you can see a lot of research in this area. From computer algorithms to real probabilities, random is anywhere (specially in data validation, a common task in this new age high throughput biology). The problem with random generators is you can never be sure is totally random, then some approaches use less sophisticated but effective random generators like this: In this case, is a special machine for a games company named GamesByEmail.com, as you see, they automatically roll dices and take a picture, then a computer process the image and return the numbers. I must confess, I have a 8-Magic-Ball (Eragon edition) in my desk to answer the important questions in my life.

Hi, real human interface

I like more the concept of a mouse inside the CPU, but this is a great video: Hi from Multitouch Barcelona on Vimeo .

Installing Mandriva 2009.1 in the EeePC 1000H

Image
Finally I have a netbook, the Asus EeePC 1000HA, a nice mini-laptop in white pearl. The hardware specifications are: Intel Atom 1.6GHz processor 160GB 5400 RPM Hard Drive 1GB of DDR2 RAM (667MHz) 10” WSVGA LED-Backlit 1024 x 600 LCD Ports: 3 USB 2.0, 1 VGA monitor out, headphone jack, microphone input, SD card reader (SDHC compatible), lock slot, Ethernet 10/100 Webcam (1.3 MP) Speakers and microphone built-in Battery: 7.4v 6600mAh 6-cell battery (3.5 - 7 hrs) Wireless: 802.11b/g Size: 25 cm (W) x 19 cm (D) x 3 cm (H) Weight: less than 1.5 kg The worst part is the SO, I don't understand why this model is exclusively sold with the almost-dead XP, so I installed the latest Mandriva release. Because this system require an external drive to boot an installer, I download the image for the official mirrors (inside /MandrivaLinux/official/2009.0/i586/install/images/ ) named all.img , this is a prepared image to copy in a USB drive and includes a boot-loader and the basic tools for a net

The biggest cults in tech

Infoworld reveals the biggest cults in tech : The Way of the Palm Established: 1996 Gathering of the tribes: The Palm Forums Major deities: Jeff Hawkins, Donna Dubinsky Sacred relics: Pilot 1000 and Pilot 5000 Mantra: The Pre will set us free Brotherhood of the Ruby Established: 1994 Gathering of the tribes: RailsConf , RubyConf Major deities: Matz , DHH Mantra: MINSWAN ( Matz is nice, so we are nice) The Ubuntu tribe Established: 2004 Gathering of the tribes: Ubuntu Developer Summits Major deity: Linus Torvalds Minor deity: Mark Shuttleworth Animal spirit guides: Breezy badgers, dapper drakes, feisty fawns, gutsy gibbons, hardy herons, intrepid ibexes, jaunty jackalopes The Commodorians Established: 1982 Gathering of the tribes: CommVEx , C4 Expo , World of Commodore Major deity: Jack Tramiel Minor deity: Jim Butterfield (1936-2007) Sacred relic: Commodore C65 The Order of the Lisp Established: 1958 Gathering of the tribes: International Lisp Conference Major deity: John McCar

Swine flu

The world is in a critical time now, the swine flu is spreading fast, the biggest impact is my loved country Mexico, reporting thousand of cases and more than 150 deceases . Other countries have been reported positive cases around the globe. Many things isn't clear, are the numbers real?, when did exactly this started?, why is this virus so different?, why are the cases in Mexico lethals ? A good review of the situation is in the Germán's Blog , he is a graduate student of the UNAM in the faculty of biomedics . (My apologizes, it's is in Spanish and I don't want to translate). By the moment, you can watch the spread with this Google Maps Mash-up: View H1N1 Swine Flu in a larger map Remember, the best prevention is the hygiene and medial attention as soon as you feel bad.

GeneTitan video

Yes, it's a not so good commercial, it shows the new Affymetrix GeneTitan with toys!

Scary Email

Image
Just imagine when the spam arrives ... Image from: http://i.gizmodo.com/5220568/holy-crap-email-was-scary-in-the-1970s

Real science on TV

Image
Image from: http://www.phdcomics.com/comics/archive/phd040609s.gif I admit, some times I'm watching a TV shows and put a smile in my face when I catch some big mistakes in the scientific/ technical plot. Anyway I'm a fan of science fiction series.

Bigger tiny memory

Image
Today I had received my new pendrive , I found it few days ago surfing in tech-news sites. It's amazing how technology decreases the size and increases the performance , for example I compare my old pendrive with the new: As you see, the old drive is bigger as a finger, and the new one is half of this size, but with 32X more storage capacity and faster. The bad thing is I received it inside a big letter-bubble-envelope for this, I understand package protection but the size of the envelope is ridiculous. The good thing is the price, as much as a movie ticket. Besides my Dropbox account, some times I need a bigger drive to move my data, I'm not the typical guy with Gigas of music, movies or pictures, when you work with large biological data as genomes, you never have enough space in your drive. Now my workstation is processing 70 Gb in images, I'm using a random sampling inside the images to reduce the computer time. My kingdom for a personal supercomputer!

We're Linux video contest

The Linux Foundation launched the video contests for a "We're Linux", last day they announced the finalists , but I like this one (probably because my biological background): I hope this wins. Update : Origin is second place, the winner is http://video.linuxfoundation.org/video/1106

Green Supercomputing

Image
There are 3 big problems when you want a supercomputer (besides the cost, of course), the first one is the space, a cheap and common approximation is to use a cluster design which you wire, as many as you can, independent computers. So you need to reserve an adequate space for the equipment, if you're not using servers racks, the space is a problem. The second problem is the calorific power generated by the computers, a single desktop computer can be really hot in intensive use, so imagine when you put many machines in a same room together. I remember the first cluster of the bioinformatic lab, the provider installed the hardware one day before they installed the software, but when the guy turned-on the systems, all the RAMs were burned. The provider changed all the RAMs for a more heat resistant brand. After some time and after some expansions in the cluster, the cooling systems also was required to be changed for an industrial equipment, in summer it feels like an oven. The thir

Robot scientist

Amazing, I know about the use of robotics systems to manage high throughput experiments, for example when you need to prepare reactives dilutions in plate series of 96 or 384 (some time ago I hacked one of these equipments using reverse engineering and Perl), or picking bacterial colonies and extract the DNA. Now a couple of reports in Science ( this and this ) are describing the use of a robotic system to study yeast mutants in media deprivation, and after run 1000 experiments every day, the system report some insight about the results. Check the video and more information in NewScientist .

Face gestures in Opera

The best joke for April 1st in my opinion was this:

Robots

Since I've been working on high throughput biological image analysis looking for patterns and modeling 3D visualizations, I've been reading about computer vision. Beside the beauty of mathematical formulations for image processing, I found many related papers about robotics and the impressive development of robots which a specific use. Reading this Gizmodo article I noticed the Hirose-Fukushima Robotics Lab at Tokyo Tech , check the movies section for examples of their fantastic robots like this: I always like the robots in SciFi, from R2D2 to Megatron, but when you see the actual research in robotics, you can believe in a close future we'll have more sophisticated robots (complete robots, not only robotics arms or autonomous vehicles).

No miracles

Image
Last weekend I saw this cartoon printed in a T-shirt at the PSC , and last day Kbyte 's twitts reminded it to me. Cartoon by Sidney Harris .

Old computers Dream

Image
I own a little old laptop (it was owned by a very good friend, traded in a perfect time for us). It's a HP pavilion ZT1114, PIII @ 1GHz, only 256 Mb in RAM, no battery, I recently change the HD. The computer is still working well, except for versions of heavy Linux can run but response time is slow. Long time I used in this machine Mandriva , from 2007 to 2009 releases, changing the default desktop to XFCE to save memory and optimizing the system, also I tried Puppy Linux and other minimalistic Linux distributions. But always I feel something missing, an ultimate Linux distro with fast performance. Until few weeks I noted the new release of DreamLinux , a Debian based distro with a pretty and fast desktop (XFCE). I had installed last week and after one week of use, I like it! Everything works well. The AWN bar looks like MacOS X. The Debian stability and large collection of packages. EasyInstall application is really useful. DCP-Control panel works well. Of course not everything w

Hitler disappointed with OpenGL

This a video so geek, but it's funny (if you known about OpenGL dev). From: http://geekmx.co.cc/archives/57

DNA fractals

Image
Some days ago, I had a talk with I who suggested me to use some mathematical approaches to compare artificial with real sequences (one of my projects). Besides mutual information and SVM classification systems, he told me about fractals presents in the sequences. The method had been called "Chaos game for DNA" ( emboss has a subprogram to do it named chaos ) and the algorithm is very simple: use a square with each corner represents a "letter" (AGCT), start in the middle of the square and read the sequence, you add a point in the halfway of the previous point and the new letter, continue until you finish the sequence This method was previously described in the 90's, recently we have more genome information to continue exploring this characteristic in the DNA sequence, some application include alignment-free comparison and other iterative systems which reproduce this effect. After I plot some sequences, I asked me to test other species to see differences, but a

Tips And Tricks For Bioinformatics Software Engineering

Gus told me about this blog post which is the condensed version of this presentation: Tips And Tricks For Bioinformatics Software Engineering View more presentations from jtdudley . (tags: bioinformaticsprogrammin ... bioinformatics ) Let's discuss some points: Learn UNIX . This is basic, many people comes from the MS-world and wants to do the same tasks as in UNIX, wrong , the UNIX philosophy and design is optimized for heavy task and multiple activities, besides the complete support for programming, servers, administration, ... I say: don't waste your time, use UNIX (Linux, Mac OS, BSD, Solaris, ...). Know many computer languages but be master in ONE . In this part the talk is focused in Java/Python/Ruby, I still suggest Perl. Perl big problem is the object-oriented pragma , but nothing compares the power of regular expressions and text-parsing of Perl. Besides Perl is less grammar strict than Java/Python, it's easy to learn but easy to acquire bad habits. Don’t reinv

Filtering common miRNAs

Last day, M asks me how to compact the microRNA mature fasta-file from miRbase , the problem is many miRNA are conservated across species, so the fasta file with all the mature sequences has a lot of redundancy and he wants unique sequences to screen some sequences. This is a simple Perl solution, the first step is to read and collect the sequences, the trick is to save in a hash using the nucleic sequences as "key" and append the names as "value". After this, simply extract the "keys" and parse a little the "values" to have a common identifier. Code: #!/usr/bin/perl -w use strict; =head1 NAME uniq_mir.pl FASTA =head1 DESCRIPTION Filter the multifasta file of miRbase (mature.fa) into unique miR by sequence. =cut $ARGV[0] or die "Usage: uniq_mir.pl FASTA\n"; my $name = ''; my %seqs = (); open F, "$ARGV[0]" or die "cannot open $ARGV[0]\n"; while ( <F>) { chomp; if (/^>/) { s/>//; my @line =

Command-line Fu

Image
Recently I found this great site Command-line Fu , a site where you can find these beautiful gems for the command line but it's different from other collections: What's this? Command-Line-Fu is the place to record those command-line gems that you return to again and again. Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on and discussed - digg-esque voting is also encouraged so the best float to the top. So, anyone can share their commands, you can look, learn and use or suggests better ways to do it, and beyond the Bash, also include tags (functions) for one-liners scripts in perl, python, etc. or by specific commands like curl, ssh, grep, ... With Twitter and RSS report systems you can follow the latest commands too (but only report the link and the function, not the command). Sweet. Via: Downloa

1234567890

Image
The next February 13th has a special event, not for everyone, just for people like us (yes, you know, accept it ...) because the UNIX time at 11:31:30pm UTC will read in the terminal in curious form: 1234567890 . Why? Check Wikipedia : "Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1st. 1970, not counting lap seconds. It is widely used not only on Unix-like operation systems but also in many other computing systems. It is neither a linear representation of time nor a true representation of UTC (though it is frecuently mistaken of both) as the times it represents are UTC but it has no way of repesenting UTC leap seconds (e.g. 1998-12-31 23:59:60)." If you want to check it, or see other values for your favorite number, you can use the Perl one-line: perl -e 'print scalar localtime(1234567890),"\n";' Note: image from Wikimedia showing whe

People loves Win7 ... wait it's KDE4!

ZDNet Australia test some people in the street, they showed a Linux (which one? they didn't mention ...) with KDE4, they activate some fancy effects and told the people "this is the new windows 7", ... many people like it! I think they must tell the true, to see if they want to switch to Linux, anyway the cheaper W7 will be $200 usd (I prefer to buy a new computer with this money, I'm still saving for my AAO, donations accepted).

Bigger, Faster, ...

Image
IBM announced the new big project to build the next #1 supercomputer of the world, codename Sequoia, it's impressive the limit of 20 petaflops ... that's more than the combined power of all top 500 supercomputers (#1 is only 1 petaflops). The Sequoia will be powered by 1.6 million cores (specific 45-nanometer chips in development) and 1.6 petabytes of memory. It will be housed in 96 refrigerators spanning roughly 280 square meters. Of course the owner will be the USA gov, who's else? From: Gizmodo Image from: xkcd

Bash scripting tips

Bash is almost a complete programming language, I use every day (switching from the default tcsh in the servers, in Mac OS X is default) for automatic job launching. Extracted from: http://hacktux.com/bash/script/efficient. Avoid full paths to bash built-ins. Except when you require specific commands, when I use systems with 32 or 64b binaries, I need to specify which one to use, or define an specific directory to use in the PATH or as a variable. Avoid external commands for integer math. Because bash has math evaluation. Avoid using cat . Commonly people use cat and send to other commands with a pipe, but many commands can read files in the parameters. Avoid piping grep to awk . Because awk can filter the inputs, use /pattern/ Avoid piping sed to sed . Multiple filters can be applied to the input with the -e option ( sed -e "s/this/that/" -e "s/old/new/" filename ). Use double brackets for compound and RegEx tests. [[ ]] evaluate the operations between

Metric

Image
I need the inverse table ... why are they still using it? From: http://imgs.xkcd.com/comics/converting_to_metric.png