ajoboread.c

Datatypes:
AjPOboin Obo Input
AjPOboall Obo Input Stream
none Input formats
AjPStr Query string
AjPQuery Obo query objects
AjPOboData Obo Data
AjPStr Obo file line
none Miscellaneous functions
AjPTable Internal call register table


Datatype: AjPOboin

Function is for manipulating obo input objects

Sections:
Obo Input ConstructorsConstructors
Obo Input DestructorsDestructors
obo input modifiersModifiers
castsCasts
obo term inputsInput


AjPOboin: Obo Input Constructors

All constructors return a new obo input object by pointer. It is the responsibility of the user to first destroy any previous obo term input object. The target pointer does not need to be initialised to NULL, but it is good programming practice to do so anyway.

Functions:
ajOboinNewCreates a new obo input object.


Function ajOboinNew

Creates a new obo input object.

Prototype

AjPOboin ajOboinNew (
      void
);

TypeNameRead/WriteDescription
AjPOboin RETURNNew obo input object.

From EMBOSS 6.4.0


AjPOboin: Obo Input Destructors

Destruction destroys all internal data structures and frees the memory allocated for the obo input object.

Functions:
ajOboinDelDeletes an obo input object.


Function ajOboinDel

Deletes an obo input object.

Prototype

void ajOboinDel (
      AjPOboin* pthis
);

TypeNameRead/WriteDescription
AjPOboin*pthisDeleteObo input
void RETURN

From EMBOSS 6.4.0


AjPOboin: obo input modifiers

These functions use the contents of an obo term input object and update them.

Functions:
ajOboinClearClears an obo term input object back to "as new" condition, except for the query list which must be preserved.
ajOboinQryCResets an obo term input object using a new Universal obo term Address
ajOboinQrySResets an obo term input object using a new Universal obo term Address


Function ajOboinClear

Clears an obo term input object back to "as new" condition, except for the query list which must be preserved.

Prototype

void ajOboinClear (
      AjPOboin thys
);

TypeNameRead/WriteDescription
AjPObointhysOutputobo term input
void RETURN

From EMBOSS 6.4.0


Function ajOboinQryC

Resets an obo term input object using a new Universal obo term Address

Prototype

void ajOboinQryC (
      AjPOboin thys,
      const char* txt
);

TypeNameRead/WriteDescription
AjPObointhysModifyobo term input object.
const char*txtInputQuery
void RETURN

From EMBOSS 6.4.0


Function ajOboinQryS

Resets an obo term input object using a new Universal obo term Address

Prototype

