Friday, January 29, 2010

Getting Bio::DB::Sam and samtools working on openSUSE 11.2

The makefile in the samtools package needs some minor modifications in order for this setup to work. Unpack the samtools source package and open Makefile in your favourite editor.
Change the CFLAGS line to read:

CFLAGS= -g -Wall -O2 -fPIC
Depending on your system architecture you may want to make additional changes there. The above change is likely to be necessary to get the Perl modules to compile.
Further down in the file change the libcurses implementation -lncurses:
LIBCURSES= -lncurses
This is required as SUSE uses as different curses implementation than samtools expects. Next make the samtools package by executing make when in the source directory. (The rest of this document assumes you're working in your favourite terminal application). If you compiled the source before or aren't sure issue a 'make clean' first.
make clean && make
If you want easier acces to the executables remember to copy samtools and razip to a folder that is included in your path (like ~/bin/ (just you) or /usr/bin/ (system wide)). Now the relevant Perl modules can be installed. Open a Perl shell:
perl -MCPAN -e shell
...and then install the relevant module.
install Bio::DB::Sam
If all goes well, the module should compile nicely. If you tried to compile the module before you may have to clean out the build directory first. (q to quit the Perl shell).

Sunday, May 03, 2009

Quick mini-howto: SMS via Skype on Linux (opensuse)

There's a nice description on how to get access to Skype SMS on a linux system running a Skype linux client here. This guide is for Ubuntu, but it works for OpenSuse as well, with a tweak. After extracting skysentials an attempt to run this package will result in:

/usr/bin/python2.5: bad interpreter: No such file or directory
To get around this, open skysentials.py with your favourite text editor and change the very first line from:
#!/usr/bin/python2.5
to:
#!/usr/bin/python
...and it should work.
Bonus: if you want an easy link to the script, put the folder containing the files somewhere where it's not in the way and create a symbolic link in the 'bin' folder in your home directory:
ln -s /path/to/skysentials.py ~/bin/skysentials
...where you can also opt for another name and /path/to/skysentials.py should be the full path pointing to the skysentials.py script that you just saved.
This will allow you to just type skysentials from any terminal or run dialogue, without having to specify the full path or browse to the folder. E.g.: if you're using KDE, hit Alt+F2 to bring up a run dialogue, type skysentials and hit enter.

Sunday, January 25, 2009

Quick mini-howto: OpenSuse11.1 OpenOffice Impress TwinView Presenter Console 64bit

The insanely long title is required as I've experienced that all mentioned items contribute to the issue of the whole setup not working. If you're using OpenSuse's 11.1 version of OpenOffice with an Nvidia (binary driver from the repo) TwinView setup and want to run a presentation on the external monitor you'll find it doesn't work. The multiple monitor section in slide show settings is grayed out. Oddly enough this does work with the packages directly from Sun. I'm assuming that TwinView is already properly set up.

  1. uninstall all openoffice packages from openSuse (search for openoffice, select package > all in this list > delete).
  2. download the relevant openoffice package from Openoffice.org (other systems). I'm using the linux 64 rpm without Java JRE, which you get by unchecking the checkbox above the table.
  3. create a folder to hold the installer files, move the installer file there and unpack it (on the command line 'tar -xvpf ')
  4. Add this folder to your repositry list (in the software manager Configuration > Repositories). Click 'add', select 'local directory' give it a name, point to its location and specify that it is a 'plain rpm directory' by checking the checkbox under the line where the location is specified.
  5. Apply the changes, search for OpenOffice and install what you need. Check with the version tab whether you've selected the version from the local rpm directory and not the repository version. If you have the files for both the i586 and the x86_64 version in the directory (like I accidentally had), check whether the x86_64 will be installed for all packages, as by default it seems to create a random mix.
  6. Also select the OpenOffice_org-ure package from the repositories. I needed the repository version to get the presenter console working.Optionally this step can be delayed until the Sun Presenter Console is installed (see step 9 if the presenter console ends up not working). Apply all the changes.
  7. Download the Sun Presenter Console (in my case the linux x86-64 version towards the bottom of the list). Save it somewhere on your system. You can try adding it directly by opening the file with openoffice, but likely it will complain that the extension 'Sun Presenter Console' doesn't work on this computer. If it does work fine, you're done. If not:
  8. Unzip the package (the .oxt file you downloaded) (command line 'unzip ') and fire up your favourite editor to edit the file description.xml. Two things need to be changed: the tag that lists 'identifier value' and the tag that lists 'platform value'. Both should contain 'linux_x86', which should be 'linux_x86_64'.
  9. Optionally check that the required libraries are present: in a terminal run 'ldd PresenterScreen.uno.so' and check whether the output complains about any missing files. If there are some files missing you probably didn't install the OpenOffice_org-ure package from the repositories.
  10. Zip the package back to an .oxt file (or zip and rename to .oxt) (in a terminal 'zip -r sun-presenter-console-fix.oxt *')
  11. Open the new .oxt file with openoffice and it should pop-up with a dialogue about adding the extension. Installation should procede normally and after installation the presenter view should pop-up when you've configure a presentation to run on a specific monitor via the slide show > slide show settingsmenu.

Sunday, November 16, 2008

Windows Vista Revisited

So, a while back I mentioned that the dual boot configuration on my laptop was one of the signs of a war waging between Windows (Vista) and alternatives (currently Suse with KDE 3.5). Back then I wasn't impressed with a number of things, mainly:
  • Suse: not all my hardware works straight away. An nvidia driver that didn't support my graphics card (too new) was automagically installed and caused by screen to wipe out as soon as X started. The touchpad doesn't work when I'm docked, with another mouse attached. The display problem was solved in the next update to Suse.
  • Windows: Switching the dock on when windows is on (forgetting to plug it in) crashes windows to oblivion (blue screen of death). Linux happily keeps on running, telling me the adapter is now plugged in, activating my mouse and periferals.
  • Suse: multiple screens and linux still don't play nicely together.
  • Windows: Some multi display settings are now arcane to set; half of the options were grayed out in one place, but not in another.
  • Windows: After upgrading my RAM it told me I needed to buy a licence for windows, as my hardware had changed. (I have a removable cdrom drive and docking station. Aparently this presents windows with too many hardware configurations and it decides to deactivate itself as a result).
  • Windows: Whilst trying to copy a lab audio CD (no protected content); I'm sorry dave, I can't do that. Linux happily rips the cd to disk and asks me how many copies I want to burn. This is Vista's DRM at work.
The lost two points are basically a show-stopper for me. I do NOT have time to call Microsoft every time I undock my laptop and take out the CD-rom drive, or whatever triggered the deactivation. Nor am I amused by my computer telling me that I can do something, but doesn't want to. I actually like a lot of the features in KDE more than I do the features in Windows. I actually need more linux tools than I need windows tools. In short: Windows lost. I still have the dual-boot. It now runs XP for when I need to do a very few things for work (the license is also provided to me by my work). I'm thinking of moving that into a virtual environment and ditching the whole dual-boot.

There's a very in-depth story about why Vista DRM and related 'features' suck here: A cost analysis of Windows Vista content protection.

Tuesday, November 04, 2008

A Quick note on Cell press RSS feeds

The Cell RSS feeds recently went AWOL. There's no longer a link to them from the new journal pages, but if the URL of the journal homepage is changed from http://etcetcetc/home to http://etcetcetc/rss a page giving a link to the RSS feed is shown. Whether the RSS feeds will work remains to be seen; currently some feeds appear to be even older than old (now removed) feeds.