ajoboread.c
Datatypes: AjPOboin AjPOboall none AjPStr AjPQuery AjPOboData AjPStr none AjPTable
Obo Input
Sections: Obo Input Constructors Obo Input Destructors obo input modifiers casts obo term inputs
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: ajOboinNew
Creates a new obo input object.
Synopsis
Prototype
AjPOboin ajOboinNew (
void
);
Type | Name | Read/Write | Description |
AjPOboin | | RETURN | New obo input object. |
Returns
AjPOboin: | New obo input object. |
Description
Creates a new obo input object.
See Also
See other functions in this section
Availability
In release 6.4.0
Destruction destroys all internal data structures and frees the
memory allocated for the obo input object.
Functions: ajOboinDel
Deletes an obo input object.
Synopsis
Prototype
void ajOboinDel (
AjPOboin* pthis
);
Type | Name | Read/Write | Description |
AjPOboin* | pthis | Delete | Obo input |
void | | RETURN | |
Output
Returns
Description
Deletes an obo input object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use the contents of an obo term input object and
update them.
Functions: ajOboinClear ajOboinQryC ajOboinQryS
Clears an obo term input object back to "as new" condition, except
for the query list which must be preserved.
Synopsis
Prototype
void ajOboinClear (
AjPOboin thys
);
Type | Name | Read/Write | Description |
AjPOboin | thys | Output | obo term input |
void | | RETURN | |
Output
thys: | (Output) | obo term input |
Returns
Description
Clears an obo term input object back to "as new" condition, except
for the query list which must be preserved.
See Also
See other functions in this section
Availability
In release 6.4.0
Resets an obo term input object using a new Universal
obo term Address
Synopsis
Prototype
void ajOboinQryC (
AjPOboin thys,
const char* txt
);
Type | Name | Read/Write | Description |
AjPOboin | thys | Modify | obo term input object. |
const char* | txt | Input | Query |
void | | RETURN | |
Input
Input & Output
thys: | (Modify) | obo term input object. |
Returns
Description
Resets an obo term input object using a new Universal
obo term Address
See Also
See other functions in this section
Availability
In release 6.4.0
Resets an obo term input object using a new Universal
obo term Address
Synopsis
Prototype
void ajOboinQryS (
AjPOboin thys,
const AjPStr str
);
Type | Name | Read/Write | Description |
AjPOboin | thys | Modify | obo term input object. |
const AjPStr | str | Input | Query |
void | | RETURN | |
Input
Input & Output
thys: | (Modify) | obo term input object. |
Returns
Description
Resets an obo term input object using a new Universal
obo term Address
See Also
See other functions in this section
Availability
In release 6.4.0
Return values
Functions: ajOboinGetQryS ajOboinTrace
Returns the query of an obo term input object
Synopsis
Prototype
const AjPStr ajOboinGetQryS (
const AjPOboin thys
);
Type | Name | Read/Write | Description |
const AjPOboin | thys | Input | obo term input object. |
const AjPStr | | RETURN | Query string |
Input
thys: | (Input) | obo term input object. |
Returns
const AjPStr: | Query string |
Description
Returns the query of an obo term input object
See Also
See other functions in this section
Availability
In release 6.4.0
Debug calls to trace the data in an obo term input object.
Synopsis
Prototype
void ajOboinTrace (
const AjPOboin thys
);
Type | Name | Read/Write | Description |
const AjPOboin | thys | Input | obo term input object. |
void | | RETURN | |
Input
thys: | (Input) | obo term input object. |
Returns
Description
Debug calls to trace the data in an obo term input object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions read the obo term provided by the first argument
Functions: ajOboinRead
If the file is not yet open, calls oboinQryProcess to convert the query into
an open file stream.
Uses oboinRead for the actual file reading.
Returns the results in the AjPObo object.
Synopsis
Prototype
AjBool ajOboinRead (
AjPOboin oboin,
AjPObo obo
);
Type | Name | Read/Write | Description |
AjPOboin | oboin | Modify | obo term input definitions |
AjPObo | obo | Output | obo term returned. |
AjBool | | RETURN | ajTrue on success. |
Output
obo: | (Output) | obo term returned. |
Input & Output
oboin: | (Modify) | obo term input definitions |
Returns
AjBool: | ajTrue on success. |
Description
If the file is not yet open, calls oboinQryProcess to convert the query into
an open file stream.
Uses oboinRead for the actual file reading.
Returns the results in the AjPObo object.
See Also
See other functions in this section
Availability
In release 6.4.0
Obo Input Stream
Sections: Obo Input Constructors OBO Input Stream Destructors obo input stream modifiers obo input stream casts obo input
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: ajOboallNew
Creates a new obo input stream object.
Synopsis
Prototype
AjPOboall ajOboallNew (
void
);
Type | Name | Read/Write | Description |
AjPOboall | | RETURN | New obo input stream object. |
Returns
AjPOboall: | New obo input stream object. |
Description
Creates a new obo input stream object.
See Also
See other functions in this section
Availability
In release 6.4.0
Destruction destroys all internal data structures and frees the
memory allocated for the obo input stream object.
Functions: ajOboallDel
Deletes an obo input stream object.
Synopsis
Prototype
void ajOboallDel (
AjPOboall* pthis
);
Type | Name | Read/Write | Description |
AjPOboall* | pthis | Delete | Obo input stream |
void | | RETURN | |
Output
pthis: | (Delete) | Obo input stream |
Returns
Description
Deletes an obo input stream object.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use the contents of an obo term input stream object and
update them.
Functions: ajOboallClear
Clears an obo term input stream object back to "as new" condition, except
for the query list which must be preserved.
Synopsis
Prototype
void ajOboallClear (
AjPOboall thys
);
Type | Name | Read/Write | Description |
AjPOboall | thys | Output | obo term input stream |
void | | RETURN | |
Output
thys: | (Output) | obo term input stream |
Returns
Description
Clears an obo term input stream object back to "as new" condition, except
for the query list which must be preserved.
See Also
See other functions in this section
Availability
In release 6.4.0
These functions return the contents of an obo term input stream object
Functions: ajOboallGetQryS ajOboallGetoboId
Returns the query of an input stream
Synopsis
Prototype
const AjPStr ajOboallGetQryS (
const AjPOboall thys
);
Type | Name | Read/Write | Description |
const AjPOboall | thys | Input | obo term input stream |
const AjPStr | | RETURN | Identifier |
Input
thys: | (Input) | obo term input stream |
Returns
Description
Returns the query of an input stream
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the identifier of the current obo term in an input stream
Synopsis
Prototype
const AjPStr ajOboallGetoboId (
const AjPOboall thys
);
Type | Name | Read/Write | Description |
const AjPOboall | thys | Input | obo term input stream |
const AjPStr | | RETURN | Identifier |
Input
thys: | (Input) | obo term input stream |
Returns
Description
Returns the identifier of the current obo term in an input stream
See Also
See other functions in this section
Availability
In release 6.4.0
These functions use an obo term input stream object to read data
Functions: ajOboallNext
Parse an OBO query into format, access, file and entry
Split at delimiters. Check for the first part as a valid format
Check for the remaining first part as a database name or as a file
that can be opened.
Anything left is an entryname spec.
Return the results in the AjPObo object but leave the file open for
future calls.
Synopsis
Prototype
AjBool ajOboallNext (
AjPOboall thys,
AjPObo* Pobo
);
Type | Name | Read/Write | Description |
AjPOboall | thys | Output | Obo term input stream |
AjPObo* | Pobo | Modify | Obo term returned |
AjBool | | RETURN | ajTrue on success. |
Output
thys: | (Output) | Obo term input stream |
Input & Output
Pobo: | (Modify) | Obo term returned |
Returns
AjBool: | ajTrue on success. |
Description
Parse an OBO query into format, access, file and entry
Split at delimiters. Check for the first part as a valid format
Check for the remaining first part as a database name or as a file
that can be opened.
Anything left is an entryname spec.
Return the results in the AjPObo object but leave the file open for
future calls.
See Also
See other functions in this section
Availability
In release 6.4.0
Input formats
Sections: cast
Values for input formats
Functions: ajOboinformatTerm ajOboinformatTest
tests whether an OBO input format term is known
Synopsis
Prototype
AjBool ajOboinformatTerm (
const AjPStr term
);
Type | Name | Read/Write | Description |
const AjPStr | term | Input | Format term EDAM ID |
AjBool | | RETURN | ajTrue if term was accepted |
Input
term: | (Input) | Format term EDAM ID |
Returns
AjBool: | ajTrue if term was accepted |
Description
tests whether an OBO input format term is known
See Also
See other functions in this section
Availability
In release 6.4.0
tests whether a named OBO input format is known
Synopsis
Prototype
AjBool ajOboinformatTest (
const AjPStr format
);
Type | Name | Read/Write | Description |
const AjPStr | format | Input | Format |
AjBool | | RETURN | ajTrue if format was accepted |
Input
Returns
AjBool: | ajTrue if format was accepted |
Description
tests whether a named OBO input format is known
See Also
See other functions in this section
Availability
In release 6.4.0
Query string
Sections: Casts
returns attributes of a query string
Functions: ajOboqryGetObo
Returns an obo term given a query
Synopsis
Prototype
AjBool ajOboqryGetObo (
const AjPStr qry,
AjPObo obo
);
Type | Name | Read/Write | Description |
const AjPStr | qry | Input | Query |
AjPObo | obo | Modify | obo term |
AjBool | | RETURN | ajTrue on success |
Input
Input & Output
Returns
Description
Returns an obo term given a query
See Also
See other functions in this section
Availability
In release 6.4.0
Obo query objects
Sections: 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: ajOboqueryGetallObofields
Returns the standard obo query string from a query
Synopsis
Prototype
ajuint ajOboqueryGetallObofields (
const AjPQuery query,
const AjPStr* id,
const AjPStr* acc,
const AjPStr* nam,
const AjPStr* des,
const AjPStr* up,
const AjPStr* space
);
Type | Name | Read/Write | Description |
const AjPQuery | query | Input | Query |
const AjPStr* | id | Output | Id query |
const AjPStr* | acc | Output | Accession query |
const AjPStr* | nam | Output | Name query |
const AjPStr* | des | Output | Description query |
const AjPStr* | up | Output | Parent query |
const AjPStr* | space | Output | Namespace query |
ajuint | | RETURN | Number of fields found |
Input
Output
id: | (Output) | Id query |
acc: | (Output) | Accession query |
nam: | (Output) | Name query |
des: | (Output) | Description query |
up: | (Output) | Parent query |
space: | (Output) | Namespace query |
Returns
ajuint: | Number of fields found |
Description
Returns the standard obo query string from a query
See Also
See other functions in this section
Availability
In release 6.4.0
Obo Data
Sections: constructors casts
Constructors
Functions: ajObodataNew ajObodataParseObofile
Obo data internals constructor
Synopsis
Prototype
AjPOboData ajObodataNew (
void
);
Type | Name | Read/Write | Description |
AjPOboData | | RETURN | New object |
Returns
Description
Obo data internals constructor
See Also
See other functions in this section
Availability
In release 6.4.0
Parse an OBO format file
Synopsis
Prototype
AjPOboData ajObodataParseObofile (
AjPFile obofile,
const char* validations
);
Type | Name | Read/Write | Description |
AjPFile | obofile | Modify | OBO format input file |
const char* | validations | Input | Validations to turn on or off |
AjPOboData | | RETURN | Ontology data object |
Input
validations: | (Input) | Validations to turn on or off |
Input & Output
obofile: | (Modify) | OBO format input file |
Returns
AjPOboData: | Ontology data object |
Description
Parse an OBO format file
See Also
See other functions in this section
Availability
In release 6.4.0
Retrieve data from an obo data opbject
Functions: ajObodataFetchId ajObodataFetchName
Retrieves an OBO term by ID
Synopsis
Prototype
AjPObo ajObodataFetchId (
const AjPOboData thys,
const AjPStr query
);
Type | Name | Read/Write | Description |
const AjPOboData | thys | Input | Parsed ontology |
const AjPStr | query | Input | OBO identifier |
AjPObo | | RETURN | OBO term |
Input
thys: | (Input) | Parsed ontology |
query: | (Input) | OBO identifier |
Returns
Description
Retrieves an OBO term by ID
See Also
See other functions in this section
Availability
In release 6.4.0
Retrieves an OBO term by name
The name must be an exact match to a name or synonym for the term
Synopsis
Prototype
AjPObo ajObodataFetchName (
const AjPOboData thys,
const AjPStr query
);
Type | Name | Read/Write | Description |
const AjPOboData | thys | Input | Parsed ontology |
const AjPStr | query | Input | OBO name |
AjPObo | | RETURN | OBO term |
Input
thys: | (Input) | Parsed ontology |
query: | (Input) | OBO name |
Returns
Description
Retrieves an OBO term by name
The name must be an exact match to a name or synonym for the term
See Also
See other functions in this section
Availability
In release 6.4.0
Obo file line
Sections: Modifiers
Clean up[ the input line
Functions: ajObolineCutComment ajObolineCutDbxref ajObolineCutModifier ajObolineEscape
Remove comments starting with an unescaped '!'
Synopsis
Prototype
AjBool ajObolineCutComment (
AjPStr* Pline,
AjPStr* Pcomment
);
Type | Name | Read/Write | Description |
AjPStr* | Pline | Modify | Line with possible comment text |
AjPStr* | Pcomment | Modify | Comment text |
AjBool | | RETURN | True if a comment was found |
Input & Output
Pline: | (Modify) | Line with possible comment text |
Pcomment: | (Modify) | Comment text |
Returns
AjBool: | True if a comment was found |
Description
Remove comments starting with an unescaped '!'
See Also
See other functions in this section
Availability
In release 6.4.0
Remove trailing dbxrefs in square braces
Synopsis
Prototype
AjBool ajObolineCutDbxref (
AjPStr* Pline,
AjPStr* Pdbxref
);
Type | Name | Read/Write | Description |
AjPStr* | Pline | Modify | Line with possible trailing dbxref text |
AjPStr* | Pdbxref | Modify | Dbxref text |
AjBool | | RETURN | True if a trailing dbxref was found |
Input & Output
Pline: | (Modify) | Line with possible trailing dbxref text |
Pdbxref: | (Modify) | Dbxref text |
Returns
AjBool: | True if a trailing dbxref was found |
Description
Remove trailing dbxrefs in square braces
See Also
See other functions in this section
Availability
In release 6.4.0
Remove trailing modifiers in curly braces
Synopsis
Prototype
AjBool ajObolineCutModifier (
AjPStr* Pline,
AjPStr* Pmodifier
);
Type | Name | Read/Write | Description |
AjPStr* | Pline | Modify | Line with possible trailing modifier text |
AjPStr* | Pmodifier | Modify | Modifier text |
AjBool | | RETURN | True if a trailing modifier was found |
Input & Output
Pline: | (Modify) | Line with possible trailing modifier text |
Pmodifier: | (Modify) | Modifier text |
Returns
AjBool: | True if a trailing modifier was found |
Description
Remove trailing modifiers in curly braces
See Also
See other functions in this section
Availability
In release 6.4.0
Clean up escaped characters
Synopsis
Prototype
AjBool ajObolineEscape (
AjPStr* Pline
);
Type | Name | Read/Write | Description |
AjPStr* | Pline | Modify | Line with possible comment text |
AjBool | | RETURN | True if an escaped character was found |
Input & Output
Pline: | (Modify) | Line with possible comment text |
Returns
AjBool: | True if an escaped character was found |
Description
Clean up escaped characters
See Also
See other functions in this section
Availability
In release 6.4.0
Miscellaneous functions
Sections: Print Miscellaneous Internals
Printing to a file
Functions: ajOboinprintBook ajOboinprintHtml ajOboinprintText ajOboinprintWiki
Reports the internal data structures as a Docbook table
Synopsis
Prototype
void ajOboinprintBook (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as a Docbook table
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures as an HTML table
Synopsis
Prototype
void ajOboinprintHtml (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as an HTML table
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures
Synopsis
Prototype
void ajOboinprintText (
AjPFile outf,
AjBool full
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
AjBool | full | Input | Full report (usually ajFalse) |
void | | RETURN | |
Input
full: | (Input) | Full report (usually ajFalse) |
Input & Output
Returns
Description
Reports the internal data structures
See Also
See other functions in this section
Availability
In release 6.4.0
Reports the internal data structures as a wiki table
Synopsis
Prototype
void ajOboinprintWiki (
AjPFile outf
);
Type | Name | Read/Write | Description |
AjPFile | outf | Modify | Output file |
void | | RETURN | |
Input & Output
Returns
Description
Reports the internal data structures as a wiki table
See Also
See other functions in this section
Availability
In release 6.4.0
Functions to initialise and clean up internals
Functions: ajOboinExit
Cleans up obo term input internal memory
Synopsis
Prototype
void ajOboinExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleans up obo term input internal memory
See Also
See other functions in this section
Availability
In release 6.4.0
Functions to return internal values
Functions: ajOboinTypeGetFields ajOboinTypeGetQlinks
Returns the listof known field names for ajOboinRead
Synopsis
Prototype
const char* ajOboinTypeGetFields (
void
);
Type | Name | Read/Write | Description |
const char* | | RETURN | List of field names |
Returns
const char*: | List of field names |
Description
Returns the listof known field names for ajOboinRead
See Also
See other functions in this section
Availability
In release 6.4.0
Returns the listof known query link operators for ajOboinRead
Synopsis
Prototype
const char* ajOboinTypeGetQlinks (
void
);
Type | Name | Read/Write | Description |
const char* | | RETURN | List of field names |
Returns
const char*: | List of field names |
Description
Returns the listof known query link operators for ajOboinRead
See Also
See other functions in this section
Availability
In release 6.4.0
Internal call register table
Sections: Cast
Return a reference to the call table
Functions: ajOboaccessGetDb ajOboaccessMethodGetQlinks ajOboaccessMethodGetScope ajOboaccessMethodTest
returns the table in which obo database access details are registered
Synopsis
Prototype
AjPTable ajOboaccessGetDb (
void
);
Type | Name | Read/Write | Description |
AjPTable | | RETURN | Access functions hash table |
Returns
AjPTable: | Access functions hash table |
Description
returns the table in which obo database access details are registered
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for obo term reading and returns the
known query link operators
Synopsis
Prototype
const char* ajOboaccessMethodGetQlinks (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
const char* | | RETURN | Known link operators |
Input
method: | (Input) | Method required. |
Returns
const char*: | Known link operators |
Description
Tests for a named method for obo term reading and returns the
known query link operators
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for obo term reading and returns the scope
(entry, query or all).
Synopsis
Prototype
ajuint ajOboaccessMethodGetScope (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
ajuint | | RETURN | Scope flags |
Input
method: | (Input) | Method required. |
Returns
Description
Tests for a named method for obo term reading and returns the scope
(entry, query or all).
See Also
See other functions in this section
Availability
In release 6.4.0
Tests for a named method for obo reading.
Synopsis
Prototype
AjBool ajOboaccessMethodTest (
const AjPStr method
);
Type | Name | Read/Write | Description |
const AjPStr | method | Input | Method required. |
AjBool | | RETURN | ajTrue on success. |
Input
method: | (Input) | Method required. |
Returns
AjBool: | ajTrue on success. |
Description
Tests for a named method for obo reading.
See Also
See other functions in this section
Availability
In release 6.4.0