Bsoft  2.1.0
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"

Go to the source code of this file.

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

Definition in file seq_align.h.

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.

Definition at line 137 of file seq_align.cpp.

◆ 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.

Definition at line 265 of file seq_align.cpp.

◆ 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.

Definition at line 214 of file seq_align.cpp.

◆ 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.

Definition at line 168 of file seq_align.cpp.

◆ 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.

Definition at line 94 of file seq_align.cpp.

◆ 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.

Definition at line 34 of file seq_align.cpp.

◆ 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.

Definition at line 324 of file seq_align.cpp.