Notes about open source software, computers, other stuff.

Month: November 2012

Tabs and spaces in Emacs

Recently I added the following lines to my ~/.emacs file:

;; Don't insert tabs when indenting regions
(setq-default indent-tabs-mode nil)

The idea behind disabling the indent-tabs-mode was that (especially) while programming I want any tabs to be converted to spaces. Since different people have different settings for a tab width this seemed like a good choice.
However, once I opened a Makefile I ran into trouble. In a Makefile tabs are a requirement, not an option. Since all my tabs were converted to spaces the moment I saved a Makefile compiling became a nightmare. To solve this problem I added the following to my ~/.emacs file, after the aforementioned statement:

(add-hook 'makefile-mode-hook
          (lambda ()
            indent-tabs-mode t))

This enables tabs again for modes that involve Makefiles.

Related Images:

The Raspberry Pi runs ProbABEL

One of the first things I tried on my Raspberry Pi was to compile ProbABEL and see if it runs. Since the Raspberry Pi has an ARM processor I wasn’t sure whether our code was portable to it. Apparently it is! Compiling ProbABEL (r.1027 from SVN) took 30 minutes (single threaded of course) compared to 34 seconds on my Desktop (4 threads on an Intel Core i3 processor), but hey, it worked :-). Surprisingly it also passed all the checks in make check.

Once I hook up some more storage to device I will try to run ProbABEL on some real data. It will be interesting to see how much time it takes to run a linear regression on e.g. chromosome 22 of HapMap3 imputated data for a few hundred samples…

Will the Raspberry Pi be the next platform for GWAS ;-)?

Related Images:

Enter the Raspberry Pi!

Two weeks ago I received a Raspberry Pi! The Raspberry Pi is a small computer based not on a “regular” Intel or AMD x86 processor, but on an ARM processor (similar to the ones used in smartphones etc.). The one I ordered is a model B (with ethernet) and 512MB RAM.

The idea behind this nifty little computer is to provide kids with a low-cost but fully functional computer with which they could start learning more about programming. I’m not sure if this goal will be widely met, but for me it worked ;-). Having this little machine (with its case it measures roughly 10 x 6 x 2.5 cm) in my hands and installing Raspbian Linux on an SD card and looking at the terminal as it booted reminded me of the times when I first played with Slackware Linux on a 486. Of course Raspbian (well, Linux in general) is much more advanced than Slackware 7.0 back in 1999/2000 but the not too stellar performance of the graphical desktop is somewhat comparable.

Apart from playing around with it I’m not sure yet what I’m going to use it for. A domotica hub? A small web sserver? Use DosBox to play old games (from even before the 486 era)? We’ll see!

By the way, I order mine on Thursday Novermber 8th and on the Tuesday after that the package landed on my doorstep. Amazing after hearing about people waiting for months for their orders to be shipped. I order mine from New IT. It probably cost a little bit more, but who cares :-).

Related Images:

ProbABEL 0.2.2 released

On November 7th I released version 0.2.2 of ProbABEL, a set of programs that allow scientists (usually geneticists and epidemiologists) to run Genome-wide association studies (GWAS) in a fast and efficient way, even on machines with low amounts of RAM.

ProbABEL is part of the GenABEL suite, wich is a set of open source package for statistical genomics. Its main developer is Yurii Aulchenko, my former supervisor at the Erasmus Medical Centre.

This update contains a few small bug fixes and an update of the probabel.pl wrapper script that enables the use of chunked imputation output files as input. For more detailed changes, check the announcement.
For those of you running Ubuntu Linux (or one of its derivatives and probably also Debian) I have set up the GenABEL PPA (personal package archive) where you can download and install the ProbABEL .deb package and stay up to date with future updates.
ProbABEL is also available for MS Windows, although we don’t have much experience running it on that platform.

Development of ProbABEL (and other members of the GenABEL suite) takes place on this R-forge page. If you are in search of an open source project to contribute to, feel free to contact us!

User support for the GenABEL suite can be found at our forum.

Related Images:

Enabling middle mouse button emulation in Ubuntu 12.10

A few days ago I installed Ubuntu 12.10 on a 2009 laptop (a Dell Latitude D820). This laptop has a trackpoint (the little nib between the G, B and H keys on the keyboard that functions as a mouse). The trackpoint has its own set of mouse buttons, but, unlike my present Thinkpad, it doesn’t have a middle mouse button.
From my early Linux years I remembered that you could use a simultaneous click on the left and right buttons of a mouse to emulate the click of a middle mouse button. This option had to be set in the Xorg configuration file. My guess was that by now this was no longer needed, but I couldn’t find the appropriate option anywhere in Ubuntu’s settings. It’s quite a shame to see that Gnome/Unity/others(?) remove settings like that.
Anyway, looking around the web I found the solution. The middle mouse butten emulation can be enabled in the Gnome configuration by running the following in a terminal:

gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true

It worked immediately!

As an aside, I also had to install the packages nvidia-current and nvidia-settings in order to use the nVidia drivers. Without them using the Unity interface was dead slow, even though the laptop has an nVidia Geforce Go 7400.

Related Images:

© 2024 Lennart's weblog

Theme by Anders NorĂ©nUp ↑