Tuesday, 28 February 2012

New edition of Chromatic's "Modern Perl" book

new version of Chromatic's book "Modern Perl" covering perl 5.14

Free PDF version.

Thursday, 23 February 2012

Perl programming 4th edition published


$20 the PDF in O'Reilly
25 GBP the paper back in Amazon (but not available until march)

Adopted as the undisputed Perl bible soon after the first edition appeared in 1991, Programming Perl is still the go-to guide for this highly practical language. Perl began life as a super-fueled text processing utility, but quickly evolved into a general purpose programming language that’s helped hundreds of thousands of programmers, system administrators, and enthusiasts, like you, get your job done.

In this much-anticipated update to "the Camel," three renowned Perl authors cover the language up to its current version, Perl 5.14, with a preview of features in the upcoming 5.16. In a world where Unicode is increasingly essential for text processing, Perl offers the best and least painful support of any major language, smoothly integrating Unicode everywhere—including in Perl’s most popular feature: regular expressions.

Important features covered by this update include:

New keywords and syntax
I/O layers and encodings
New backslash escapes
Unicode 6.0
Unicode grapheme clusters and properties
Named captures in regexes
Recursive and grammatical patterns
Expanded coverage of CPAN
Current best practices

Prof. dr. N.G. de Bruijn has passed away