void ajOboinQryS (
      AjPOboin thys,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPObointhysModifyobo term input object.
const AjPStrstrInputQuery
void RETURN

From EMBOSS 6.4.0


AjPOboin: casts

Return values

Functions:
ajOboinGetQrySReturns the query of an obo term input object
ajOboinTraceDebug calls to trace the data in an obo term input object.


Function ajOboinGetQryS

Returns the query of an obo term input object

Prototype

const AjPStr ajOboinGetQryS (
      const AjPOboin thys
);

TypeNameRead/WriteDescription
const AjPObointhysInputobo term input object.
const AjPStr RETURNQuery string

From EMBOSS 6.4.0


Function ajOboinTrace

Debug calls to trace the data in an obo term input object.

Prototype

void ajOboinTrace (
      const AjPOboin thys
);

TypeNameRead/WriteDescription
const AjPObointhysInputobo term input object.
void RETURN

From EMBOSS 6.4.0


AjPOboin: obo term inputs

These functions read the obo term provided by the first argument

Functions:
ajOboinReadIf the file is not yet open, calls oboinQryProcess to convert the query into an open file stream.


Function ajOboinRead

If the file is not yet open, calls oboinQryProcess to convert the query into an open file stream.

Prototype

AjBool ajOboinRead (
      AjPOboin oboin,
      AjPObo obo
);

TypeNameRead/WriteDescription
AjPOboinoboinModifyobo term input definitions
AjPObooboOutputobo term returned.
AjBool RETURNajTrue on success.

From EMBOSS 6.4.0


Datatype: AjPOboall

Function is for manipulating obo input stream objects

Sections:
Obo Input ConstructorsConstructors
OBO Input Stream DestructorsDestructors
obo input stream modifiersModifiers
obo input stream castsCasts
obo inputGeneral use


AjPOboall: Obo Input Constructors

All constructors return a new obo input stream object by pointer. It is the responsibility of the user to first destroy any previous obo term input object. The target pointer does not need to be initialised to NULL, but it is good programming practice to do so anyway.

Functions:
ajOboallNewCreates a new obo input stream object.


Function ajOboallNew

Creates a new obo input stream object.

Prototype

AjPOboall ajOboallNew (
      void
);

TypeNameRead/WriteDescription
AjPOboall RETURNNew obo input stream object.

From EMBOSS 6.4.0


AjPOboall: OBO Input Stream Destructors

Destruction destroys all internal data structures and frees the memory allocated for the obo input stream object.

Functions:
ajOboallDelDeletes an obo input stream object.


Function ajOboallDel

Deletes an obo input stream object.

Prototype

void ajOboallDel (
      AjPOboall* pthis
);

TypeNameRead/WriteDescription
AjPOboall*pthisDeleteObo input stream
void RETURN

From EMBOSS 6.4.0


AjPOboall: obo input stream modifiers

These functions use the contents of an obo term input stream object and update them.

Functions:
ajOboallClearClears an obo term input stream object back to "as new" condition, except for the query list which must be preserved.


Function ajOboallClear

Clears an obo term input stream object back to "as new" condition, except for the query list which must be preserved.

Prototype

void ajOboallClear (
      AjPOboall thys
);

TypeNameRead/WriteDescription
AjPOboallthysOutputobo term input stream
void RETURN

From EMBOSS 6.4.0


AjPOboall: obo input stream casts

These functions return the contents of an obo term input stream object

Functions:
ajOboallGetQrySReturns the query of an input stream
ajOboallGetoboIdReturns the identifier of the current obo term in an input stream


Function ajOboallGetQryS

Returns the query of an input stream

Prototype

const AjPStr ajOboallGetQryS (
      const AjPOboall thys
);

TypeNameRead/WriteDescription
const AjPOboallthysInputobo term input stream
const AjPStr RETURNIdentifier

From EMBOSS 6.4.0


Function ajOboallGetoboId

Returns the identifier of the current obo term in an input stream

Prototype

const AjPStr ajOboallGetoboId (
      const AjPOboall thys
);

TypeNameRead/WriteDescription
const AjPOboallthysInputobo term input stream
const AjPStr RETURNIdentifier

From EMBOSS 6.4.0


AjPOboall: obo input

These functions use an obo term input stream object to read data

Functions:
ajOboallNextParse an OBO query into format, access, file and entry


Function ajOboallNext

Parse an OBO query into format, access, file and entry

Prototype

AjBool ajOboallNext (
      AjPOboall thys,
      AjPObo* Pobo
);

TypeNameRead/WriteDescription
AjPOboallthysOutputObo term input stream
AjPObo*PoboModifyObo term returned
AjBool RETURNajTrue on success.

From EMBOSS 6.4.0


Datatype: none

Input formats internals

Sections:
castCasts


Section: cast

Values for input formats

Functions:
ajOboinformatTermtests whether an OBO input format term is known
ajOboinformatTesttests whether a named OBO input format is known


Function ajOboinformatTerm

tests whether an OBO input format term is known

Prototype

AjBool ajOboinformatTerm (
      const AjPStr term
);

TypeNameRead/WriteDescription
const AjPStrtermInputFormat term EDAM ID
AjBool RETURNajTrue if term was accepted

From EMBOSS 6.4.0


Function ajOboinformatTest

tests whether a named OBO input format is known

Prototype

AjBool ajOboinformatTest (
      const AjPStr format
);

TypeNameRead/WriteDescription
const AjPStrformatInputFormat
AjBool RETURNajTrue if format was accepted

From EMBOSS 6.4.0


Datatype: AjPStr

Query string processing

Sections:
CastsCasts


AjPStr: Casts

returns attributes of a query string

Functions:
ajOboqryGetOboReturns an obo term given a query


Function ajOboqryGetObo

Returns an obo term given a query

Prototype

AjBool ajOboqryGetObo (
      const AjPStr qry,
      AjPObo obo
);

TypeNameRead/WriteDescription
const AjPStrqryInputQuery
AjPObooboModifyobo term
AjBool RETURNajTrue on success

From EMBOSS 6.4.0


Datatype: AjPQuery

Obo query object functions

Sections:
Query CastsCasts


AjPQuery: Query Casts

These functions examine the contents of query object and return some derived information. Some of them provide access to the internal components of a query object. They are provided for programming convenience but should be used with caution.

Functions:
ajOboqueryGetallObofieldsReturns the standard obo query string from a query


Function ajOboqueryGetallObofields

Returns the standard obo query string from a query

Prototype

ajuint ajOboqueryGetallObofields (
      const AjPQuery query,
      const AjPStr* id,
      const AjPStr* acc,
      const AjPStr* nam,
      const AjPStr* des,
      const AjPStr* up,
      const AjPStr* space
);

TypeNameRead/WriteDescription
const AjPQueryqueryInputQuery
const AjPStr*idOutputId query
const AjPStr*accOutputAccession query
const AjPStr*namOutputName query
const AjPStr*desOutputDescription query
const AjPStr*upOutputParent query
const AjPStr*spaceOutputNamespace query
ajuint RETURNNumber of fields found

From EMBOSS 6.4.0


Datatype: AjPOboData

Function is for manipulating obo internal data objects

Sections:
constructorsConstructors
castsCasts


AjPOboData: constructors

Constructors

Functions:
ajObodataNewObo data internals constructor
ajObodataParseObofileParse an OBO format file


Function ajObodataNew

Obo data internals constructor

Prototype

AjPOboData ajObodataNew (
      void
);

TypeNameRead/WriteDescription
AjPOboData RETURNNew object

From EMBOSS 6.4.0


Function ajObodataParseObofile

Parse an OBO format file

Prototype

AjPOboData ajObodataParseObofile (
      AjPFile obofile,
      const char* validations
);

TypeNameRead/WriteDescription
AjPFileobofileModifyOBO format input file
const char*validationsInputValidations to turn on or off
AjPOboData RETURNOntology data object

From EMBOSS 6.4.0


AjPOboData: casts

Retrieve data from an obo data opbject

Functions:
ajObodataFetchIdRetrieves an OBO term by ID
ajObodataFetchNameRetrieves an OBO term by name


Function ajObodataFetchId

Retrieves an OBO term by ID

Prototype

AjPObo ajObodataFetchId (
      const AjPOboData thys,
      const AjPStr query
);

TypeNameRead/WriteDescription
const AjPOboDatathysInputParsed ontology
const AjPStrqueryInputOBO identifier
AjPObo RETURNOBO term

From EMBOSS 6.4.0


Function ajObodataFetchName

Retrieves an OBO term by name

Prototype

AjPObo ajObodataFetchName (
      const AjPOboData thys,
      const AjPStr query
);

TypeNameRead/WriteDescription
const AjPOboDatathysInputParsed ontology
const AjPStrqueryInputOBO name
AjPObo RETURNOBO term

From EMBOSS 6.4.0


Datatype: AjPStr

Processing a line from an OBO format file

Sections:
ModifiersModifiers


AjPStr: Modifiers

Clean up[ the input line

Functions:
ajObolineCutCommentRemove comments starting with an unescaped '!'
ajObolineCutDbxrefRemove trailing dbxrefs in square braces
ajObolineCutModifierRemove trailing modifiers in curly braces
ajObolineEscapeClean up escaped characters


Function ajObolineCutComment

Remove comments starting with an unescaped '!'

Prototype

AjBool ajObolineCutComment (
      AjPStr* Pline,
      AjPStr* Pcomment
);

TypeNameRead/WriteDescription
AjPStr*PlineModifyLine with possible comment text
AjPStr*PcommentModifyComment text
AjBool RETURNTrue if a comment was found

From EMBOSS 6.4.0


Function ajObolineCutDbxref

Remove trailing dbxrefs in square braces

Prototype

AjBool ajObolineCutDbxref (
      AjPStr* Pline,
      AjPStr* Pdbxref
);

TypeNameRead/WriteDescription
AjPStr*PlineModifyLine with possible trailing dbxref text
AjPStr*PdbxrefModifyDbxref text
AjBool RETURNTrue if a trailing dbxref was found

From EMBOSS 6.4.0


Function ajObolineCutModifier

Remove trailing modifiers in curly braces

Prototype

AjBool ajObolineCutModifier (
      AjPStr* Pline,
      AjPStr* Pmodifier
);

TypeNameRead/WriteDescription
AjPStr*PlineModifyLine with possible trailing modifier text
AjPStr*PmodifierModifyModifier text
AjBool RETURNTrue if a trailing modifier was found

From EMBOSS 6.4.0


Function ajObolineEscape

Clean up escaped characters

Prototype

AjBool ajObolineEscape (
      AjPStr* Pline
);

TypeNameRead/WriteDescription
AjPStr*PlineModifyLine with possible comment text
AjBool RETURNTrue if an escaped character was found

From EMBOSS 6.4.0


Datatype: none

Functions to initialise and clean up internals

Sections:
PrintCasts
MiscellaneousMiscellaneous
InternalsMiscellaneous


Section: Print

Printing to a file

Functions:
ajOboinprintBookReports the internal data structures as a Docbook table
ajOboinprintHtmlReports the internal data structures as an HTML table
ajOboinprintTextReports the internal data structures
ajOboinprintWikiReports the internal data structures as a wiki table


Function ajOboinprintBook

Reports the internal data structures as a Docbook table

Prototype

void ajOboinprintBook (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.4.0


Function ajOboinprintHtml

Reports the internal data structures as an HTML table

Prototype

void ajOboinprintHtml (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.4.0


Function ajOboinprintText

Reports the internal data structures

Prototype

void ajOboinprintText (
      AjPFile outf,
      AjBool full
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
AjBoolfullInputFull report (usually ajFalse)
void RETURN

From EMBOSS 6.4.0


Function ajOboinprintWiki

Reports the internal data structures as a wiki table

Prototype

void ajOboinprintWiki (
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file
void RETURN

From EMBOSS 6.4.0


Section: Miscellaneous

Functions to initialise and clean up internals

Functions:
ajOboinExitCleans up obo term input internal memory


Function ajOboinExit

Cleans up obo term input internal memory

Prototype

void ajOboinExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.4.0


Section: Internals

Functions to return internal values

Functions:
ajOboinTypeGetFieldsReturns the listof known field names for ajOboinRead
ajOboinTypeGetQlinksReturns the listof known query link operators for ajOboinRead


Function ajOboinTypeGetFields

Returns the listof known field names for ajOboinRead

Prototype

const char* ajOboinTypeGetFields (
      void
);

TypeNameRead/WriteDescription
const char* RETURNList of field names

From EMBOSS 6.4.0


Function ajOboinTypeGetQlinks

Returns the listof known query link operators for ajOboinRead

Prototype

const char* ajOboinTypeGetQlinks (
      void
);

TypeNameRead/WriteDescription
const char* RETURNList of field names

From EMBOSS 6.4.0


Datatype: AjPTable

Functions to manage the internal call register table that links the ajaxdb library functions with code in the core AJAX library.

Sections:
CastCasts


AjPTable: Cast

Return a reference to the call table

Functions:
ajOboaccessGetDbreturns the table in which obo database access details are registered
ajOboaccessMethodGetQlinksTests for a named method for obo term reading and returns the known query link operators
ajOboaccessMethodGetScopeTests for a named method for obo term reading and returns the scope (entry, query or all).
ajOboaccessMethodTestTests for a named method for obo reading.


Function ajOboaccessGetDb

returns the table in which obo database access details are registered

Prototype

AjPTable ajOboaccessGetDb (
      void
);

TypeNameRead/WriteDescription
AjPTable RETURNAccess functions hash table

From EMBOSS 6.4.0


Function ajOboaccessMethodGetQlinks

Tests for a named method for obo term reading and returns the known query link operators

Prototype

const char* ajOboaccessMethodGetQlinks (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
const char* RETURNKnown link operators

From EMBOSS 6.4.0


Function ajOboaccessMethodGetScope

Tests for a named method for obo term reading and returns the scope (entry, query or all).

Prototype

ajuint ajOboaccessMethodGetScope (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
ajuint RETURNScope flags

From EMBOSS 6.4.0


Function ajOboaccessMethodTest

Tests for a named method for obo reading.

Prototype

AjBool ajOboaccessMethodTest (
      const AjPStr method
);

TypeNameRead/WriteDescription
const AjPStrmethodInputMethod required.
AjBool RETURNajTrue on success.

From EMBOSS 6.4.0