ajdomain.c


Section: Constructors

These constructors return a pointer to a new instance of an object.

Functions:
ajCathReadAllNewReads a DCF file (domain classification file) for CATH domains. This file is in DCF format (see documentation for DOMAINATRIX "cathparse" application) and creates a list of Cath objects for the entire content.
ajCathReadAllRawNewReads the CATH parsable files (dir.cla.scop.txt & dir.des.scop.txt) and writes a list of Cath objects.
ajCathReadCNewRead a Cath object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajCathReadNewRead a Cath object from a DCF file (domain classification file) which is in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajDomainReadAllNewReads the DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and creates a list of Domain objects for the entire content.
ajScopReadAllNewReads the DCF file (domain classification file) of SCOP domains. The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application). The function creates a list of cop objects for the entire content.
ajScopReadAllRawNewReads the SCOP parsable files (dir.cla.scop.txt & dir.des.scop.txt) and creates a list of Scop objects.
ajCathNewCath object constructor. Fore-knowledge of the number of chain segments the domain is comprised of is required.
ajDomainNewDomain object constructor. Fore-knowledge of the number of chains (SCOP domains) or chain segments (CATH domains) the domain is comprised of is required. This is normally called by the ajDomainReadCNew / ajDomainReadNew functions.
ajScopNewScop object constructor. Fore-knowledge of the number of chains is required. This is normally called by the ajScopReadCNew / ajScopReadNew functions.
ajDomainReadNewRead a Domain object from a DCF file (domain classification file - see documentation for DOMAINATRIX "scopparse" application).
ajScopReadNewRead a Scop object from a DCF file (domain classification file). The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application).
ajDomainReadCNewRead a Domain object from a DCF (domain classification file; see documentation for DOMAINATRIX "scopparse" application).
ajScopReadCNewRead a Scop object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "scopparse" application).


Function ajCathReadAllNew

Reads a DCF file (domain classification file) for CATH domains. This file is in DCF format (see documentation for DOMAINATRIX "cathparse" application) and creates a list of Cath objects for the entire content.

Prototype

AjPList ajCathReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to CATH classification file
AjPList RETURNList of Cath objects.

From EMBOSS 2.9.0


Function ajCathReadAllRawNew

Reads the CATH parsable files (dir.cla.scop.txt & dir.des.scop.txt) and writes a list of Cath objects.

Prototype

AjPList ajCathReadAllRawNew (
      AjPFile cathf,
      AjPFile domf,
      AjPFile namesf,
      AjPFile flog
);

TypeNameRead/WriteDescription
AjPFilecathfModifyCath class file
AjPFiledomfModifyCath domain file
AjPFilenamesfModifyOutput file
AjPFileflogModifyLog file
AjPList RETURNList of Scop objects.

From EMBOSS 2.9.0


Function ajCathReadCNew

Read a Cath object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjPCath ajCathReadCNew (
      AjPFile inf,
      const char* entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const char*entryInputCATH id of entry to retrieve (or "*" for next domain in file).
AjPCath RETURNCath object.

From EMBOSS 2.9.0


Function ajCathReadNew

Read a Cath object from a DCF file (domain classification file) which is in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjPCath ajCathReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const AjPStrentryInputCATH id of entry to retrieve (or "*" for next domain in file).
AjPCath RETURNCath object.

From EMBOSS 2.9.0


Function ajDomainReadAllNew

Reads the DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and creates a list of Domain objects for the entire content.

Prototype

AjPList ajDomainReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to DOMAIN classification file
AjPList RETURNList of domain objects or NULL (file read problem).

From EMBOSS 3.0.0


Function ajScopReadAllNew

Reads the DCF file (domain classification file) of SCOP domains. The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application). The function creates a list of cop objects for the entire content.

Prototype

AjPList ajScopReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to SCOP classification file
AjPList RETURNList of scop objects or NULL (file read problem).

From EMBOSS 2.9.0


Function ajScopReadAllRawNew

Reads the SCOP parsable files (dir.cla.scop.txt & dir.des.scop.txt) and creates a list of Scop objects.

Prototype

AjPList ajScopReadAllRawNew (
      AjPFile claf,
      AjPFile desf,
      AjBool omit
);

TypeNameRead/WriteDescription
AjPFileclafModifyScop class file
AjPFiledesfModifyScop description file
AjBoolomitInputTrue if domains of 1 chain only are output
AjPList RETURNList of Scop objects.

From EMBOSS 2.9.0


Function ajCathNew

Cath object constructor. Fore-knowledge of the number of chain segments the domain is comprised of is required.

Prototype

AjPCath ajCathNew (
      ajint n
);

