2007-07-09

Pedigree viewer on GNU/Linux

Hi, it's time to share some good news with others. I have managed to install, run, and use Pedigree Viewer (a program that draws and manipulates pedigree diagrams, written by Brian and Sandy Kinghorn) under my laptop running GNU/Linux. Since this is a MS Windows application, wine emulator is being used of course. Bellow is a set of terminal commands one needs to issue to get the whole thing working.


# Create temporary folder
mkdir pedigreeViewer
cd pedigreeViewer

# Get the program and unzip it
wget http://www-personal.une.edu.au/%7Ebkinghor/pedigree.zip
unzip pedigree.zip

# Install the program
wine setup.exe

# Run it
wine /path/to/your/wine/drive_c/Program\ Files/Pedigree\ Viewer/Pedigree.exe &

# /path/to/your/wine depends on your configuration of wine
# usually it is ~/.wine/dosdevices/c:

# Optionally create alias for future use and put it into file like
# ~/.bashrc
alias PedigreeViewer='wine /path/to/your/wine/drive_c/Program\ Files/Pedigree\ Viewer/Pedigree.exe'


I have the following software:
Ubuntu GNU/Linux version 7.04 (Feisty Fawn)
wine version 0.9.33

2007-05-29

Emacsclient

Emacs can be used as a server and each file can than be opened via emacsclient. This is handy to keep session lean and to have all working files in one pot. This works however only if emacs is already running. Up to now I had some shell scripts that eased the opening of emacs if it was not running, but I have just find out that it is fairly easy to do this in the following way - I have emacs 22 now:

Set emacs-snapshot as emacs:
sudo update-alternatives --config emacs

Set emacsclient.emacs-snapshot as emacsclient:
sudo update-alternatives --config emacsclient

Set environmental variables (say in ~/.bashrc):
export EDITOR=emacsclient

export VISUAL=$EDITOR

export ALTERNATE_EDITOR=emacs

Now you can call emacsclient on any file you would like to open it. If emacs is not yet running ALTERNATE_EDITOR will startup, which we defined to be emacs. Simple!

Typing emacsclient someFile is to long so I have the following in my ~/.bashrc. Using & also unlocks the terminal, which is handy.

edit ()
{
$EDITOR $@ &
}

2007-05-18

Move to *ubuntu

I had to install GNU/Linux on my box at work and have looked yesterday at Ubuntu (uses Debian as a source of packages) and its derivatives (Kubuntu an Xubuntu). I decided to take Xubuntu, because I will use this machine for a bit more involved computing and I do not want to spend to much resources on eye-candy stuff. Additionally, Xubuntu should be the right choice for my poor laptop.

It turned out that this was very good choice. I had running linux in say 20 min. It is very nicely packed and organized. Up to now I have used RedHat and Debian and this is the best of all! Not to mention the quality of help - really clean, straight, nicely written. Impressive! Debian has great package management, but Ubuntu has pushed this even further. Very slick. I think I will install it also on my laptop over the weekend. I hope wireless will work OK.

I am installing now VirtualBox. Virtualization seems to be very easy these days. Looks like I will be able to abandon dual booting. Oh, at last.

2007-05-11

Skeleton-pair mode in Emacs

