Bsoft 2.1.4
Bernard's software package
seq_align.h File Reference

Header file for functions to generate and analyze dot plots. More...

#include "rwmolecule.h"
#include "rwresprop.h"
#include "Matrix.h"

Functions

long seq_pair_align (Bmolecule *mol1, Bmolecule *mol2, double gapopen, double gapextend, Bresidue_matrix *simat)
 Aligns two sequences. More...
 
int seq_find_best_offset (Bmolecule *mol1, Bmolecule *mol2, long &nres, Bresidue_matrix *simat)
 Finds the best offset for aligning two sequences without gaps. More...
 
Matrix seq_dot_plot (Bmolecule *mol1, Bmolecule *mol2, Bresidue_matrix *simat)
 Calculates a dot plot for two sequences. More...
 
Matrix seq_dot_plot_mov_avg (Matrix dot_plot, int window)
 Calculates a moving average along the diagonals of a dot plot. More...
 
int seq_dot_plot_interpret (Matrix dot_plot)
 Finds the row and column maxima in a dot plot. More...
 
double seq_dot_plot_best_segments (Matrix dot_plot)
 Finding the best segments in a dot plot. More...
 
int seq_show_segments (Bmolecule *mol1, Bmolecule *mol2, double threshold, Matrix dot_plot)
 Finds the best offset for aligning two sequences without gaps. More...
 

Detailed Description

Header file for functions to generate and analyze dot plots.

Author
Bernard Heymann
Date
Created: 20001029
Modified: 20110411

Function Documentation

◆ seq_dot_plot()

Matrix seq_dot_plot ( Bmolecule mol1,
Bmolecule mol2,
Bresidue_matrix simat 
)

Calculates a dot plot for two sequences.

Parameters
*mol1first molecule structure.
*mol2second molecule structure.
*simatresidue similarity matrix.
Returns
Matrix matrix with dot plot.

◆ seq_dot_plot_best_segments()

double seq_dot_plot_best_segments ( Matrix  dot_plot)

Finding the best segments in a dot plot.

Parameters
dot_plotdot plot matrix.
Returns
double threshold to identify unique segments.

◆ seq_dot_plot_interpret()

int seq_dot_plot_interpret ( Matrix  dot_plot)

Finds the row and column maxima in a dot plot.

Parameters
dot_plotdot plot matrix.
Returns
int number of maxima in both rows and columns.

◆ seq_dot_plot_mov_avg()

Matrix seq_dot_plot_mov_avg ( Matrix  dot_plot,
int  window 
)

Calculates a moving average along the diagonals of a dot plot.

Parameters
dot_plotdot plot matrix.
windowmoving average window size.
Returns
Matrix matrix with moving average dot plot.

◆ seq_find_best_offset()

int seq_find_best_offset ( Bmolecule mol1,
Bmolecule mol2,
long &  nres,
Bresidue_matrix simat 
)

Finds the best offset for aligning two sequences without gaps.

Parameters
*mol1first molecule structure.
*mol2second molecule structure.
*nresnumber of similar residues in best diagonal.
*simatresidue similarity matrix.
Returns
int the offset of sequence 2 with respect to sequence 1.
The best offset is determined as the diagonal of a dot plot with
the highest value.

◆ seq_pair_align()

long seq_pair_align ( Bmolecule mol1,
Bmolecule mol2,
double  gapopen,
double  gapextend,
Bresidue_matrix simat 
)

Aligns two sequences.

Parameters
*mol1first molecule structure.
*mol2second molecule structure.
gapopengap opening penalty.
gapextendgap extension penalty.
*simatresidue similarity matrix.
Returns
long length of the aligned sequences.
Two sequences are aligned and returned in the sequence strings
of the molecule structures.

◆ seq_show_segments()

int seq_show_segments ( Bmolecule mol1,
Bmolecule mol2,
double  threshold,
Matrix  dot_plot 
)

Finds the best offset for aligning two sequences without gaps.

Parameters
*mol1first molecule structure.
*mol2second molecule structure.
thresholdthreshold to identify segments.
dot_plotdot plot.
Returns
int the offset of sequence 2 with respect to sequence 1.
The best offset is determined as the diagonal of a dot plot with
the highest value.