In his obituary at Korteweg-de Vries Institute for Mathematics they mention that his de Bruijn sequences had practical applications in magic tricks but does not mention de novo assembly :-(


Prof. dr. N.G. de Bruijn, 1918-2012

N.G. (Dick) de Bruijn passed away on 17 February 2012. He was an emeritus professor of the Technical University Eindhoven, where he was a professor of mathematics from 1960 until 1984. He came to Eindhoven from the University of Amsterdam, where he was a professor of mathematics during 1952-1960. He published in many different areas, in particular in analysis, number theory, combinatorics and logic. Famous is his book Asymptotic methods in analysis (1958). In later years he developed Automath, a computer program for automatic theorem proving. The De Bruijn sequences, named after him, are widely discussed in literature and have even applications in magic (see the recent book Magical mathematics by Persi Diaconis and Ron Graham).

For more information, see http://tinyurl.com/89yn946 (pdf file from Kleine TUE Encyclopedie) and http://tinyurl.com/6pkuuol (MacTutor History of Mathematics biography). See also on
http://www.win.tue.nl/debruijn90/video/debruijn.html the video of the lecture by de Bruijn during the symposium on the occasion of his ninetieth birthday.

Fermi, a new de novo assembler using FMD-index from Heng Li


This is the README:
Fermi is a de novo assembler with a particular focus on assembling Illumina
short sequence reads from a mammal-sized genome. In addition to the role of a
typical assembler, fermi also aims to preserve heterozygotes which are often
collapsed by other assemblers. Its ultimate goal is to find a minimal set of
unitigs to represent all the information in raw reads.

Fermi follows the overlap-layout-consensus paradigm and uses the FM-DNA-index
(FMD-index) as the key data structure. It is inspired by the string graph
assembler (Simpson and Durbin, 2010 and 2012) and has a similar workflow.

As a typical de novo assembler, fermi tends to produce contigs with slightly
longer N50. However, the major weakness of fermi is the high misassembly rate.
Although fermi provides a tool to fix misassemblies by using paired-end reads
to achieve an accuracy comparable to other assemblers, this is not a favorable

Fermi is designed to be used on a multi-core Linux machine with large shared
memory. The easiest way to run fermi is to use the run-fermi.pl script. It
generates a Makefile. The actual assembly is done by invoking make. Premature
assembly processes can be resumed. Here is an example:

run-fermi.pl -dAPe ./fermi -p NA12878 -t16 -f18 reads*.fq.gz > NA12878.mak
make -f NA12878.mak -j16

This asks fermi to use 16 CPUs to assemble paired-end reads and will produce
raw unitigs in file "NA12878.ext.mag.gz". Graph cleaning and misassembly fixing
need to be applied manually. Future version of fermi will integrate these
steps into the run-fermi.pl script. It takes about a wall-clock week and a peak
memory of 85GB to assemble 35X human reads with 16 CPUs.

If you have any questions, ask me at .

Wednesday, 22 February 2012

fixing disabled atheros wifi after windows7 hibernation.

While I am waiting for my new computer a coworker lend me an acer-Aspire-5535 (4GB RAM AMD Turion-X2 64). This is a cheap but nice machine when using windows7 (without fancy decorations or animations) and a virtualized Ubuntu-LXDE with virtual box.

I enjoyed the machine until I hibernate it. When started up again the system the joy disapeared: the wifi was not working (the wifi button had some sporadic flashes but no network at all). I restated the machine and wifi came back without a problem. The coworker knew the problem and lived with it for more than 3 month ( a windows update created the problem ).Solution, of the owner (a typical windows person) when no wifi after hibernation: restart it. Problem, what problem? "Restart windows and it will works fine" she said to me. But I can not live without proper hibernation. It is not only the booting time, there is also  the programs' state and the 60 firefox tabs that I don't want to reload again, and the pdfs that I am reading or using as reference etc.

PROBLEM: when windows 7 suspend to ram or hibernate, it shutdown the wifi card, but then is unable to activate it after restoring.

As a linux person I am get use to ifdown;ifup for resurrecting a collapsed wifi card/driver. In the old windows XP I believe I have use a restart network but I was unable to find it in windows 7. After a lot of googleing and reading a lot of unhelpful advises 90% giving as solution to reboot the computer (have any of them understood that if you do hibernation is because you don't want to shutdown !!), I have found a solution to avoid the reboot:

# hit win-R
# type 
# at the bottom of the list you will find "WLAN AutoConfig"
# click on it an slect 'stop' wait click again and select start

This will activate again the wifi.

Also, in order to prevent this happening again, I am disabling the automatic turning off of the wifi device by the system. I went to 'control_panel'->network and sharing center->manage wireless network->adapter_properties->configure->power_management->"allow computer to turn off this device to save power" and unmark this option.

Tuesday, 21 February 2012

minimal server with VirtualBox: remember to install linux-headers

I have a minimal ubuntu linux server inside a windows machine, created with VirtualBox. But I was unable to install the GuestAditions

The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason

As I did not know exactly the name of the packages to install, I did some googling looking if more people have had the same problem, and i found that a quick solution is to select the intallation of the generic vbox guest additions in your package manager and see which dependencies you need to install.

$ sudo aptitude install virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-guest-utils virtualbox-ose-guest-x11

The following NEW packages will be installed:
  dkms{a} linux-headers-2.6.32-38{a} linux-headers-2.6.32-38-generic{a} linux-headers-generic{a} 
  virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-guest-utils virtualbox-ose-guest-x11 

$ sudo aptitude install dkms{a} linux-headers-2.6.32-38{a} linux-headers-2.6.32-38-generic{a} linux-headers-generic{a}

# now go to the GuestAdditions CD and 
ubuntu:/media/VBOXADDITIONS_4.1.8_75467$ sudo bash VBoxLinuxAdditions.run 

Monday, 20 February 2012

2012 would be a busy year for NGS business

First was the IonProton (http://www.genomeweb.com/sequencing/life-technologies-ceo-provides-further-details-ion-proton http://www.genomeweb.com/sequencing/life-tech-plans-new-ion-torrent-instrument-deliver-whole-genomes-hours-1k)then the illumina introduced last month the HiSeq-2500

Now is the turn for Oxford Nanopore with GridION and MinION:

DNA sequencing: Oxford Nanopore

Monday, 6 February 2012

Converting your perl module documentation into confluence

Short story

perldoc -u myPerlModule.pm | pod2wiki -s confluence > myConfluenceDoc

The key point is to use -u for printing out the original POD code (without any formatting).

Probably it is possible to use perldoc -owiki but I do not know yet how to pass the -s confluence. I will look at that later.

Long story

Today I was documenting some of my perl modules in our Confluence wiki when I decided to paste the POD. First I tried the HTML output copying it between {html}{html} directives, but as the .css was not created, the \blocks where not boxed, and I wanted them boxed.
HTML output
perldoc -ohtml  myPerlModule.pm
Then I made the output in text and used a oneliner to put some confluence markup
But these was not complete and needed some hand curation.
So I search in CPAN and find that Confluence is supported in the Pod::Simple::Wiki and also give you a script for that pod2wiki
pod2wiki accepts POD as input from STDIN, nice, so I printed the pod and passed to pod2wiki: perldoc myPerlModule.pm | pod2wiki -s confluence
NO OUTPUT!!!!!!!!!!
Today I was a bit slow, and took me some time to realize that perldoc does not print 'POD' but man-formatted POD. I did perldoc perldoc to find out how to print the raw POD of the document: option -u
Confluence output
perldoc -u myPerlModule.pm | pod2wiki -s confluence > myConfluenceDoc