1 #ifndef DYNAMITEpairbaseseqHEADERFILE
2 #define DYNAMITEpairbaseseqHEADERFILE
3 #ifdef _cplusplus
4 extern "C" {
5 #endif
6 #include "pairbase.h"
7 #include "seqalign.h"
8 #include "complexsequence.h"
9 #include "complexevalset.h"
10 
11 
12 #define PAIRBASE_CS_CODON     0
13 #define PAIRBASE_CS_PAIRCODON 1
14 #define PAIRBASE_CS_PAIRBASE  2
15 #define PAIRBASE_CS_5SS       3
16 #define PAIRBASE_CS_3SS       4
17 #define PAIRBASE_RS_CODON     5
18 #define PAIRBASE_RS_PAIRCODON 6
19 #define PAIRBASE_RS_PAIRBASE  7
20 #define PAIRBASE_RS_5SS       8
21 #define PAIRBASE_RS_3SS       9
22 
23 #define PAIRBASE_CS_LENGTH    10
24 
25 #define CSEQ_PAIR_CODON(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_CS_CODON])
26 #define CSEQ_PAIR_PAIRCODON(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_CS_PAIRCODON])
27 #define CSEQ_PAIR_PAIRBASE(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_CS_PAIRBASE])
28 #define CSEQ_PAIR_5SS(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_CS_5SS])
29 #define CSEQ_PAIR_3SS(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_CS_3SS])
30 #define CSEQ_REV_PAIR_CODON(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_RS_CODON])
31 #define CSEQ_REV_PAIR_PAIRCODON(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_RS_PAIRCODON])
32 #define CSEQ_REV_PAIR_PAIRBASE(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_RS_PAIRBASE])
33 #define CSEQ_REV_PAIR_5SS(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_RS_5SS])
34 #define CSEQ_REV_PAIR_3SS(cseq,index) (cseq->data[index*PAIRBASE_CS_LENGTH+PAIRBASE_RS_3SS])
35 
36 
37 
38 struct Wise2_PairBaseSeq {
39     int dynamite_hard_link;
40 #ifdef PTHREAD
41     pthread_mutex_t dynamite_mutex;
42 #endif
43     char * seq;
44     int len;
45     Sequence * anchor;  /*  may not always be here */
46     SeqAlign * sa;  /*  may not always be here */
47     } ;
48 /* PairBaseSeq defined */
49 #ifndef DYNAMITE_DEFINED_PairBaseSeq
50 typedef struct Wise2_PairBaseSeq Wise2_PairBaseSeq;
51 #define PairBaseSeq Wise2_PairBaseSeq
52 #define DYNAMITE_DEFINED_PairBaseSeq
53 #endif
54 
55 
56 
57 
58     /***************************************************/
59     /* Callable functions                              */
60     /* These are the functions you are expected to use */
61     /***************************************************/
62 
63 
64 
65 /* Function:  ComplexSequence_from_PairBaseSeq(pbs,splice5,splice3)
66  *
67  * Descrip:    Makes a ComplexSeq from a PairBaseSeq
68  *
69  *
70  * Arg:            pbs [UNKN ] Undocumented argument [PairBaseSeq *]
71  * Arg:        splice5 [UNKN ] Undocumented argument [ComplexSequenceEval *]
72  * Arg:        splice3 [UNKN ] Undocumented argument [ComplexSequenceEval *]
73  *
74  * Return [UNKN ]  Undocumented return value [ComplexSequence *]
75  *
76  */
77 ComplexSequence * Wise2_ComplexSequence_from_PairBaseSeq(PairBaseSeq * pbs,ComplexSequenceEval * splice5,ComplexSequenceEval * splice3);
78 #define ComplexSequence_from_PairBaseSeq Wise2_ComplexSequence_from_PairBaseSeq
79 
80 
81 /* Function:  SeqAlign_from_PairBaseSeq(pbs)
82  *
83  * Descrip:    Makes a SeqAlign from a PairBaseSeq
84  *
85  *
86  * Arg:        pbs [UNKN ] Undocumented argument [PairBaseSeq *]
87  *
88  * Return [UNKN ]  Undocumented return value [SeqAlign *]
89  *
90  */
91 SeqAlign * Wise2_SeqAlign_from_PairBaseSeq(PairBaseSeq * pbs);
92 #define SeqAlign_from_PairBaseSeq Wise2_SeqAlign_from_PairBaseSeq
93 
94 
95 /* Function:  new_PairBaseSeq_SeqAlign(al)
96  *
97  * Descrip:    Makes a pairseq from a SeqAlign
98  *
99  *
100  * Arg:        al [UNKN ] Undocumented argument [SeqAlign *]
101  *
102  * Return [UNKN ]  Undocumented return value [PairBaseSeq *]
103  *
104  */
105 PairBaseSeq * Wise2_new_PairBaseSeq_SeqAlign(SeqAlign * al);
106 #define new_PairBaseSeq_SeqAlign Wise2_new_PairBaseSeq_SeqAlign
107 
108 
109 /* Function:  new_PairBaseSeq_strings(a,b)
110  *
111  * Descrip:    Makes a pairseq from two strings
112  *
113  *
114  * Arg:        a [UNKN ] Undocumented argument [char *]
115  * Arg:        b [UNKN ] Undocumented argument [char *]
116  *
117  * Return [UNKN ]  Undocumented return value [PairBaseSeq *]
118  *
119  */
120 PairBaseSeq * Wise2_new_PairBaseSeq_strings(char * a,char * b);
121 #define new_PairBaseSeq_strings Wise2_new_PairBaseSeq_strings
122 
123 
124 /* Function:  hard_link_PairBaseSeq(obj)
125  *
126  * Descrip:    Bumps up the reference count of the object
127  *             Meaning that multiple pointers can 'own' it
128  *
129  *
130  * Arg:        obj [UNKN ] Object to be hard linked [PairBaseSeq *]
131  *
132  * Return [UNKN ]  Undocumented return value [PairBaseSeq *]
133  *
134  */
135 PairBaseSeq * Wise2_hard_link_PairBaseSeq(PairBaseSeq * obj);
136 #define hard_link_PairBaseSeq Wise2_hard_link_PairBaseSeq
137 
138 
139 /* Function:  PairBaseSeq_alloc(void)
140  *
141  * Descrip:    Allocates structure: assigns defaults if given
142  *
143  *
144  *
145  * Return [UNKN ]  Undocumented return value [PairBaseSeq *]
146  *
147  */
148 PairBaseSeq * Wise2_PairBaseSeq_alloc(void);
149 #define PairBaseSeq_alloc Wise2_PairBaseSeq_alloc
150 
151 
152 /* Function:  free_PairBaseSeq(obj)
153  *
154  * Descrip:    Free Function: removes the memory held by obj
155  *             Will chain up to owned members and clear all lists
156  *
157  *
158  * Arg:        obj [UNKN ] Object that is free'd [PairBaseSeq *]
159  *
160  * Return [UNKN ]  Undocumented return value [PairBaseSeq *]
161  *
162  */
163 PairBaseSeq * Wise2_free_PairBaseSeq(PairBaseSeq * obj);
164 #define free_PairBaseSeq Wise2_free_PairBaseSeq
165 
166 
167   /* Unplaced functions */
168   /* There has been no indication of the use of these functions */
169 
170 
171     /***************************************************/
172     /* Internal functions                              */
173     /* you are not expected to have to call these      */
174     /***************************************************/
175 
176 #ifdef _cplusplus
177 }
178 #endif
179 
180 #endif
181