/usr/lib/emboss/include/ensmapper.h is in emboss-lib 6.6.0+dfsg-6.
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 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | /* @include ensmapper *********************************************************
**
** Ensembl Mapper functions
**
** @author Copyright (C) 1999 Ensembl Developers
** @author Copyright (C) 2006 Michael K. Schuster
** @version $Revision: 1.27 $
** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core
** @modified $Date: 2013/02/17 13:04:02 $ by $Author: mks $
** @@
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 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
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
** MA 02110-1301, USA.
**
******************************************************************************/
#ifndef ENSMAPPER_H
#define ENSMAPPER_H
/* ========================================================================= */
/* ============================= include files ============================= */
/* ========================================================================= */
#include "enscoordsystem.h"
AJ_BEGIN_DECLS
/* ========================================================================= */
/* =============================== constants =============================== */
/* ========================================================================= */
/* @enum EnsEMapperunitType ***************************************************
**
** Ensembl Mapper Unit Type enumeration
**
** @value ensEMapperunitTypeNULL Null
** @value ensEMapperunitTypeSource Source
** @value ensEMapperunitTypeTarget Target
** @@
******************************************************************************/
typedef enum EnsOMapperunitType
{
ensEMapperunitTypeNULL,
ensEMapperunitTypeSource,
ensEMapperunitTypeTarget
} EnsEMapperunitType;
/* @enum EnsEMapperresultType *************************************************
**
** Ensembl Mapper Result Type enumeration
**
** @value ensEMapperresultTypeNULL Null
** @value ensEMapperresultTypeCoordinate Coordinate
** @value ensEMapperresultTypeGap Gap
** @value ensEMapperresultTypeInDel Insertion or Deletion
** @@
******************************************************************************/
typedef enum EnsOMapperresultType
{
ensEMapperresultTypeNULL,
ensEMapperresultTypeCoordinate,
ensEMapperresultTypeGap,
ensEMapperresultTypeInDel
} EnsEMapperresultType;
/* ========================================================================= */
/* ============================== public data ============================== */
/* ========================================================================= */
/* @data EnsPMapperunit *******************************************************
**
** Ensembl Mapper Unit.
**
** One unit of an Ensembl Mapper Pair.
**
** @alias EnsSMapperunit
** @alias EnsOMapperunit
**
** @cc Bio::EnsEMBL::Mapper::Unit
** @attr Objectidentifier [ajuint] Ensembl Object identifier
** @attr Start [ajint] Start coordinate
** @attr End [ajint] End coordinate
** @attr Use [ajuint] Use counter
** @@
******************************************************************************/
typedef struct EnsSMapperunit
{
ajuint Objectidentifier;
ajint Start;
ajint End;
ajuint Use;
} EnsOMapperunit;
#define EnsPMapperunit EnsOMapperunit*
/* @data EnsPMapperpair *******************************************************
**
** Ensembl Mapper Pair.
**
** An Ensembl Mapper Pair consists of two Ensembl Mapper Unit objects.
**
** @alias EnsSMapperpair
** @alias EnsOMapperpair
**
** @cc Bio::EnsEMBL::Mapper::Pair
** @attr Source [EnsPMapperunit] Source Ensembl Mapper Unit
** @attr Target [EnsPMapperunit] Target Ensembl Mapper Unit
** @attr Orientation [ajint]
** Relative orientation of the Ensembl Mapper Unit objects
** @cc Bio::EnsEMBL::Mapper::IndelPair
** @attr Indel [AjBool] Insertion or deletion attribute
** @attr Use [ajuint] Use counter
** @attr Padding [ajuint] Padding to alignment boundary
** @@
******************************************************************************/
typedef struct EnsSMapperpair
{
EnsPMapperunit Source;
EnsPMapperunit Target;
ajint Orientation;
AjBool Indel;
ajuint Use;
ajuint Padding;
} EnsOMapperpair;
#define EnsPMapperpair EnsOMapperpair*
/* @data EnsPMapperresult *****************************************************
**
** Ensembl Mapper Result.
**
** Representation of a mapped Ensembl Object returned by an Ensembl Mapper when
** the source region maps to valid sequence.
** Depending on the Ensembl Mapper Result type member,
** this can also represent a gap.
**
** @alias EnsSMapperresult
** @alias EnsOMapperresult
**
** @attr Coordsystem [EnsPCoordsystem] Ensembl Coordinate System
** @attr Type [EnsEMapperresultType] Result type
** @cc Bio::EnsEMBL::Mapper::Coordinate
** @cc Bio::EnsEMBL::Mapper::IndelCoordinate
** @attr Objectidentifier [ajuint] Ensembl Object identifier
** @attr CoordinateStart [ajint] Coordinate start
** @attr CoordinateEnd [ajint] Coordinate end
** @attr CoordinateStrand [ajint] Coordinate strand
** @cc Bio::EnsEMBL::Mapper::Gap
** @cc Bio::EnsEMBL::Mapper::IndelCoordinate
** @attr GapStart [ajint] Start coordinate of a gap
** @attr GapEnd [ajint] End coordinate of a gap
** @attr Rank [ajuint] Rank
** @attr Use [ajuint] Use counter
** @attr Padding [ajuint] Padding to alignment boundary
** @@
**
** NOTE: This object subsumes the following Perl objects returned by the
** Bio::EnsEMBL::Mapper class.
**
** Bio::EnsEMBL::Mapper::Coordinate
** Bio::EnsEMBL::Mapper::Gap
** Bio::EnsEMBL::Mapper::IndelCoordinate
**
** The objects can be distinguished by their Ensembl Mapper Result type member.
******************************************************************************/
typedef struct EnsSMapperresult
{
EnsPCoordsystem Coordsystem;
EnsEMapperresultType Type;
ajuint Objectidentifier;
ajint CoordinateStart;
ajint CoordinateEnd;
ajint CoordinateStrand;
ajint GapStart;
ajint GapEnd;
ajuint Rank;
ajuint Use;
ajuint Padding;
} EnsOMapperresult;
#define EnsPMapperresult EnsOMapperresult*
/* @data EnsPMapperrange ******************************************************
**
** Ensembl Mapper Range.
**
** An Ensembl Mapper Range defines start and end ccordinates of genome ranges.
**
** @alias EnsSMapperrange
** @alias EnsOMapperrange
**
** @attr Start [ajint] Start coordinate
** @attr End [ajint] End coordinate
** @attr Use [ajuint] Use counter
** @attr Padding [ajuint] Padding to alignment boundary
** @@
******************************************************************************/
typedef struct EnsSMapperrange
{
ajint Start;
ajint End;
ajuint Use;
ajuint Padding;
} EnsOMapperrange;
#define EnsPMapperrange EnsOMapperrange*
/* @data EnsPMapperrangeregistry **********************************************
**
** Ensembl Mapper Range Registry.
**
** An Ensembl Mapper Range Registry maintains a table of registered regions.
**
** @alias EnsSMapperrangeregistry
** @alias EnsOMapperrangeregistry
**
** @attr Registry [AjPTable]
** First-level AJAX Table of AJAX unsigned integer
** (Ensembl Object identifier) key data and
** second-level AJAX List value data of Ensembl Mapper Range objects.
** @attr Use [ajuint] Use counter
** @attr Padding [ajuint] Padding to alignment boundary
** @@
** The Ensembl Mapper Range Registry maintains an internal list of registered
** regions and is used to quickly ascertain if and what regions of a provided
** range need registration.
******************************************************************************/
typedef struct EnsSMapperrangeregistry
{
AjPTable Registry;
ajuint Use;
ajuint Padding;
} EnsOMapperrangeregistry;
#define EnsPMapperrangeregistry EnsOMapperrangeregistry*
/* @data EnsPMapper ***********************************************************
**
** Ensembl Mapper.
**
** Generic mapper to provide coordinate transforms between two
** disjoint Ensembl Coordinate System objects.
**
** @alias EnsSMapper
** @alias EnsOMapper
**
** @cc Bio::EnsEMBL::Mapper
** @attr TypeSource [AjPStr] Source type
** @attr TypeTarget [AjPStr] Target type
** @attr CoordsystemSource [EnsPCoordsystem] Source Ensembl Coordinate System
** @attr CoordsystemTarget [EnsPCoordsystem] Target Ensembl Coordinate System
** @attr Mapperpairs [AjPTable] AJAX Table of AJAX Table objects with
** Ensembl Mapper Pair objects
** @attr Sorted [AjBool] Ensembl Mapper Pair objects are sorted
** @attr Count [ajuint] Number of Ensembl Mapper Pair objects
** @attr Use [ajuint] Use counter
** @attr Padding [ajuint] Padding to alignment boundary
** @@
** The AJAX Table Mapperpairs forms the top hierarchy of an Ensembl Mapper Pair
** cache. The AJAX Table uses the contents of the TypeSource and TypeTarget
** strings as index and holds a second hierarchy of AJAX Table objects, which
** use AJAX unsigned inetger (Ensembl Object identifier) objects as index.
** Those second-level AJAX Table objects then hold a
** third-level of AJAX List objects of Ensembl Mapper Pair objects.
******************************************************************************/
typedef struct EnsSMapper
{
AjPStr TypeSource;
AjPStr TypeTarget;
EnsPCoordsystem CoordsystemSource;
EnsPCoordsystem CoordsystemTarget;
AjPTable Mapperpairs;
AjBool Sorted;
ajuint Count;
ajuint Use;
ajuint Padding;
} EnsOMapper;
#define EnsPMapper EnsOMapper*
/* ========================================================================= */
/* =========================== public functions ============================ */
/* ========================================================================= */
/*
** Prototype definitions
*/
/* Ensembl Mapper Unit */
EnsPMapperunit ensMapperunitNewCpy(const EnsPMapperunit mu);
EnsPMapperunit ensMapperunitNewIni(ajuint oid, ajint start, ajint end);
EnsPMapperunit ensMapperunitNewRef(EnsPMapperunit mu);
void ensMapperunitDel(EnsPMapperunit *Pmu);
ajint ensMapperunitGetEnd(const EnsPMapperunit mu);
ajuint ensMapperunitGetObjectidentifier(const EnsPMapperunit mu);
ajint ensMapperunitGetStart(const EnsPMapperunit mu);
AjBool ensMapperunitSetEnd(EnsPMapperunit mu, ajint end);
AjBool ensMapperunitSetObjectidentifier(EnsPMapperunit mu, ajuint oid);
AjBool ensMapperunitSetStart(EnsPMapperunit mu, ajint start);
AjBool ensMapperunitTrace(const EnsPMapperunit mu, ajuint level);
size_t ensMapperunitCalculateMemsize(const EnsPMapperunit mu);
/* Ensembl Mapper Pair */
EnsPMapperpair ensMapperpairNewCpy(const EnsPMapperpair mp);
EnsPMapperpair ensMapperpairNewIni(ajuint srcoid,
ajint srcstart,
ajint srcend,
ajuint trgoid,
ajint trgstart,
ajint trgend,
ajint ori,
AjBool indel);
EnsPMapperpair ensMapperpairNewRef(EnsPMapperpair mp);
EnsPMapperpair ensMapperpairNewUnit(EnsPMapperunit source,
EnsPMapperunit target,
ajint ori,
AjBool indel);
void ensMapperpairDel(EnsPMapperpair *Pmp);
AjBool ensMapperpairGetIndel(const EnsPMapperpair mp);
ajint ensMapperpairGetOrientation(const EnsPMapperpair mp);
EnsPMapperunit ensMapperpairGetSource(const EnsPMapperpair mp);
EnsPMapperunit ensMapperpairGetTarget(const EnsPMapperpair mp);
AjBool ensMapperpairTrace(const EnsPMapperpair mp, ajuint level);
EnsPMapperunit ensMapperpairCalculateMapperunit(const EnsPMapperpair mp,
EnsEMapperunitType type);
size_t ensMapperpairCalculateMemsize(const EnsPMapperpair mp);
AjBool ensListMapperpairSortSourceStartAscending(AjPList mps);
AjBool ensListMapperpairSortTargetStartAscending(AjPList mps);
/* Ensembl Mapper Result */
EnsPMapperresult ensMapperresultNewCoordinate(ajuint oid,
ajint crdstart,
ajint crdend,
ajint crdstrand,
EnsPCoordsystem cs,
ajuint rank);
EnsPMapperresult ensMapperresultNewCpy(const EnsPMapperresult mr);
EnsPMapperresult ensMapperresultNewGap(ajint gapstart,
ajint gapend,
ajuint rank);
EnsPMapperresult ensMapperresultNewIndel(ajuint oid,
ajint crdstart,
ajint crdend,
ajint crdstrand,
EnsPCoordsystem cs,
ajint gapstart,
ajint gapend,
ajuint rank);
EnsPMapperresult ensMapperresultNewIni(EnsEMapperresultType type,
ajuint oid,
ajint crdstart,
ajint crdend,
ajint crdstrand,
EnsPCoordsystem cs,
ajint gapstart,
ajint gapend,
ajuint rank);
EnsPMapperresult ensMapperresultNewRef(EnsPMapperresult mr);
void ensMapperresultDel(EnsPMapperresult *Pmr);
EnsPCoordsystem ensMapperresultGetCoordsystem(const EnsPMapperresult mr);
ajint ensMapperresultGetCoordinateEnd(const EnsPMapperresult mr);
ajint ensMapperresultGetCoordinateStart(const EnsPMapperresult mr);
ajint ensMapperresultGetGapEnd(const EnsPMapperresult mr);
ajint ensMapperresultGetGapStart(const EnsPMapperresult mr);
ajuint ensMapperresultGetObjectidentifier(const EnsPMapperresult mr);
ajuint ensMapperresultGetRank(const EnsPMapperresult mr);
ajint ensMapperresultGetCoordinateStrand(const EnsPMapperresult mr);
EnsEMapperresultType ensMapperresultGetType(const EnsPMapperresult mr);
AjBool ensMapperresultSetCoordinateEnd(EnsPMapperresult mr,
ajint crdend);
AjBool ensMapperresultSetCoordinateStart(EnsPMapperresult mr,
ajint crdstart);
AjBool ensMapperresultSetCoordinateStrand(EnsPMapperresult mr,
ajint crdstrand);
AjBool ensMapperresultSetCoordsystem(EnsPMapperresult mr,
EnsPCoordsystem cs);
AjBool ensMapperresultSetGapEnd(EnsPMapperresult mr,
ajint gapend);
AjBool ensMapperresultSetGapStart(EnsPMapperresult mr,
ajint gapstart);
AjBool ensMapperresultSetObjectidentifier(EnsPMapperresult mr,
ajuint oid);
AjBool ensMapperresultSetRank(EnsPMapperresult mr,
ajuint rank);
AjBool ensMapperresultSetType(EnsPMapperresult mr,
EnsEMapperresultType mrt);
AjBool ensMapperresultTrace(const EnsPMapperresult mr, ajuint level);
ajuint ensMapperresultCalculateLengthCoordinate(const EnsPMapperresult mr);
ajuint ensMapperresultCalculateLengthGap(const EnsPMapperresult mr);
ajuint ensMapperresultCalculateLengthResult(const EnsPMapperresult mr);
size_t ensMapperresultCalculateMemsize(const EnsPMapperresult mr);
/* Ensembl Mapper Range */
EnsPMapperrange ensMapperrangeNewCpy(const EnsPMapperrange mr);
EnsPMapperrange ensMapperrangeNewIni(ajint start, ajint end);
EnsPMapperrange ensMapperrangeNewRef(EnsPMapperrange mr);
void ensMapperrangeDel(EnsPMapperrange *Pmr);
ajint ensMapperrangeGetEnd(const EnsPMapperrange mr);
ajint ensMapperrangeGetStart(const EnsPMapperrange mr);
AjBool ensMapperrangeTrace(const EnsPMapperrange mr, ajuint level);
size_t ensMapperrangeCalculateMemsize(const EnsPMapperrange mr);
/* Ensembl Mapper Range Registry */
EnsPMapperrangeregistry ensMapperrangeregistryNew(void);
EnsPMapperrangeregistry ensMapperrangeregistryNewRef(
EnsPMapperrangeregistry mrr);
AjBool ensMapperrangeregistryClear(EnsPMapperrangeregistry mrr);
void ensMapperrangeregistryDel(EnsPMapperrangeregistry *Pmrr);
AjBool ensMapperrangeregistryCheck(EnsPMapperrangeregistry mrr,
ajuint oid,
ajint chkstart,
ajint chkend,
ajint regstart,
ajint regend,
AjPList ranges);
const AjPList ensMapperrangeregistryCalculateMapperranges(
const EnsPMapperrangeregistry mrr,
ajuint oid);
ajuint ensMapperrangeregistryCalculateOverlap(
const EnsPMapperrangeregistry mrr,
ajuint oid,
ajint start,
ajint end);
/* Ensembl Mapper */
EnsPMapper ensMapperNewIni(AjPStr srctype,
AjPStr trgtype,
EnsPCoordsystem srccs,
EnsPCoordsystem trgcs);
EnsPMapper ensMapperNewRef(EnsPMapper mapper);
AjBool ensMapperClear(EnsPMapper mapper);
void ensMapperDel(EnsPMapper *Pmapper);
EnsPCoordsystem ensMapperGetCoordsystemSource(const EnsPMapper mapper);
EnsPCoordsystem ensMapperGetCoordsystemTarget(const EnsPMapper mapper);
ajuint ensMapperGetCount(const EnsPMapper mapper);
AjBool ensMapperGetSorted(const EnsPMapper mapper);
AjPStr ensMapperGetTypeSource(const EnsPMapper mapper);
AjPStr ensMapperGetTypeTarget(const EnsPMapper mapper);
AjBool ensMapperAddCoordinates(EnsPMapper mapper,
ajuint srcoid,
ajint srcstart,
ajint srcend,
ajint ori,
ajuint trgoid,
ajint trgstart,
ajint trgend);
AjBool ensMapperAddIndel(EnsPMapper mapper,
ajuint srcoid,
ajint srcstart,
ajint srcend,
ajint ori,
ajuint trgoid,
ajint trgstart,
ajint trgend);
AjBool ensMapperAddMapperpair(EnsPMapper mapper, EnsPMapperpair mp);
AjBool ensMapperAddMappers(EnsPMapper mapper1, EnsPMapper mapper2);
AjBool ensMapperAddMapperunits(EnsPMapper mapper,
EnsPMapperunit srcmu,
EnsPMapperunit trgmu,
ajint ori,
AjBool indel);
AjBool ensMapperList(EnsPMapper mapper,
ajuint oid,
ajint start,
ajint end,
const AjPStr type,
AjPList mps);
AjBool ensMapperTrace(const EnsPMapper mapper, ajuint level);
size_t ensMapperCalculateMemsize(const EnsPMapper mapper);
AjBool ensMapperFastmap(EnsPMapper mapper,
ajuint oid,
ajint start,
ajint end,
ajint strand,
const AjPStr type,
AjPList mrs);
AjBool ensMapperMap(EnsPMapper mapper,
ajuint oid,
ajint start,
ajint end,
ajint strand,
const AjPStr type,
AjPList mrs);
AjBool ensMapperMapindel(EnsPMapper mapper,
ajuint oid,
ajint start,
ajint end,
ajint strand,
const AjPStr type,
AjPList mrs);
/*
** End of prototype definitions
*/
AJ_END_DECLS
#endif /* !ENSMAPPER_H */
|