Skip to main content

Posts

Showing posts from May, 2009

Tick label formatting in matplotlib

Use the Format** functions as illustrated in the major-minor demo. e.g. pylab.plot([0,1,2],[0,1,2]) major_formatter = pylab.FormatStrFormatter('%2.1f') pylab.gca().xaxis.set_major_formatter(major_formatter) pylab.gca().yaxis.set_major_formatter(major_formatter)

Installing Ruby on Mac OS X

ftp ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz tar -xvf ruby-1.9.1-p129.tar.gz cd ruby-1.9.1-p129 ./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 make -j4 sudo make install Installs in /usr/local/bin, make sure to point path there

HP battery recall

Finally, some useful information on Slashdot. I knew all those hours invested in reading inane comments riveting articles would pay off. HP is recalling batteries. The list is here

Those geneticists and their Excel

Mistaken Identifiers: Gene name errors can be introduced inadvertently when using Excel in bioinformatics If you are too lazy to get to the punchline: "MatchMiner [1] and GoMiner [2] are two bioinformatics program packages we published recently in another Biomed Central Journal, Genome Biology. When we were beta-testing those programs on microarray data, a frustrating problem occurred repeatedly: Some gene names kept bouncing back as "unknown." A little detective work revealed the reason: Use of one of the research community's most valuable and extensively applied tools for manipulation of genomic data can introduce erroneous names. A default date conversion feature in Excel (Microsoft Corp., Redmond, WA) was altering gene names that it considered to look like dates. For example, the tumor suppressor DEC1 [Deleted in Esophageal Cancer 1] [3] was being converted to '1-DEC.' Figure 1 lists 30 gene names that suffer an analogous fate."

Sourceforge nominations

My choices: - Matplotlib - Inkscape

Function definitions in scripts

My MATLAB origins betrayed me. I kept thinking - you can't put function definitions in a script in Python. Man, I gotta write a module and THEN a script that calls the module? But, in Python, you can include function defs in a 'script'. So the following works perfectly well: def func1(): print '1' def func2(): print '2' func1() Take that MATLAB.