File: GlobalAlign.h

package info (click to toggle)
proda 1.0-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 584 kB
  • sloc: cpp: 8,549; xml: 163; makefile: 109; sh: 12
file content (48 lines) | stat: -rw-r--r-- 1,398 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//////////////////////////////////////////////////////////////////////
// GlobalAlign.h
//
// Global alignment procedures using maximum weight trace.
//////////////////////////////////////////////////////////////////////

#ifndef GLOBALALIGN_H
#define GLOBALALIGN_H

#include "Score.h"
#include "Matrix.h"
#include "MultiSequence.h"
#include "Sequence.h"
#include "ProbModel.h"

//////////////////////////////////////////////////////////////////////
// Global alignment class
//////////////////////////////////////////////////////////////////////

class GlobalAlign {
  
  enum TracebackType { NONE, UP, LEFT, UP_LEFT };

  // insert gaps into aligned sequence
  static Sequence *InsertGaps (const Sequence &seq, const char *alignmentPath, char ch);

 public:

  // maximum weight trace
  static char *ComputeMWTrace (const Matrix &m, float *score = NULL, int *length = NULL);
  
  // convert alignment path into MultiSequence
  static MultiSequence *BuildAlignment (const MultiSequence &group1, 
					const MultiSequence &group2, 
					const char *alignmentPath);

  // align two groups of sequences
  static MultiSequence *AlignGroups (int n,
				     SparseMatrix **posteriors, 
				     const MultiSequence &group1, 
				     const MultiSequence &group2);
  static float ComputeAlignmentScore (const MultiSequence &seqs, 
				      int n, 
				      SparseMatrix **posteriors);
    
};

#endif