1 /* @include enskaryotype ****************************************************** 2 ** 3 ** Ensembl Karyotype Band functions 4 ** 5 ** @author Copyright (C) 1999 Ensembl Developers 6 ** @author Copyright (C) 2006 Michael K. Schuster 7 ** @version $Revision: 1.21 $ 8 ** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core 9 ** @modified $Date: 2012/08/05 11:06:37 $ 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 ENSKARYOTYPE_H 30 #define ENSKARYOTYPE_H 31 32 /* ========================================================================= */ 33 /* ============================= include files ============================= */ 34 /* ========================================================================= */ 35 36 #include "ensfeature.h" 37 38 AJ_BEGIN_DECLS 39 40 41 42 43 /* ========================================================================= */ 44 /* =============================== constants =============================== */ 45 /* ========================================================================= */ 46 47 /* @const EnsPKaryotypebandadaptor ******************************************** 48 ** 49 ** Ensembl Karyotype Band Adaptor 50 ** Defined as an alias in EnsPFeatureadaptor 51 ** 52 ** #alias EnsPFeatureadaptor 53 ** 54 ** #cc Bio::EnsEMBL::DBSQL::KaryotypeBandAdaptor 55 ** ## 56 ******************************************************************************/ 57 58 #define EnsPKaryotypebandadaptor EnsPFeatureadaptor 59 60 61 62 63 /* ========================================================================= */ 64 /* ============================== public data ============================== */ 65 /* ========================================================================= */ 66 67 /* @data EnsPKaryotypeband **************************************************** 68 ** 69 ** Ensembl Karyotype Band 70 ** 71 ** @alias EnsSKaryotypeband 72 ** @alias EnsOKaryotypeband 73 ** 74 ** @attr Use [ajuint] Use counter 75 ** @cc Bio::EnsEMBL::Storable 76 ** @attr Identifier [ajuint] Internal SQL database identifier (primary key) 77 ** @attr Adaptor [EnsPKaryotypebandadaptor] Ensembl Karyotype Band Adaptor 78 ** @cc Bio::EnsEMBL::Karyotypeband 79 ** @attr Feature [EnsPFeature] Ensembl Feature 80 ** @attr Name [AjPStr] Name 81 ** @attr Stain [AjPStr] Stain 82 ** @@ 83 ******************************************************************************/ 84 85 typedef struct EnsSKaryotypeband 86 { 87 ajuint Use; 88 ajuint Identifier; 89 EnsPKaryotypebandadaptor Adaptor; 90 EnsPFeature Feature; 91 AjPStr Name; 92 AjPStr Stain; 93 } EnsOKaryotypeband; 94 95 #define EnsPKaryotypeband EnsOKaryotypeband* 96 97 98 99 100 /* ========================================================================= */ 101 /* =========================== public functions ============================ */ 102 /* ========================================================================= */ 103 104 /* 105 ** Prototype definitions 106 */ 107 108 /* Ensembl Karyotype Band */ 109 110 EnsPKaryotypeband ensKaryotypebandNewCpy(const EnsPKaryotypeband kb); 111 112 EnsPKaryotypeband ensKaryotypebandNewIni(EnsPKaryotypebandadaptor kba, 113 ajuint identifier, 114 EnsPFeature feature, 115 AjPStr name, 116 AjPStr stain); 117 118 EnsPKaryotypeband ensKaryotypebandNewRef(EnsPKaryotypeband kb); 119 120 void ensKaryotypebandDel(EnsPKaryotypeband *Pkb); 121 122 EnsPKaryotypebandadaptor ensKaryotypebandGetAdaptor( 123 const EnsPKaryotypeband kb); 124 125 EnsPFeature ensKaryotypebandGetFeature( 126 const EnsPKaryotypeband kb); 127 128 ajuint ensKaryotypebandGetIdentifier( 129 const EnsPKaryotypeband kb); 130 131 AjPStr ensKaryotypebandGetName( 132 const EnsPKaryotypeband kb); 133 134 AjPStr ensKaryotypebandGetStain( 135 const EnsPKaryotypeband kb); 136 137 AjBool ensKaryotypebandSetAdaptor(EnsPKaryotypeband kb, 138 EnsPKaryotypebandadaptor kba); 139 140 AjBool ensKaryotypebandSetFeature(EnsPKaryotypeband kb, 141 EnsPFeature feature); 142 143 AjBool ensKaryotypebandSetIdentifier(EnsPKaryotypeband kb, 144 ajuint identifier); 145 146 AjBool ensKaryotypebandSetName(EnsPKaryotypeband kb, 147 AjPStr name); 148 149 AjBool ensKaryotypebandSetStain(EnsPKaryotypeband kb, 150 AjPStr stain); 151 152 AjBool ensKaryotypebandTrace(const EnsPKaryotypeband kb, 153 ajuint level); 154 155 size_t ensKaryotypebandCalculateMemsize(const EnsPKaryotypeband kb); 156 157 /* AJAX List of Ensembl Karyotype Band objects */ 158 159 AjBool ensListKaryotypebandSortEndAscending(AjPList kbs); 160 161 AjBool ensListKaryotypebandSortEndDescending(AjPList kbs); 162 163 AjBool ensListKaryotypebandSortIdentifierAscending(AjPList kbs); 164 165 AjBool ensListKaryotypebandSortStartAscending(AjPList kbs); 166 167 AjBool ensListKaryotypebandSortStartDescending(AjPList kbs); 168 169 /* Ensembl Karyoptype Band Adaptor */ 170 171 EnsPKaryotypebandadaptor ensRegistryGetKaryotypebandadaptor( 172 EnsPDatabaseadaptor dba); 173 174 EnsPKaryotypebandadaptor ensKaryotypebandadaptorNew( 175 EnsPDatabaseadaptor dba); 176 177 void ensKaryotypebandadaptorDel(EnsPKaryotypebandadaptor *Padaptor); 178 179 EnsPBaseadaptor ensKaryotypebandadaptorGetBaseadaptor( 180 EnsPKaryotypebandadaptor kba); 181 182 EnsPDatabaseadaptor ensKaryotypebandadaptorGetDatabaseadaptor( 183 EnsPKaryotypebandadaptor kba); 184 185 EnsPFeatureadaptor ensKaryotypebandadaptorGetFeatureadaptor( 186 EnsPKaryotypebandadaptor kba); 187 188 AjBool ensKaryotypebandadaptorFetchAllbyChromosomeband( 189 EnsPKaryotypebandadaptor adaptor, 190 const AjPStr name, 191 const AjPStr band, 192 AjPList kblist); 193 194 AjBool ensKaryotypebandadaptorFetchAllbyChromosomename( 195 EnsPKaryotypebandadaptor adaptor, 196 const AjPStr name, 197 AjPList kblist); 198 199 /* 200 ** End of prototype definitions 201 */ 202 203 204 205 206 AJ_END_DECLS 207 208 #endif /* !ENSKARYOTYPE_H */ 209