1 /* @include ajseqread *********************************************************
2 **
3 ** AJAX sequence reading functions
4 **
5 ** These functions control all aspects of AJAX sequence reading
6 **
7 ** @author Copyright (C) 2001 Peter Rice
8 ** @version $Revision: 1.50 $
9 ** @modified 2001-2011 pmr
10 ** @modified $Date: 2011/10/18 14:23:40 $ by $Author: rice $
11 ** @@
12 **
13 ** This library is free software; you can redistribute it and/or
14 ** modify it under the terms of the GNU Lesser General Public
15 ** License as published by the Free Software Foundation; either
16 ** version 2.1 of the License, or (at your option) any later version.
17 **
18 ** This library is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 ** Lesser General Public License for more details.
22 **
23 ** You should have received a copy of the GNU Lesser General Public
24 ** License along with this library; if not, write to the Free Software
25 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 ** MA  02110-1301,  USA.
27 **
28 ******************************************************************************/
29 
30 #ifndef AJSEQREAD_H
31 #define AJSEQREAD_H
32 
33 /* ========================================================================= */
34 /* ============================= include files ============================= */
35 /* ========================================================================= */
36 
37 #include "ajdefine.h"
38 #include "ajstr.h"
39 #include "ajlist.h"
40 #include "ajfile.h"
41 #include "ajseqdata.h"
42 
43 AJ_BEGIN_DECLS
44 
45 
46 
47 
48 /* ========================================================================= */
49 /* =============================== constants =============================== */
50 /* ========================================================================= */
51 
52 
53 
54 
55 /* ========================================================================= */
56 /* ============================== public data ============================== */
57 /* ========================================================================= */
58 
59 extern AjPTable seqDbMethods;
60 
61 
62 
63 
64 /* ========================================================================= */
65 /* =========================== public functions ============================ */
66 /* ========================================================================= */
67 
68 
69 
70 
71 /*
72 ** Prototype definitions
73 */
74 
75 AjPTable     ajSeqaccessGetDb(void);
76 AjBool       ajSeqaccessMethodTest(const AjPStr method);
77 const char*  ajSeqaccessMethodGetQlinks(const AjPStr method);
78 ajuint       ajSeqaccessMethodGetScope(const AjPStr method);
79 AjPSeqall    ajSeqallFile(const AjPStr usa);
80 AjBool       ajSeqAllRead(AjPSeq thys, AjPSeqin seqin);
81 AjBool       ajSeqGetFromUsa(const AjPStr thys, AjBool protein, AjPSeq seq);
82 AjBool       ajSeqGetFromUsaRange(const AjPStr thys, AjBool protein,
83                                   ajint ibegin, ajint iend, AjPSeq seq);
84 AjBool       ajSeqFormatTest(const AjPStr format);
85 void         ajSeqinClear(AjPSeqin thys);
86 void         ajSeqinClearPos(AjPSeqin thys);
87 void         ajSeqinDel(AjPSeqin* pthis);
88 AjPSeqin     ajSeqinNew(void);
89 AjPSeqin     ajSeqinNewQueryC(const char* qrytxt);
90 AjPSeqin     ajSeqinNewQueryS(const AjPStr qry);
91 void         ajSeqinSetNuc(AjPSeqin seqin);
92 void         ajSeqinSetProt(AjPSeqin seqin);
93 void         ajSeqinSetRange(AjPSeqin seqin, ajint ibegin, ajint iend);
94 void         ajSeqinUsa(AjPSeqin* pthis, const AjPStr Usa);
95 void         ajSeqinTrace(const AjPSeqin thys);
96 const char*  ajSeqinTypeGetFields(void);
97 const char*  ajSeqinTypeGetQlinks(void);
98 
99 AjBool       ajSeqParseFasta(const AjPStr str, AjPStr* id, AjPStr* acc,
100                              AjPStr* sv, AjPStr* desc);
101 AjBool       ajSeqParseFastq(const AjPStr str, AjPStr* id, AjPStr* desc);
102 AjBool       ajSeqParseNcbi(const AjPStr str, AjPStr* id, AjPStr* acc,
103                             AjPStr* sv, AjPStr* gi, AjPStr* db, AjPStr* desc);
104 void         ajSeqPrintInFormat(AjPFile outf, AjBool full);
105 void         ajSeqPrintbookInFormat(AjPFile outf);
106 void         ajSeqPrinthtmlInFormat(AjPFile outf);
107 void         ajSeqPrintwikiInFormat(AjPFile outf);
108 AjBool       ajSeqRead(AjPSeq thys, AjPSeqin seqin);
109 void         ajSeqReadExit(void);
110 ajint        ajSeqsetApp(AjPSeqset thys, const AjPSeq seq);
111 AjBool       ajSeqsetGetFromUsa(const AjPStr thys, AjPSeqset *seq);
112 AjBool       ajSeqsetFromList(AjPSeqset thys, const AjPList list);
113 ajint        ajSeqsetFromPair(AjPSeqset thys,
114                               const AjPSeq seqa, const AjPSeq seqb);
115 AjBool       ajSeqsetallRead(AjPList thys, AjPSeqin seqin);
116 AjBool       ajSeqsetRead(AjPSeqset thys, AjPSeqin seqin);
117 AjBool       ajSeqUsaGetBase(const AjPStr usa, AjPStr* baseusa);
118 AjBool       ajSeqinformatTerm(const AjPStr term);
119 AjBool       ajSeqinformatTest(const AjPStr format);
120 
121 /*
122 ** End of prototype definitions
123 */
124 
125 
126 
127 
128 #ifdef AJ_COMPILE_DEPRECATED_BOOK
129 #endif /* AJ_COMPILE_DEPRECATED_BOOK */
130 
131 #ifdef AJ_COMPILE_DEPRECATED
132 
133 __deprecated AjBool       ajSeqMethodTest(const AjPStr method);
134 __deprecated ajuint       ajSeqMethodGetScope(const AjPStr method);
135 
136 #endif /* AJ_COMPILE_DEPRECATED */
137 
138 
139 
140 
141 AJ_END_DECLS
142 
143 #endif /* !AJSEQREAD_H */
144