Removing WINE file associations

I keep WINE installed for the sole purpose of playing StarCraft – BroodWar if I happen to be in a nostalgic mood. Annoyingly, WINE tends to “steal” a lot of the file associations from other programs. For example if I want to open a text file, Notepad insists on doing this. Come on…

The solution I have is to just delete all file associations for WINE programs. Go to ~/.local/share/applications and delete everything that begins with wine-extension.

Whew!

Leave a comment

Filed under desktop, misc, system

ALINE: colouring, numbering and annotation

Aline is an extensible WYSIWYG protein sequence alignment editor for publication quality figures. It can  read common sequence alignment formats which the user can then alter, embellish, markup etc to produce the kind of sequence figure commonly found in biochemical articles. Its homepage is here.

Aline is an interactive perl/tk application and can be installed from SBo. I have used the program to create visually appealing  multiple sequence alignment (MSA) figures and decided to list a few basic steps.

Colour scheme

To set a colour scheme:
  • choose a colour scheme from ‘Colouring > Predefined colour scheme’
  • set the scheme ‘Colouring > By similarity’
  • pick which sequences you want
  • adjust “Low similarity cutoff” and click ‘Run’
To choose a custom colour scheme:
  •  go ‘Colouring > Load colour scheme’
  •  set it as above ‘Colouring > By similarity’
To modify the scheme
  • go ‘Colouring > Edit colour scheme’
  • save it from ‘Colouring > Save colour scheme’ menu

Sequence annotation

Insert an empty row for your annotation:
  • select the ‘Insert blank row’ button from the ‘Actions’ panel
  • click on an existing sequence row
  • the new blank row will be inserted abov
  • …or you can just right-click on a row and do all that from the context menu
Draw in the blank row the topology of your sequence of choice:
  • shapes are in the ‘Draw’ panel — click on the side button of the “Helix” shape to see them all
  • choose what you want
  • to draw the selected shape, left-click on the empty row and drag
  • you can select a different line and fill colour from the ‘Attributes’ panel
  • …of course, you should know the coordinates of your domains. The SMART database is a good place to predict these.

Residue numbering

To enumerate the sequence you want to use as a reference, better put it as the first sequence:
  • click the ‘Drag row’ button from the ‘Actions’ panel
  • left-click on the row you want to drag
  • move it up
To add residue number:
  • go to ‘Tools > Add residue numbers’
  • specify which sequence the numbering will follow
  • where to be drawn, etc.

This will follow the uninterrupted residue number of the selected sequence. It will skip any gaps created by the MSA program. In most cases this is what you want. You may, however, want to add numbering that corresponds to the length of the whole MSA, not individual sequences. I did not find a way to do this directly. Therefore, I created a fasta file that contained only the “X” character, that ALINE will interpret as unidentified residue. For example if my MSA was 200 amino acids long, I made a fasta file with 200 “X” characters. Like this:

>RULER
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

To append it to your MSA, go to ‘Edit > Insert sequences from file’. Add residue numbers as above but this time based on this “RULER” sequence. Once the numbering is inserted, you can delete the “RULER” row. The numbers will stay.

Exporting graphics

Once you have the MSA coloured and pretty, you have to export it. I would recommend exporting it as EPS (File > Export postscript). You can open it with another graphics manipulation software. I use Inkscape and from there you can export in a number of vector or raster graphic formats.

Other

One thing I found a bit inconvenient was the maximum row length. It is 100 characters by default. I just opened the /usr/bin/aline perl executable and modified line 1523 from this:

$ui{nchscale}=_mySlider($sframe,'Width in characters',10,100,40,'nch',0);

to this:

$ui{nchscale}=_mySlider($sframe,'Width in characters',10,1000,40,'nch',0);

I am going to add the option to my aline.SlackBuild to do this for you, when I submit an update of the script.

Citing

Bond, C.S. and Schüttelkopf, A.W. (2009), Acta cryst. D65, 510-512

Leave a comment

Filed under Academic

Cyrillic in the XMMS playlist

In the XMMS playlist, the default font for GTK1 does not display correctly Cyrillic file names. A commonly used encoding for Cyrillic text is CP1251. To select a font that supports it, go to Preferences > Fonts > Playlist.

Clicking the Browse button will show the Select playlist font window. Go to the Filter tab and look for the Charset called microsoft-cp1251:

Screenshot - 04042015 - 01:40:47 PM

Now go to the Font tab to see what fonts have been filtered out. The only one that supports this character set is Terminus:

Screenshot - 04042015 - 01:41:00 PM

Select your preferred style and size and click OK. That’s it.

Leave a comment

Filed under desktop, media

Custom xdg user directories

I do not particularly like the standard folders that are automatically created in my $HOME. I used to just delete them and then set emblems on my own folders in XFCE. Some time ago, I found a discussion on LinuxQuestions about what program creates these automatically.

The default folders are set in ~/.config/user-dirs.dirs. The file has the following content:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

It’s easy to just modify Desktop, Downloads, Templates, Public, Documents, Music, Pictures and Videos to whatever you prefer. Paths can be either relative to $HOME (as shown above) or absolute. For the changes to take effect, just log out and in.

Extensive information can be found at Arch Linux’s wiki.

Leave a comment

Filed under desktop, system

Video driver in the initrd.gz

I have an ATI Radeon HD 6450 card. Sometimes upon boot, just when the console should switch to the screen native resolution, it apparently fails to do so. The screen goes black and the computer restarts.

I suspect there is some problem with loading the radeon driver. Therefore I decided to include it in my initrd image, together with the filesystem driver. Like this:

mkinitrd -c -k 3.10.17 -m ext4:radeon -o /boot/initrd-radeon.gz

The firmware got included automatically and the size of the generated initrd-radeon.gz is 6.8 MB. The screen switches to its native resolution a little bit earlier when booting. The problem does not occur anymore and I have not observed any issues, except that once X crashed over a period of 3 months.

important

However, I do not know if it is safe to do this and I have never seen anyone use this approach! I put it here solely for my future reference.

Therefore, I asked in the LQ forum three months ago how safe this is. People actually suggested that I better check my RAM and or to upgrade the kernel. When I have more time I will do that, but for now this fix seems to work.

If someone knows better, please let me know.

Leave a comment

Filed under desktop, system