Emacs is really great editor. A bit clumsy for beginners, but powerful when you get used to it. I have just added skeleton-pair insert stuff to my .emacs file. This enables direct insert of additional character, say ), when I type (. Nice! Here is the elisp code for it - I found it at emacsWiki site


;; enable skeleton-pair insert globally
(setq skeleton-pair t)
(setq skeleton-pair-on-word t) ; apply skeleton trick even in front of a word.
(global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
(global-set-key (kbd "\'") 'skeleton-pair-insert-maybe)

2007-04-20

Bloglines

I use bloglines as an RSS reader and today I got the message that they ar fixing something. This was the note:


Hi,

I'm the Bloglines Plumber. Bloglines is down for a little fixer upper. We will be back shortly. Bloglines will be all better when I'm done with it.

Thanks,

The Bloglines Plumber
OK. But the funny part is this picture




2007-04-16

GeneticsPed in BioC

We have finally switched to BioC SVN for development of GeneticsPed package. Now we have results of daily builds and checks at different platforms. Neat.

Sweave (bash) shell script

I uploaded my Sweave.sh (bash) shell script to CRAN. It is available here.

2007-04-13

Installing PyPedal under Debian

Here is my initial attempt about installing PyPedal on my Debian box. ## mark my comments and the rest are shell commands:


## Switch to root user
su -

## First install non-python stuff in Debian
##
## Software Debian package
## Graphviz graphviz
## SQLite sqlite3
##
## Note that there are sqlite and sqlite3 in Debian and
## I took the new one

aptitude install graphviz sqlite3

## Now we get to python modules that are
## already packaged in Debian
## Module Debian package
## elementtree python-elementtree
## matplotlib python-matplotlib
## NetworkX python-networkx
## NumPy python-numpy
## PIL python-imaging
## pydot python-pydot
## PyGraphviz python-pygraphviz
## pyparsing python-pyparsing
## pysqlite python-pysqlite2
## ReportLab python-reportlab
## setuptools python-setuptools

## Again, there are python-sqlite (for SQLite 2),
## python-pysqlite1.1 and python-pysqlite2
## (both for SQLite 3)

aptitude install python-elementtree\
python-matplotlib \
python-networkx \
python-numpy \
python-imaging \
python-pydot \
python-pygraphviz \
python-pyparsing \
python-pysqlite2 \
python-reportlab \
python-setuptools

## Other Python modules not in Debian

## According to Python inst. doc especially this section
## we should use the following way to install
## non-debianized modules
##
## python setup.py install --prefix=/usr/local

## PythonDoc
## Site: http://effbot.org/zone/pythondoc.htm
## At the time of writting I issued the following

wget http://effbot.org/downloads/pythondoc-2.1b6-20060406.tar.gz

tar -xzvvf pythondoc-*
cd pythondoc-*
python setup.py install --prefix=/usr/local
cd ..
rm -R -f pythondoc-*

## testoob
## Site: http://testoob.sourceforge.net/
## At the time of writting I issued the following

wget http://kent.dl.sourceforge.net/sourceforge/testoob/testoob-1.13.tar.gz

tar -xzvvf testoob-*
cd testoob-*
python setup.py install --prefix=/usr/local
cd ..
rm -R -f testoob-*

## PyPedal
## Site: http://pypedal.sourceforge.net/
## At the time of writting I issued the following

wget http://puzzle.dl.sourceforge.net/sourceforge/pypedal/PyPedal-2.0.0b21.tar.gz

tar -xzvvf PyPedal-*
cd PyPedal-*
python setup.py install --prefix=/usr/local

## Upps! The last one does not install cleanly as
## reported on SF mailist list for PyPedal.

2007-04-06

Wich forge for R should I use

When developing software it is very handy to have some version control companied with e-mail alerts on commits, maybe a forum etc. I have used SourceForge for this for some of my packages i.e. in r-genetics and r-ggorjan "projects". I have even persuaded some of "R-BUGS" people to initiate bugs-r (I have not done any development recently there which is a pitty). What I miss with SourceForge is daily checks with R CMD check etc. I have written some scripts to do this and even played with (semi-)automatic publication on my homepage (follow software --> R). This was very tedious and it never worked in the way I wanted. CRAN provides daily check for all packages but only for those published at CRAN. BioC has pushed this idea a bit further with SVN and daily checks of code in SVN against several R versions (the last feature is also available by CRAN).

I noticed in the past a note by Gregory Warnes on site ala "R-Forge" - I do not remember the details. Now I have discovered r-forge.net by Simon Urbanek which seems to be great for what I want. I have browsed the site and wanted to join there, but then I discover the following note on that site:

"Note: This site is not related (except in spirit) to the R-Forge project at the WU Wien which can be found at http://r-forge.wu-wien.ac.at/."

Pheu. There seems to be another site with this functionality! Given that this site has r-project.org domain I guess that this will become official forge for R. I will ask on R-devel list.

RJDBC

Just found an R package RJDBC that allows connecting R to any database that has JDBC driver. This might be even easier than with ODBC as I have previously described for Oracle.

For example, see this blog post.