Binalign object (Comparative Genomics Toolbox for MatlabŪ)

written by: Liran Carmel

Last modified: 12:47, Mon 13-Sep-2010

General Description
This object describes multiple alignment of binary data, usually interpreted as presence/absence of some character. Missing values are always described as NaN.

The basic data component is a matrix of size n-by-s, describing a length-s multiple alignment of n genes.

Navigate to:     General Description     Class Structure     Class Construction     Class Functions

Class Structure
Each field can be accessed by the dot (.) operation, or by the GET function. The GET function can work on multiple instances simultaneously. Most fields, except for those that are Dependent, can be modified using the dot (.) operation, or by the SET function.
    Field Description Type Default Dedicated Get/Set Function  
    name name of object, should be short and used as identifier. This field will never be empty. string 'unnamed'    
    description verbal description of the class content. string ''    
    source verbal description of the source of information. string ''    
    seq_names names of the aligned seqeunces. cell array of strings {}    
    patterns list of all unique patterns. A matrix of size no_unique_patterns -by-pattern_length double matrix []    
    hist_patterns number of times each unique pattern appears in the data. A vector of length no_unique_patterns. integer vector []    
    loc_patterns the location of each pattern along the multiple alignment. A cell array of length no_unique_patterns, keeping in each cell the locations of each unique pattern. cell of vectors of integers []    
    consensus concensus sequence. A vector of length no_unique_patterns. vector on alpha-bet 0/1/NaN []    
    reliability reliability score of each position along the multiple alignment. A vector of length no_unique_patterns. double vector []    
  Dependent no_sequences number of sequences. integer scalar 0    
  Dependent no_patterns number of unique patterns. integer scalar 0    
  Dependent no_sites number of sites. integer scalar 0    

Class Construction
Empty instance (scalar)
an empty binalign instance, with all fields initialized to their default values.
syntax: bal = binalign;
Empty instance (matrix)
a vector of empty binalign instances.
syntax: bal = binalign(size);
Copy constructor
one binalign instance is copied into another.
syntax: bal_destination = binalign(bal_origin);
Construction by field names
an instance is formed by directly providing field values. Any field which is not dependent is permitted.
syntax: bal = binalign(field_name, field_value, ...);
Readin-in binary multiple alignment
Reading-in a matrix on 0/1/NaN representing a binary multiple alignment. Such a matrix is termed 'block'.
syntax: bal = binalign(block);

List of Functions

Display:

show
displays class content.
showstructure
displays positions with 1s.

I/O functions:

blockin
gets block input and transforms it into pattern input.
blockout
computes the block associated with a BINALIGN object.
dump
writes alignment information to disk.

Information extraction:

findpattern
locates a particular pattern in BINALIGN.
getfulllocpatterns
completes the first element of {loc_patterns}.
name2idx
finds the indices of sequence names.

Transformations:

deletesites
eliminate sites from an alignment.
join
merges several BINALIGN objects.