1 /* @include enssequence ******************************************************* 2 ** 3 ** Ensembl Sequence functions 4 ** 5 ** @author Copyright (C) 1999 Ensembl Developers 6 ** @author Copyright (C) 2006 Michael K. Schuster 7 ** @version $Revision: 1.15 $ 8 ** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core 9 ** @modified $Date: 2012/08/05 11:28:48 $ by $Author: mks $ 10 ** @@ 11 ** 12 ** This library is free software; you can redistribute it and/or 13 ** modify it under the terms of the GNU Lesser General Public 14 ** License as published by the Free Software Foundation; either 15 ** version 2.1 of the License, or (at your option) any later version. 16 ** 17 ** This library is distributed in the hope that it will be useful, 18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 ** Lesser General Public License for more details. 21 ** 22 ** You should have received a copy of the GNU Lesser General Public 23 ** License along with this library; if not, write to the Free Software 24 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 ** MA 02110-1301, USA. 26 ** 27 ******************************************************************************/ 28 29 #ifndef ENSSEQUENCE_H 30 #define ENSSEQUENCE_H 31 32 /* ========================================================================= */ 33 /* ============================= include files ============================= */ 34 /* ========================================================================= */ 35 36 #include "ensslice.h" 37 38 AJ_BEGIN_DECLS 39 40 41 42 43 /* ========================================================================= */ 44 /* =============================== constants =============================== */ 45 /* ========================================================================= */ 46 47 48 49 50 /* ========================================================================= */ 51 /* ============================== public data ============================== */ 52 /* ========================================================================= */ 53 54 /* @data EnsPSequenceadaptor ************************************************** 55 ** 56 ** Ensembl Sequence Adaptor. 57 ** 58 ** @alias EnsSSequenceadaptor 59 ** @alias EnsOSequenceadaptor 60 ** 61 ** @attr Adaptor [EnsPDatabaseadaptor] Ensembl Database Adaptor. 62 ** @attr Cache [EnsPCache] Ensembl LRU Cache. 63 ** @@ 64 ******************************************************************************/ 65 66 typedef struct EnsSSequenceadaptor 67 { 68 EnsPDatabaseadaptor Adaptor; 69 EnsPCache Cache; 70 } EnsOSequenceadaptor; 71 72 #define EnsPSequenceadaptor EnsOSequenceadaptor* 73 74 75 76 77 /* ========================================================================= */ 78 /* =========================== public functions ============================ */ 79 /* ========================================================================= */ 80 81 /* 82 ** Prototype definitions 83 */ 84 85 /* Ensembl Sequence Adaptor */ 86 87 EnsPSequenceadaptor ensRegistryGetSequenceadaptor( 88 EnsPDatabaseadaptor dba); 89 90 EnsPSequenceadaptor ensSequenceadaptorNew( 91 EnsPDatabaseadaptor dba); 92 93 void ensSequenceadaptorDel(EnsPSequenceadaptor *Psqa); 94 95 AjBool ensSequenceadaptorCacheClear(EnsPSequenceadaptor sqa); 96 97 EnsPDatabaseadaptor ensSequenceadaptorGetDatabaseadaptor( 98 EnsPSequenceadaptor sqa); 99 100 AjBool ensSequenceadaptorFetchSeqregionAllSeq(EnsPSequenceadaptor sqa, 101 const EnsPSeqregion sr, 102 AjPSeq *Psequence); 103 104 AjBool ensSequenceadaptorFetchSeqregionAllStr(EnsPSequenceadaptor sqa, 105 const EnsPSeqregion sr, 106 AjPStr *Psequence); 107 108 AjBool ensSequenceadaptorFetchSeqregionSubSeq(EnsPSequenceadaptor sqa, 109 const EnsPSeqregion sr, 110 ajuint start, 111 ajuint length, 112 AjPSeq *Psequence); 113 114 AjBool ensSequenceadaptorFetchSeqregionSubStr(EnsPSequenceadaptor sqa, 115 const EnsPSeqregion sr, 116 ajuint start, 117 ajuint length, 118 AjPStr *Psequence); 119 120 AjBool ensSequenceadaptorFetchSliceAllSeq(EnsPSequenceadaptor sqa, 121 EnsPSlice slice, 122 AjPSeq *Psequence); 123 124 AjBool ensSequenceadaptorFetchSliceAllStr(EnsPSequenceadaptor sqa, 125 EnsPSlice slice, 126 AjPStr *Psequence); 127 128 AjBool ensSequenceadaptorFetchSliceSubSeq(EnsPSequenceadaptor sqa, 129 EnsPSlice slice, 130 ajint start, 131 ajint end, 132 ajint strand, 133 AjPSeq *Psequence); 134 135 AjBool ensSequenceadaptorFetchSliceSubStr(EnsPSequenceadaptor sqa, 136 EnsPSlice slice, 137 ajint start, 138 ajint end, 139 ajint strand, 140 AjPStr *Psequence); 141 142 /* 143 ** End of prototype definitions 144 */ 145 146 147 148 149 AJ_END_DECLS 150 151 #endif /* !ENSSEQUENCE_H */ 152