Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
User Manual


Authors: R. Tetley and F. Cazals


When processing large amounts of protein sequences, having indicators on certain sites of interest, such as transmembrane parts or binding sites can be interesting. As an example, one could want to find proteins wich contain a transmembrane region that is at least 30 amino-acids long. Such is the purpose of sequence annotations, allowing users to search for certain characteristics in annotated sequence. We provide a set of two Python modules: one which defines annotated sequences and provides some standard annotators and one to filter a set of protein sequences using properties on these annotations.


An annotation on a protein sequence is a triplet composed of a feature key, a residue sequence number range (or list) and a description. $\text{\uniprot}$ provides a list of standard features:

  • The feature key defines the type of feature
  • The range locates the feature on the sequence
  • The description (optional) gives additional information on the feature

As an example, the EFF1 protein ( contains:

  • A Transmembrane region (feature key)
  • Between residues 556 and 576 (residue range)
  • Which is Helical (optional description)

Python modules

Sequence annotations

The Python module SBL/ provides the SBL::Sequence_annotators::Annotated_sequence class. Such an object should be initialized with a name as well as a fasta sequence. An annotator should then be used to add sequence annotations.

Annotations using Phoebius

phoebius is a combined transmembrane topology and signal peptide prediction method [102] , based upon profile Hidden Markov models.

The Python module SBL/ , provides the class SBL::Sequence_annotators::Phobius_annotator which uses the $\text{phoebius}$ executable to annotate a sequence.

An annotator has a single function, annotate, which takes an annotated sequence object in argument, and produces annotations by exploiting its fasta sequence

For example, the phobius annotator, when given an annotated sequence object, will write its fasta sequence to a file, run the $\text{phoebius}$ exectuable, and parse the results. These results will be used to annotate the sequence.

Users can design their own annotator by creating a functor object which has a member function annotate which fills the features field of the annotated sequence.

Sequence filters

Through the SBL/ module, we provide a set of filters which allow to filter a set of annotated sequences by using criterions on their annotations.

A sequence filter object is a functor containing the filter member function, which takes an annotated sequence as argument and returns true if the given sequence follows the defined restrictions.

For example, the SBL::Sequence_filters::Transmembrane_filter class will simply look for a "Transmembrane" feature in the annotated sequence.

Users can define their own filters.


In this example, we parse a fasta file and annotate each listed fasta sequence using the $\text{\phoebius}$ annotator.

We then use the SBL::Sequence_filters::Class_II_filter class to assess wether the given sequence is a viable class II fusion protein candidate.