/usr/lib/emboss/include/ajdomain.h is in emboss-lib 6.3.1-6ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | /****************************************************************************
**
** @source ajdomain.h
**
** AJAX objects for handling protein domain data.
** Scop, Cath and Domain objects.
**
** @author: Copyright (C) 2004 Jon Ison (jison@hgmp.mrc.ac.uk)
** @version 1.0
** @@
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Library General Public
** License as published by the Free Software Foundation; either
** version 2 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Library General Public License for more details.
**
** You should have received a copy of the GNU Library General Public
** License along with this library; if not, write to the
** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
** Boston, MA 02111-1307, USA.
****************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef ajdomain_h
#define ajdomain_h
/* @data AjPScop ************************************************************
**
** Ajax scop object.
**
** Holds scop database data
**
** AjPScop is implemented as a pointer to a C data structure.
**
**
**
** @alias AjSScop
** @alias AjOScop
**
**
**
** @attr Entry [AjPStr] Domain identifier code.
** @attr Pdb [AjPStr] Corresponding pdb identifier code.
** @attr Class [AjPStr] SCOP class name as an AjPStr.
** @attr Fold [AjPStr] SCOP fold name as an AjPStr.
** @attr Superfamily [AjPStr] SCOP superfamily name as an AjPStr.
** @attr Family [AjPStr] SCOP family name as an AjPStr.
** @attr Domain [AjPStr] SCOP domain name as an AjPStr.
** @attr Source [AjPStr] SCOP source (species) as an AjPStr.
** @attr Chain [char*] Chain identifiers.
** @attr Start [AjPStr*] PDB residue number of first residue in
** domain.
** @attr End [AjPStr*] PDB residue number of last residue in
** domain.
** @attr Sse [AjPStr] Secondary structure element map
** @attr Sss [AjPStr] Secondary structure element string
** @attr N [ajint] No. chains from which this domain is
** comprised.
** @attr Sunid_Class [ajint] SCOP sunid for class.
** @attr Sunid_Fold [ajint] SCOP sunid for fold.
** @attr Sunid_Superfamily [ajint] SCOP sunid for superfamily.
** @attr Sunid_Family [ajint] SCOP sunid for family.
** @attr Sunid_Domain [ajint] SCOP sunid for domain.
** @attr Sunid_Source [ajint] SCOP sunid for species.
** @attr Sunid_Domdat [ajint] SCOP sunid for domain data.
**
** @attr Acc [AjPStr] Accession number of sequence entry.
** @attr Spr [AjPStr] Swissprot code of sequence entry.
** @attr SeqPdb [AjPStr] Sequence (from PDB) as string.
** @attr SeqSpr [AjPStr] Sequence (from swissprot) as string.
** @attr Startd [ajint] Start of sequence relative to full
** length swissprot sequence.
** @attr Endd [ajint] End of sequence relative to full length
** swissprot sequence.
** @attr Score [float] Used by misc. algorithms for scoring the domain.
** @attr Padding [char[4]] Padding to alignment boundary
**
**
**
** @new ajScopNew Scop default constructor.
** @new ajScopReadNew Scop constructor from reading DCF format file.
** @new ajScopReadCNew Scop constructor from reading DCF format file.
** @delete ajScopDel Default Scop destructor.
** @assign ajScopCopy Replicates a Scop object.
** @use ajScopMatchSunid Sort Scop objects by Sunid_Family element.
** @use ajScopMatchScopid Sort Scop objects by Entry element.
** @use ajScopMatchPdbId Sort Scop objects by Pdb element.
** @use embScopToPdbid Read a scop identifier code and writes the
** equivalent PDB identifier code.
** @use embScopToSp Read a scop identifier code and writes the
** equivalent swissprot identifier code.
** @use embScopToAcc Read a scop identifier code and writes the
** equivalent accession number.
** @use ajScopArrFindScopid Binary search for Entry element over array
** of Scop objects.
** @use ajScopArrFindSunid Binary search for Sunid_Family element over
** array of Scop objects.
** @use ajScopArrFindPdbid Binary search for Pdb element over array of
** Scop objects.
** @new ajScopReadAllNew Construct list of Scop objects from reading DCF
** format file.
** @new ajScopReadAllRawNew Construct list of Scop objects from reading
** raw SCOP parsable files.
** @output ajScopWrite Write Scop object to DCF format file.
** @output ajPdbWriteDomain Writes a CCF format file for a SCOP domain.
** @output ajPdbWriteDomainRaw Writes a PDB-format file for a SCOP domain.
** @output ajPdbWriteDomainRecordRaw Writes lines to a PDB format file for
** a domain.
**
** @@
****************************************************************************/
typedef struct AjSScop
{
AjPStr Entry;
AjPStr Pdb;
AjPStr Class;
AjPStr Fold;
AjPStr Superfamily;
AjPStr Family;
AjPStr Domain;
AjPStr Source;
char *Chain;
AjPStr *Start;
AjPStr *End;
AjPStr Sse;
AjPStr Sss;
ajint N;
ajint Sunid_Class;
ajint Sunid_Fold;
ajint Sunid_Superfamily;
ajint Sunid_Family;
ajint Sunid_Domain;
ajint Sunid_Source;
ajint Sunid_Domdat;
AjPStr Acc;
AjPStr Spr;
AjPStr SeqPdb;
AjPStr SeqSpr;
ajint Startd;
ajint Endd;
float Score;
char Padding[4];
} AjOScop;
#define AjPScop AjOScop*
/* @data AjPCath ************************************************************
**
** Ajax cath object
**
** Holds cath database data
**
** AjPScop is implemented as a pointer to a C data structure.
**
**
**
** @alias AjSCath
** @alias AjOCath
**
**
**
** @attr DomainID [AjPStr] Domain identifier code
** @attr Pdb [AjPStr] Corresponding PDB identifier code
** @attr Class [AjPStr] CATH class name as an AjPStr
** @attr Architecture [AjPStr] CATH architecture name as an AjPStr
** @attr Topology [AjPStr] CATH topology name as an AjPStr
** @attr Superfamily [AjPStr] CATH homologous superfamily name as an AjPStr
** @attr Length [ajint] No. of residues in domain
** @attr NSegment [ajint] No. of chain segments domain is comprised of
** @attr Start [AjPStr*] PDB residue number of 1st residue in segment
** @attr End [AjPStr*] PDB residue number of last residue in segment
** @attr Class_Id [ajint] CATH class no. as an ajint
** @attr Arch_Id [ajint] CATH architecture no.as an ajint
** @attr Topology_Id [ajint] CATH topology no. as an ajint
** @attr Superfamily_Id [ajint] CATH superfamily no. as an ajint
** @attr Family_Id [ajint] CATH family no. as an ajint
** @attr NIFamily_Id [ajint] CATH near identical family no. as an ajint
**
** @attr Acc [AjPStr] Accession number of sequence entry.
** @attr Spr [AjPStr] Swissprot code of sequence entry.
** @attr SeqPdb [AjPStr] Sequence (from PDB) as string.
** @attr SeqSpr [AjPStr] Sequence (from swissprot) as string.
** @attr IFamily_Id [ajint] CATH identical family no. as an ajint
**
** @attr Startd [ajint] Start of sequence relative to full
** length swissprot sequence.
** @attr Endd [ajint] End of sequence relative to full length
** swissprot sequence.
** @attr Chain [char] Chain identifier
** @attr Padding [char[3]] Padding to alignment boundary
**
**
** @new ajCathNew Default Cath constructor
** @new ajCathReadCNew Cath constructor from reading DCF format file.
** @new ajCathReadNew Cath constructor from reading DCF format file.
** @delete ajCathDel Default Cath destructor
** @assign ajCathCopy Replicates a Scop object.
** @use ajCathArrFindPdbid Binary search for Pdb element over array of
** Cath objects.
** @use ajCathMatchPdbId Sort Cath objects by Pdb element.
** @new ajCathReadAllNew Construct list of Cath objects from reading DCF
** format file.
** @new ajCathReadAllRawNew Construct list of Cath objects from reading
** raw CATH parsable files.
** @other ajCathWrite Write Cath object to DCF format file.
**
** @@
****************************************************************************/
typedef struct AjSCath
{
AjPStr DomainID;
AjPStr Pdb;
AjPStr Class;
AjPStr Architecture;
AjPStr Topology;
AjPStr Superfamily;
ajint Length;
ajint NSegment;
AjPStr *Start;
AjPStr *End;
ajint Class_Id;
ajint Arch_Id;
ajint Topology_Id;
ajint Superfamily_Id;
ajint Family_Id;
ajint NIFamily_Id;
AjPStr Acc;
AjPStr Spr;
AjPStr SeqPdb;
AjPStr SeqSpr;
ajint IFamily_Id;
ajint Startd;
ajint Endd;
char Chain;
char Padding[3];
} AjOCath;
#define AjPCath AjOCath*
/* @data AjPDomain ************************************************************
**
** Ajax Domain object.
**
** Holds an entry from a DCF file (domain classification file)
**
** AjPDomain is implemented as a pointer to a C data structure.
**
**
**
** @alias AjSDomain
** @alias AjODomain
**
**
**
** @attr Scop [AjPScop] Scop object pointer.
** @attr Cath [AjPCath] Cath object pointer.
** @attr Type [ajint] Type, either ajSCOP (1) or ajCATH (2).
** @attr Padding [char[4]] Padding to alignment boundary
**
**
**
** @new ajDomainNew Default Domain constructor.
** @new ajDomainReadNew Domain constructor from reading DCF format file.
** @new ajDomainReadCNew Domain constructor from reading DCF format file.
** @new ajDomainReadAllNew Construct list of Domain objects from reading DCF
** format file.
** @delete ajDomainDel Default Domain destructor.
** @output ajDomainWrite Write Domain object to DCF format file.
** @other ajDomainDCFType Ascertains type of domains (ajSCOP or ajCATH) in a
** DCF file.
** @assign ajDomainCopy Replicates a Domain object.
** @cast ajDomainGetId Returns domain id, either DomainID element
** (Cath object) or Entry (Scop object).
** @cast ajDomainGetSeqPdb Returns the PDB sequence from a Domain object.
** @cast ajDomainGetSeqSpr Returns the swissprot sequence from a
** Domain object.
** @cast ajDomainGetPdb Returns the PDB identifier code corresponding to the
** domain
** @cast ajDomainGetAcc Returns the accession number corresponding to the
** domain.
** @cast ajDomainGetSpr Returns the swissprot code corresponding to the
** domain.
** @cast ajDomainGetN Returns no. chains or chain segments in a domain,
** either NSegment element (Cath domains) or N element (Scop domains).
**
**
**
** @@
****************************************************************************/
typedef struct AjSDomain
{
AjPScop Scop;
AjPCath Cath;
ajint Type;
char Padding[4];
} AjODomain;
#define AjPDomain AjODomain*
/* ======================================================================= */
/* =========================== Scop object =============================== */
/* ======================================================================= */
/*
** Prototype definitions
*/
void ajDomainDummyFunction(void);
AjPScop ajScopNew(ajint n);
void ajScopDel(AjPScop *ptr);
AjBool ajScopCopy(AjPScop *to, const AjPScop from);
ajint ajScopArrFindScopid( AjPScop const *arr, ajint siz, const AjPStr id);
ajint ajScopArrFindSunid(AjPScop const *arr, ajint siz, ajint id);
ajint ajScopArrFindPdbid(AjPScop const *arr, ajint siz, const AjPStr id);
ajint ajScopMatchScopid(const void *hit1, const void *hit2);
ajint ajScopMatchPdbId(const void *hit1, const void *hit2);
ajint ajScopMatchSunid(const void *entry1, const void *entry2);
AjPScop ajScopReadCNew(AjPFile inf, const char *entry);
AjPScop ajScopReadNew(AjPFile inf, const AjPStr entry);
AjPList ajScopReadAllNew(AjPFile inf);
AjPList ajScopReadAllRawNew(AjPFile claf, AjPFile desf, AjBool omit);
AjBool ajScopWrite(AjPFile outf, const AjPScop obj);
AjBool ajPdbWriteDomain(AjPFile outf, const AjPPdb pdb,
const AjPScop scop, AjPFile errf);
/* ======================================================================= */
/* =========================== Cath object =============================== */
/* ======================================================================= */
AjPCath ajCathNew(ajint n);
void ajCathDel(AjPCath *ptr);
AjBool ajCathCopy(AjPCath *to, const AjPCath from);
ajint ajCathArrFindPdbid(AjPCath const *arr, ajint siz, const AjPStr id);
ajint ajCathMatchPdbId(const void *hit1, const void *hit2);
AjPCath ajCathReadCNew(AjPFile inf, const char *entry);
AjPCath ajCathReadNew(AjPFile inf, const AjPStr entry);
AjPList ajCathReadAllNew(AjPFile inf);
AjPList ajCathReadAllRawNew(AjPFile cathf, AjPFile domf,
AjPFile namesf, AjPFile flog);
AjBool ajCathWrite(AjPFile outf, const AjPCath obj);
/* ======================================================================= */
/* =========================== Domain object ============================= */
/* ======================================================================= */
AjPDomain ajDomainNew(ajint n, ajint type);
AjPDomain ajDomainReadNew(AjPFile inf, const AjPStr entry);
AjPDomain ajDomainReadCNew(AjPFile inf, const char *entry, ajint type);
AjPList ajDomainReadAllNew(AjPFile inf);
void ajDomainDel(AjPDomain *ptr);
AjBool ajDomainWrite(AjPFile outf, const AjPDomain obj);
ajint ajDomainDCFType(AjPFile inf);
AjBool ajDomainCopy(AjPDomain *to, const AjPDomain from);
AjPStr ajDomainGetId(const AjPDomain obj);
AjPStr ajDomainGetSeqPdb(const AjPDomain obj);
AjPStr ajDomainGetSeqSpr(const AjPDomain obj);
AjPStr ajDomainGetPdb(const AjPDomain obj);
AjPStr ajDomainGetAcc(const AjPDomain obj);
AjPStr ajDomainGetSpr(const AjPDomain obj);
ajint ajDomainGetN(const AjPDomain obj);
void ajDomainExit(void);
/*
** End of prototype definitions
*/
/******************************************************************************
**
** Macros for returning elements from an instance of a
**
** Domain object
**
******************************************************************************/
#define DOMAIN_S_Entry (ptr) ptr->Scop->Entry
#define DOMAIN_S_Pdb (ptr) ptr->Scop->Pdb
#define DOMAIN_S_Class (ptr) ptr->Scop->Class
#define DOMAIN_S_Fold (ptr) ptr->Scop->Fold
#define DOMAIN_S_Superfamily (ptr) ptr->Scop->Superfamily
#define DOMAIN_S_Family (ptr) ptr->Scop->Family
#define DOMAIN_S_Sunid_Class (ptr) ptr->Scop->Sunid_Class
#define DOMAIN_S_Sunid_Fold (ptr) ptr->Scop->Sunid_Fold
#define DOMAIN_S_Sunid_Superfamily (ptr) ptr->Scop->Sunid_Superfamily
#define DOMAIN_S_Sunid_Family (ptr) ptr->Scop->Sunid_Family
#define DOMAIN_S_Acc (ptr) ptr->Scop->Acc
#define DOMAIN_S_Spr (ptr) ptr->Scop->Spr
#define DOMAIN_S_SeqPdb (ptr) ptr->Scop->SeqPdb
#define DOMAIN_S_SeqSpr (ptr) ptr->Scop->SeqSpr
/* #define DOMAIN_S_ (ptr) ptr->Scop-> */
#endif
#ifdef __cplusplus
}
#endif
|