1 /* @include enstranslation **************************************************** 2 ** 3 ** Ensembl Translation functions 4 ** 5 ** @author Copyright (C) 1999 Ensembl Developers 6 ** @author Copyright (C) 2006 Michael K. Schuster 7 ** @version $Revision: 1.30 $ 8 ** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core 9 ** @modified $Date: 2013/02/17 13:10:30 $ 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 ENSTRANSLATION_H 30 #define ENSTRANSLATION_H 31 32 /* ========================================================================= */ 33 /* ============================= include files ============================= */ 34 /* ========================================================================= */ 35 36 #include "ensdata.h" 37 #include "ensprotein.h" 38 39 AJ_BEGIN_DECLS 40 41 42 43 44 /* ========================================================================= */ 45 /* =============================== constants =============================== */ 46 /* ========================================================================= */ 47 48 49 50 51 /* ========================================================================= */ 52 /* ============================== public data ============================== */ 53 /* ========================================================================= */ 54 55 56 57 58 /* ========================================================================= */ 59 /* =========================== public functions ============================ */ 60 /* ========================================================================= */ 61 62 /* 63 ** Prototype definitions 64 */ 65 66 void ensTranslationInit(void); 67 68 void ensTranslationExit(void); 69 70 const AjPTrn ensTranslationCacheGet(ajint codontable); 71 72 /* Ensembl Translation */ 73 74 EnsPTranslation ensTranslationNewCpy(const EnsPTranslation translation); 75 76 EnsPTranslation ensTranslationNewIni(EnsPTranslationadaptor tla, 77 ajuint identifier, 78 EnsPExon startexon, 79 EnsPExon endexon, 80 ajuint start, 81 ajuint end, 82 AjPStr sequence, 83 AjPStr stableid, 84 ajuint version, 85 AjPStr cdate, 86 AjPStr mdate); 87 88 EnsPTranslation ensTranslationNewRef(EnsPTranslation translation); 89 90 void ensTranslationDel(EnsPTranslation *Ptranslation); 91 92 EnsPTranslationadaptor ensTranslationGetAdaptor( 93 const EnsPTranslation translation); 94 95 AjPStr ensTranslationGetDateCreation(const EnsPTranslation translation); 96 97 AjPStr ensTranslationGetDateModification(const EnsPTranslation translation); 98 99 ajuint ensTranslationGetEnd(const EnsPTranslation translation); 100 101 EnsPExon ensTranslationGetEndexon(const EnsPTranslation translation); 102 103 ajuint ensTranslationGetIdentifier(const EnsPTranslation translation); 104 105 AjPStr ensTranslationGetStableidentifier(const EnsPTranslation translation); 106 107 ajuint ensTranslationGetStart(const EnsPTranslation translation); 108 109 EnsPExon ensTranslationGetStartexon(const EnsPTranslation translation); 110 111 ajuint ensTranslationGetVersion(const EnsPTranslation translation); 112 113 const AjPList ensTranslationLoadAttributes(EnsPTranslation translation); 114 115 const AjPList ensTranslationLoadDatabaseentries(EnsPTranslation translation); 116 117 const AjPList ensTranslationLoadProteinfeatures(EnsPTranslation translation); 118 119 AjBool ensTranslationSetAdaptor(EnsPTranslation translation, 120 EnsPTranslationadaptor tla); 121 122 AjBool ensTranslationSetIdentifier(EnsPTranslation translation, 123 ajuint identifier); 124 125 AjBool ensTranslationSetStartexon(EnsPTranslation translation, 126 EnsPExon exon); 127 128 AjBool ensTranslationSetEndexon(EnsPTranslation translation, 129 EnsPExon exon); 130 131 AjBool ensTranslationSetStart(EnsPTranslation translation, 132 ajuint start); 133 134 AjBool ensTranslationSetEnd(EnsPTranslation translation, 135 ajuint end); 136 137 AjBool ensTranslationSetStableidentifier(EnsPTranslation translation, 138 AjPStr stableid); 139 140 AjBool ensTranslationSetVersion(EnsPTranslation translation, 141 ajuint version); 142 143 AjBool ensTranslationSetDateCreation(EnsPTranslation translation, 144 AjPStr cdate); 145 146 AjBool ensTranslationSetDateModification(EnsPTranslation translation, 147 AjPStr mdate); 148 149 AjBool ensTranslationAddAttribute(EnsPTranslation translation, 150 EnsPAttribute attribute); 151 152 AjBool ensTranslationAddDatabaseentry(EnsPTranslation translation, 153 EnsPDatabaseentry dbe); 154 155 AjBool ensTranslationAddProteinfeature(EnsPTranslation translation, 156 EnsPProteinfeature pf); 157 158 size_t ensTranslationCalculateMemsize(const EnsPTranslation translation); 159 160 ajint ensTranslationCalculateSliceEnd(EnsPTranslation translation); 161 162 ajint ensTranslationCalculateSliceStart(EnsPTranslation translation); 163 164 ajuint ensTranslationCalculateTranscriptEnd(EnsPTranslation translation); 165 166 ajuint ensTranslationCalculateTranscriptStart(EnsPTranslation translation); 167 168 AjBool ensTranslationFetchAllAttributes(EnsPTranslation translation, 169 const AjPStr code, 170 AjPList attributes); 171 172 AjBool ensTranslationFetchAllDatabaseentries(EnsPTranslation translation, 173 const AjPStr name, 174 EnsEExternaldatabaseType type, 175 AjPList dbes); 176 177 AjBool ensTranslationFetchAllDomains(EnsPTranslation translation, 178 AjPList pfs); 179 180 AjBool ensTranslationFetchAllProteinfeatures(EnsPTranslation translation, 181 const AjPStr name, 182 AjPList pfs); 183 184 AjBool ensTranslationFetchAllSequenceedits(EnsPTranslation translation, 185 AjPList ses); 186 187 AjBool ensTranslationFetchDisplayidentifier(const EnsPTranslation translation, 188 AjPStr *Pidentifier); 189 190 AjBool ensTranslationTrace(const EnsPTranslation translation, ajuint level); 191 192 AjBool ensTranslationFetchSequenceSeq(EnsPTranslation translation, 193 AjPSeq *Psequence); 194 195 AjBool ensTranslationFetchSequenceStr(EnsPTranslation translation, 196 AjPStr *Psequence); 197 198 /* Ensembl Translation Adaptor */ 199 200 EnsPTranslationadaptor ensRegistryGetTranslationadaptor( 201 EnsPDatabaseadaptor dba); 202 203 EnsPTranslationadaptor ensTranslationadaptorNew( 204 EnsPDatabaseadaptor dba); 205 206 void ensTranslationadaptorDel(EnsPTranslationadaptor *Ptla); 207 208 EnsPBaseadaptor ensTranslationadaptorGetBaseadaptor( 209 EnsPTranslationadaptor tla); 210 211 EnsPDatabaseadaptor ensTranslationadaptorGetDatabaseadaptor( 212 EnsPTranslationadaptor tla); 213 214 AjBool ensTranslationadaptorFetchAllbyExternaldatabasename( 215 EnsPTranslationadaptor tla, 216 const AjPStr dbname, 217 AjPList translations); 218 219 AjBool ensTranslationadaptorFetchAllbyExternalname( 220 EnsPTranslationadaptor tla, 221 const AjPStr name, 222 const AjPStr dbname, 223 AjBool override, 224 AjPList translations); 225 226 AjBool ensTranslationadaptorFetchAllbyIdentifiers( 227 EnsPTranslationadaptor tla, 228 AjPTable translations); 229 230 AjBool ensTranslationadaptorFetchAllbyTranscript( 231 EnsPTranslationadaptor tla, 232 EnsPTranscript transcript); 233 234 AjBool ensTranslationadaptorFetchByIdentifier( 235 EnsPTranslationadaptor tla, 236 ajuint identifier, 237 EnsPTranslation *Ptranslation); 238 239 AjBool ensTranslationadaptorFetchByStableidentifier( 240 EnsPTranslationadaptor tla, 241 const AjPStr stableid, 242 ajuint version, 243 EnsPTranslation *Ptranslation); 244 245 AjBool ensTranslationadaptorFetchByTranscript(EnsPTranslationadaptor tla, 246 EnsPTranscript transcript); 247 248 AjBool ensTranslationadaptorFetchAllbyTranscriptsList( 249 EnsPTranslationadaptor tla, 250 AjPList transcripts); 251 252 AjBool ensTranslationadaptorFetchAllbyTranscriptsTable( 253 EnsPTranslationadaptor tla, 254 AjPTable transcripts); 255 256 AjBool ensTranslationadaptorRetrieveAllIdentifiers( 257 EnsPTranslationadaptor tla, 258 AjPList identifiers); 259 260 AjBool ensTranslationadaptorRetrieveAllStableidentifiers( 261 EnsPTranslationadaptor tla, 262 AjPList stableids); 263 264 /* 265 ** End of prototype definitions 266 */ 267 268 269 270 271 AJ_END_DECLS 272 273 #endif /* !ENSTRANSLATION_H */ 274