TypeNameRead/WriteDescription
ajintnInputNo. of chain segments
AjPCath RETURNPointer to a Cath object

From EMBOSS 2.9.0


Function ajDomainNew

Domain object constructor. Fore-knowledge of the number of chains (SCOP domains) or chain segments (CATH domains) the domain is comprised of is required. This is normally called by the ajDomainReadCNew / ajDomainReadNew functions.

Prototype

AjPDomain ajDomainNew (
      ajint n,
      ajint type
);

TypeNameRead/WriteDescription
ajintnInputNumber of chains (SCOP) or chain segments (CATH)
ajinttypeInputEither ajSCOP (1) or ajCATH (2)
AjPDomain RETURNPointer to a Domain object

From EMBOSS 3.0.0


Function ajScopNew

Scop object constructor. Fore-knowledge of the number of chains is required. This is normally called by the ajScopReadCNew / ajScopReadNew functions.

Prototype

AjPScop ajScopNew (
      ajint chains
);

TypeNameRead/WriteDescription
ajintchainsInputNumber of chains
AjPScop RETURNPointer to a Scop object

From EMBOSS 1.8.0


Function ajDomainReadNew

Read a Domain object from a DCF file (domain classification file - see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPDomain ajDomainReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream.
const AjPStrentryInputDomain id of domain to read (or "*" for next domain in file).
AjPDomain RETURNDomain object.

From EMBOSS 3.0.0


Function ajScopReadNew

Read a Scop object from a DCF file (domain classification file). The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPScop ajScopReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream.
const AjPStrentryInputSCOP id of domain to read (or "*" for next domain in file).
AjPScop RETURNScop object.

From EMBOSS 2.9.0


Function ajDomainReadCNew

Read a Domain object from a DCF (domain classification file; see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPDomain ajDomainReadCNew (
      AjPFile inf,
      const char* entry,
      ajint dtype
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const char*entryInputDomain id of domain to parse
ajintdtypeInputType of domain (ajSCOP or ajCATH) in the DCF file, or '0' if not sure.
AjPDomain RETURNDomain object or NULL (file read problem).

From EMBOSS 3.0.0


Function ajScopReadCNew

Read a Scop object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPScop ajScopReadCNew (
      AjPFile inf,
      const char* entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const char*entryInputSCOP id of domain to parse
AjPScop RETURNScop object or NULL (file read problem).

From EMBOSS 2.9.0


Section: Structure Destructors

These destructors functions receive the address of the instance to be deleted. The original pointer is set to NULL so is ready for re-use.

Functions:
ajDomainDelDestructor for domain object.
ajScopDelDestructor for scop object.
ajCathDelDestructor for Cath object. Fore-knowledge of the number of chain segments domain is comprised of is required.


Function ajDomainDel

Destructor for domain object.

Prototype

void ajDomainDel (
      AjPDomain* ptr
);

TypeNameRead/WriteDescription
AjPDomain*ptrDeleteDomain object pointer
void RETURN

From EMBOSS 3.0.0


Function ajScopDel

Destructor for scop object.

Prototype

void ajScopDel (
      AjPScop* ptr
);

TypeNameRead/WriteDescription
AjPScop*ptrDeleteScop object pointer
void RETURN

From EMBOSS 1.8.0


Function ajCathDel

Destructor for Cath object. Fore-knowledge of the number of chain segments domain is comprised of is required.

Prototype

void ajCathDel (
      AjPCath* ptr
);

TypeNameRead/WriteDescription
AjPCath*ptrDeleteCath object pointer
void RETURN

From EMBOSS 2.9.0


Section: Assignments

These functions overwrite the instance provided as the first argument A NULL value is always acceptable so these functions are often used to create a new instance by assignment.

Functions:
ajDomainCopyCopies the contents from one Domain object to another.
ajCathCopyCopies the contents from one Cath object to another.
ajScopCopyCopies the contents from one Scop object to another.


Function ajDomainCopy

Copies the contents from one Domain object to another.

Prototype

AjBool ajDomainCopy (
      AjPDomain* to,
      const AjPDomain from
);

TypeNameRead/WriteDescription
AjPDomain*toOutputDomain object pointer
const AjPDomainfromInputDomain object
AjBool RETURNTrue if copy was successful.

From EMBOSS 3.0.0


Function ajCathCopy

Copies the contents from one Cath object to another.

Prototype

AjBool ajCathCopy (
      AjPCath* to,
      const AjPCath from
);

TypeNameRead/WriteDescription
AjPCath*toOutputCath object pointer
const AjPCathfromInputCath object
AjBool RETURNTrue if copy was successful.

From EMBOSS 3.0.0


Function ajScopCopy

Copies the contents from one Scop object to another.

Prototype

AjBool ajScopCopy (
      AjPScop* to,
      const AjPScop from
);

TypeNameRead/WriteDescription
AjPScop*toOutputScop object pointer
const AjPScopfromInputScop object
AjBool RETURNTrue if copy was successful.

From EMBOSS 2.9.0


Section: Operators

These functions use the contents of an instance but do not make any changes.

Functions:
ajScopMatchSunidFunction to sort Scop objects by Sunid_Family.
ajScopMatchScopidFunction to sort Scop objects by Entry element.
ajScopMatchPdbIdFunction to sort Scop objects by Pdb element.
ajCathMatchPdbIdFunction to sort Cath objects by Pdb element.


Function ajScopMatchSunid

Function to sort Scop objects by Sunid_Family.

Prototype

ajint ajScopMatchSunid (
      const void* entry1,
      const void* entry2
);

TypeNameRead/WriteDescription
const void*entry1InputPointer to Scop object 1
const void*entry2InputPointer to Scop object 2
ajint RETURN-1 if Start1 should sort before Start2, +1 if the Start2 should sort first. 0 if they are identical.

From EMBOSS 2.9.0


Function ajScopMatchScopid

Function to sort Scop objects by Entry element.

Prototype

ajint ajScopMatchScopid (
      const void* hit1,
      const void* hit2
);

TypeNameRead/WriteDescription
const void*hit1InputPointer to Scop object 1
const void*hit2InputPointer to Scop object 2
ajint RETURN-1 if Entry1 should sort before Entry2, +1 if the Entry2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Function ajScopMatchPdbId

Function to sort Scop objects by Pdb element.

Prototype

ajint ajScopMatchPdbId (
      const void* hit1,
      const void* hit2
);

TypeNameRead/WriteDescription
const void*hit1InputPointer to Scop object 1
const void*hit2InputPointer to Scop object 2
ajint RETURN-1 if Pdb1 should sort before Pdb2, +1 if the Pdb2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Function ajCathMatchPdbId

Function to sort Cath objects by Pdb element.

Prototype

ajint ajCathMatchPdbId (
      const void* hit1,
      const void* hit2
);

TypeNameRead/WriteDescription
const void*hit1InputPointer to Cath object 1
const void*hit2InputPointer to Cath object 2
ajint RETURN-1 if Pdb1 should sort before Pdb2, +1 if the Pdb2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Section: Reporters

These functions return the contents of an instance but do not make any changes.

Functions:
ajDomainGetIdReturns domain id, either DomainID element (Cath object) or Entry (Scop object).
ajDomainGetSeqPdbReturns the pdb sequence from a Domain object.
ajDomainGetSeqSprReturns the swissprot sequence from a Domain object.
ajDomainGetPdbReturns the Pdb element from a Domain object.
ajDomainGetAccReturns the Acc element from a Domain object.
ajDomainGetSprReturns the Spr element from a Domain object.
ajDomainGetNReturns no. chains or chain segments in a domain, either NSegment element (Cath domains) or N element (Scop domains).
ajScopArrFindScopidPerforms a binary search for a SCOP domain id over an array of Scop structures (which of course must first have been sorted). This is a case-insensitive search.
ajScopArrFindSunidPerforms a binary search for a SCOP sunid over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.
ajScopArrFindPdbidPerforms a binary search for a SCOP domain id over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.
ajCathArrFindPdbidPerforms a binary search for a CATH domain id over an array of Cath structures (which of course must first have been sorted). This is a case-insensitive search.


Function ajDomainGetId

Returns domain id, either DomainID element (Cath object) or Entry (Scop object).

Prototype

AjPStr ajDomainGetId (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetSeqPdb

Returns the pdb sequence from a Domain object.

Prototype

AjPStr ajDomainGetSeqPdb (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetSeqSpr

Returns the swissprot sequence from a Domain object.

Prototype

AjPStr ajDomainGetSeqSpr (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetPdb

Returns the Pdb element from a Domain object.

Prototype

AjPStr ajDomainGetPdb (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetAcc

Returns the Acc element from a Domain object.

Prototype

AjPStr ajDomainGetAcc (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetSpr

Returns the Spr element from a Domain object.

Prototype

AjPStr ajDomainGetSpr (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
AjPStr RETURNOr NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetN

Returns no. chains or chain segments in a domain, either NSegment element (Cath domains) or N element (Scop domains).

Prototype

ajint ajDomainGetN (
      const AjPDomain obj
);

TypeNameRead/WriteDescription
const AjPDomainobjInputDomain object
ajint RETURNOr -1 on error.

From EMBOSS 3.0.0


Function ajScopArrFindScopid

Performs a binary search for a SCOP domain id over an array of Scop structures (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindScopid (
      AjPScop const* arr,
      ajint siz,
      const AjPStr id
);

TypeNameRead/WriteDescription
AjPScop const*arrInputArray of AjPScop objects
ajintsizInputSize of array
const AjPStridInputSearch term
ajint RETURNIndex of first Scop object found with a SCOP domain id matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajScopArrFindSunid

Performs a binary search for a SCOP sunid over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindSunid (
      AjPScop const* arr,
      ajint siz,
      ajint id
);

TypeNameRead/WriteDescription
AjPScop const*arrInputArray of Scop objects
ajintsizInputSize of array
ajintidInputSearch term
ajint RETURNIndex of first Scop object found with an PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajScopArrFindPdbid

Performs a binary search for a SCOP domain id over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindPdbid (
      AjPScop const* arr,
      ajint siz,
      const AjPStr id
);

TypeNameRead/WriteDescription
AjPScop const*arrInputArray of AjPScop objects
ajintsizInputSize of array
const AjPStridInputSearch term
ajint RETURNIndex of first Scop object found with a PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajCathArrFindPdbid

Performs a binary search for a CATH domain id over an array of Cath structures (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajCathArrFindPdbid (
      AjPCath const* arr,
      ajint siz,
      const AjPStr id
);

TypeNameRead/WriteDescription
AjPCath const*arrInputArray of AjPCath objects
ajintsizInputSize of array
const AjPStridInputSearch term
ajint RETURNIndex of first Cath object found with a PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Section: Input and Output

These functions use the contents of an instance but do not make any changes.

Functions:
ajPdbWriteDomainWrites a clean coordinate file for a SCOP domain. Where coordinates for multiple models (e.g. NMR structures) are given, data for model 1 are written. In the clean file, the coordinates are presented as belonging to a single chain regardless of how many chains the domain comprised. Coordinates for heterogens are NOT written to file.
ajCathWriteWrite contents of a Cath object to an output DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajDomainWriteWrite contents of a Domain object to an output file in DCF format (see documentation for DOMAINATRIX "scopparse" application).
ajScopWriteWrite contents of a Scop object to a DCF file (domain classification file). The DCF file uses DCF format (see documentation for DOMAINATRIX "scopparse" application).


Function ajPdbWriteDomain

Writes a clean coordinate file for a SCOP domain. Where coordinates for multiple models (e.g. NMR structures) are given, data for model 1 are written. In the clean file, the coordinates are presented as belonging to a single chain regardless of how many chains the domain comprised. Coordinates for heterogens are NOT written to file.

Prototype

AjBool ajPdbWriteDomain (
      AjPFile outf,
      const AjPPdb pdb,
      const AjPScop scop,
      AjPFile errf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPPdbpdbInputPdb object
const AjPScopscopInputScop object
AjPFileerrfModifyOutput file stream for error messages
AjBool RETURNTrue on success

From EMBOSS 1.9.0


Function ajCathWrite

Write contents of a Cath object to an output DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjBool ajCathWrite (
      AjPFile outf,
      const AjPCath obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPCathobjInputCath object
AjBool RETURNTrue if file was written ok.

From EMBOSS 2.9.0


Function ajDomainWrite

Write contents of a Domain object to an output file in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjBool ajDomainWrite (
      AjPFile outf,
      const AjPDomain obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPDomainobjInputDomain object
AjBool RETURNTrue if file was written ok.

From EMBOSS 3.0.0


Function ajScopWrite

Write contents of a Scop object to a DCF file (domain classification file). The DCF file uses DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjBool ajScopWrite (
      AjPFile outf,
      const AjPScop obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPScopobjInputScop object
AjBool RETURNTrue if file was written ok.

From EMBOSS 1.8.0


Section: Miscellaneous

These functions may have diverse functions that do not fit into the other categories.

Functions:
ajDomainDCFTypeReads a DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and ascertains the type of domains (ajSCOP or ajCATH) within.
ajDomainExitCleanup of Domain function internals.
ajDomainDummyFunctionDummy function to catch all unused functions defined in the ajdomain source file.


Function ajDomainDCFType

Reads a DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and ascertains the type of domains (ajSCOP or ajCATH) within.

Prototype

ajint ajDomainDCFType (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
ajint RETURNajSCOP, ajCATH or -1 (error) as appropriate.

From EMBOSS 3.0.0


Function ajDomainExit

Cleanup of Domain function internals.

Prototype

void ajDomainExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.1.0


Function ajDomainDummyFunction

Dummy function to catch all unused functions defined in the ajdomain source file.

Prototype

void ajDomainDummyFunction (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 2.9.0