cawlign 0.0.1
Codon-aware pairwise sequence alignment
Loading...
Searching...
No Matches
alignment.h
1/*
2
3 HyPhy - Hypothesis Testing Using Phylogenies.
4
5 Copyright (C) 1997-now
6 Core Developers:
7 Sergei L Kosakovsky Pond (spond@ucsd.edu)
8 Art FY Poon (apoon42@uwo.ca)
9 Steven Weaver (sweaver@ucsd.edu)
10
11 Module Developers:
12 Lance Hepler (nlhepler@gmail.com)
13 Martin Smith (martin.audacis@gmail.com)
14
15 Significant contributions from:
16 Spencer V Muse (muse@stat.ncsu.edu)
17 Simon DW Frost (sdf22@cam.ac.uk)
18
19 Permission is hereby granted, free of charge, to any person obtaining a
20 copy of this software and associated documentation files (the
21 "Software"), to deal in the Software without restriction, including
22 without limitation the rights to use, copy, modify, merge, publish,
23 distribute, sublicense, and/or sell copies of the Software, and to
24 permit persons to whom the Software is furnished to do so, subject to
25 the following conditions:
26
27 The above copyright notice and this permission notice shall be included
28 in all copies or substantial portions of the Software.
29
30 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
31 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
34 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
35 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
36 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37
38 */
39
40#ifndef __ALIGNMENT_HEADER_FILE__
41
42#define __ALIGNMENT_HEADER_FILE__
43
44typedef float cawlign_fp;
45
46cawlign_fp AlignStrings( char const * r_str
47 , char const * q_str
48 , const long _r_len
49 , const long _q_len
50 , char * & r_res
51 , char * & q_res
52 , long * char_map
53 , const cawlign_fp * cost_matrix
54 , const long cost_stride
55 , const char gap
56 , cawlign_fp open_insertion
57 , cawlign_fp extend_insertion
58 , cawlign_fp open_deletion
59 , cawlign_fp extend_deletion
60 , cawlign_fp miscall_cost
61 , const bool do_local
62 , const bool do_affine
63 , const bool do_codon
64 , const long char_count
65 , const cawlign_fp * codon3x5
66 , const cawlign_fp * codon3x4
67 , const cawlign_fp * codon3x2
68 , const cawlign_fp * codon3x1
69 , const bool do_true_local = false
70 , const bool report_ref_insertions = true
71 , cawlign_fp* score_matrix_cache = nullptr
72 , cawlign_fp* insertion_matrix_cache = nullptr
73 , cawlign_fp* deletion_matrix_cache = nullptr
74 );
75
76cawlign_fp LinearSpaceAlign( const char * s1 // first string
77 , const char * s2 // second string
78 , const long s1L
79 , const long s2L
80 , long* cmap // char -> position in scoring matrix mapper
81 , const cawlign_fp * ccost // NxN matrix of edit distances on characters
82 , const long costD
83 , cawlign_fp gopen // the cost of opening a gap in sequence 1
84 , cawlign_fp gextend // the cost of extending a gap in sequence 1 (ignored unless doAffine == true)
85 , cawlign_fp gopen2 // the cost of opening a gap in sequence 2
86 , cawlign_fp gextend2 // the cost of opening a gap in sequence 2 (ignored unless doAffine == true)
87 , bool doLocal // ignore prefix and suffix gaps
88 , bool doAffine // use affine gap penalties
89 , long * ops // edit operations for the optimal alignment
90 , cawlign_fp scoreCheck // check the score of the alignment
91 , long from1
92 , long to1
93 , long from2
94 , long to2
95 , cawlign_fp ** buffer // matrix storage,
96 , char parentGapLink
97 , char * ha
98 );
99
100#endif