| Bsoft 2.0.5 Bernard's software package

Functions
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

  *mol1 | first molecule structure.
  *mol2 | second molecule structure.
  *simat | residue 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_plot | dot 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_plot | dot 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_plot | dot plot matrix.
  window | moving 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

  *mol1 | first molecule structure.
  *mol2 | second molecule structure.
  *nres | number of similar residues in best diagonal.
  *simat | residue 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

  *mol1 | first molecule structure.
  *mol2 | second molecule structure.
  gapopen | gap opening penalty.
  gapextend | gap extension penalty.
  *simat | residue 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

  *mol1 | first molecule structure.
  *mol2 | second molecule structure.
  threshold | threshold to identify segments.
  dot_plot | dot 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.