source: tags/arb_5.3/ALIV3/a3_helix.hxx

Last change on this file was 3482, checked in by westram, 19 years ago
  • tabs → spaces
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1// -----------------------------------------------------------------------------
2
3#ifndef _A3_HELIX_HXX
4#define _A3_HELIX_HXX
5
6// -----------------------------------------------------------------------------
7//  Include-Dateien
8// -----------------------------------------------------------------------------
9
10#include "a3_types.h"
11#include "a3_darray.hxx"
12
13// -----------------------------------------------------------------------------
14//  Datentypen
15// -----------------------------------------------------------------------------
16
17struct HMatch       // Ubereinstimmender Bereich von Sequenz und Helixstruktur
18{
19    int first,      // Erste Position des Bereichs
20        last;       // Letzte Position des Bereichs
21
22        HMatch ( void ) { first = last = 0; };
23};
24
25struct HelixS       // Helixbereich
26{
27    int open,       // Position der ersten oeffnenden Klammer
28        close,      // Position der ersten schliessenden Klammer
29        length;     // Laenge der Helix
30
31        HelixS ( void )     { open = close = length = 0; };
32        HelixS ( int    o,
33                 int    c,
34                 int    l ) { open   = o;
35                              close  = c;
36                              length = l; };
37};
38
39class A3Helix
40{
41    private:
42   
43    str      helix,         // Helix(klammer)struktur
44             consensus;     // Haeufigste Familiensequenz
45    int      length;        // Laenge von helix und consensus
46    DArray   match;         // Array of HMatch*, sortiert nach first
47   
48    HMatch  &GetPart    ( int        part );
49   
50    public:
51
52             A3Helix    ( void );
53
54             A3Helix    ( str        hel,       
55                          str        kon,
56                          DArray    &mat );
57
58            ~A3Helix    ( void );
59
60    void     Set        ( DArray    &mat );
61
62    int      Parts      ( void );               // Anzahl der unalignten Bereiche
63
64    DArray  &Helices    ( int        part,
65                          int        minlen );  // Liefert DArray of HelixS*
66   
67    void     Dump       ( int        all );
68};
69
70// -----------------------------------------------------------------------------
71//  Funktionen
72// -----------------------------------------------------------------------------
73
74extern  int     intcmp      ( const void    *a,
75                              const void    *b);
76
77extern  int     hmatchcmp   ( const void    *a,
78                              const void    *b);
79
80extern  void    hmatchdump  ( vp    val );
81
82// -----------------------------------------------------------------------------
83
84#endif
85
86// -----------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.