seqtoolsUtils

The seqtoolsUtils module contains code that is common to both Blixem and Dotter. The more significant functionality is described below.

Features

blxmsp.h/.c

The seqtoolsUtils module defines structs for our features. Supported features include matches, exons, introns, SNPs, polyA tails and polyA signals.

File parsing

blxparser.h/.c, blxGff3parser.h/.c

Functions to parse the features file. The recommended file format is GFF version 3. However, the older exblx/seqbl file formats (as output from MSPcrunch) are also supported. Note that the reference sequence can be passed as part of the features file or in a separate file - if the latter, then it is parsed separately by the main() function, not by this module.

Sequence translation

translate.c, iupac.h

Defines various functions and matrices used to reverse/complement nucleotide sequences and to translate nucleotide sequences to peptides.

Web browser

seqtoolsWebBrowser.c

Defines functions to open a URL in the user's default web browser.

Coordinate conversions

utilities.c

There are two functions that underpin all conversion of coordinates between how they are displayed and how they are stored: convertDisplayIdxToDnaIdx and convertDnaIdxToDisplayIdx. They convert a DNA index to display coords and vice versa. The display coords are either DNA or peptide coords depending on whether Blixem is in nucleotide or protein mode. These functions also take care of inverting the coords if the display is reversed (i.e. if the reverse strand is active) - this is necessary because the GtkAdjustment for the scrollbar can only handle a forward range, i.e. it assumes values increase from left-to-right; if we want to display values as decreasing from left-to-right then we need to invert the values.

Drawing and Printing

utilities.c

Printing in GTK+ is performed using the Cairo graphics package. We must provide some way of telling Cairo what to draw*. We implement this as follows:

*UPDATE: A lot of the functions used here are now deprecated. It looks like GTK has improved support for drawing widgets' windows directly, which probably means that all of the pixmap stuff mentioned here is no longer necessary.

Current issues with this are: