embsig.c


Function embSigdatNew

Sigdat object constructor. This is normally called by the embSignatureReadNew function. Fore-knowledge of the number of empirical residues and gaps is required. Important: Functions which manipulate the Sigdat object rely on data in the gap arrays (gsiz and grfq) being filled in order of increasing gap size.

Prototype

EmbPSigdat embSigdatNew (
      ajuint nres,
      ajuint ngap
);

TypeNameRead/WriteDescription
ajuintnresInputNumber of emprical residues / environments.
ajuintngapInputNumber of emprical gaps.
EmbPSigdat RETURNPointer to a Sigdat object

From EMBOSS 2.9.0


Function embSigposNew

Sigpos object constructor. This is normally called by the embSignatureCompile function. Fore-knowledge of the number of permissible gaps is required.

Prototype

EmbPSigpos embSigposNew (
      ajuint ngap
);

TypeNameRead/WriteDescription
ajuintngapInputNumber of permissible gaps.
EmbPSigpos RETURNPointer to a Sigpos object

From EMBOSS 2.9.0


Function embSigposDel

Destructor for Sigpos object.

Prototype

void embSigposDel (
      EmbPSigpos* pthis
);

TypeNameRead/WriteDescription
EmbPSigpos*pthisOutputSigpos object pointer
void RETURN

From EMBOSS 2.9.0


Function embSigdatDel

Destructor for Sigdat object.

Prototype

void embSigdatDel (
      EmbPSigdat* pthis
);

TypeNameRead/WriteDescription
EmbPSigdat*pthisOutputSigdat object pointer
void RETURN

From EMBOSS 2.9.0


Section: Constructors

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

Functions:
embHitlistNewHitlist object constructor. This is normally called by the embHitlistRead function. Fore-knowledge of the number of hits is required.
embHitNewHit object constructor. This is normally called by the embHitlistNew function.
embSignatureNewSignature object constructor. This is normally called by the embSignatureReadNew function. Fore-knowledge of the number of signature positions is required.


Function embHitlistNew

Hitlist object constructor. This is normally called by the embHitlistRead function. Fore-knowledge of the number of hits is required.

Prototype

EmbPHitlist embHitlistNew (
      ajuint n
);

TypeNameRead/WriteDescription
ajuintnInputNumber of hits
EmbPHitlist RETURNPointer to a hitlist object

From EMBOSS 2.9.0


Function embHitNew

Hit object constructor. This is normally called by the embHitlistNew function.

Prototype

EmbPHit embHitNew (
      void
);

TypeNameRead/WriteDescription
EmbPHit RETURNPointer to a hit object

From EMBOSS 2.9.0


Function embSignatureNew

Signature object constructor. This is normally called by the embSignatureReadNew function. Fore-knowledge of the number of signature positions is required.

Prototype

EmbPSignature embSignatureNew (
      ajuint n
);

TypeNameRead/WriteDescription
ajuintnInputNumber of signature positions
EmbPSignature RETURNPointer to a Signature object

From EMBOSS 2.9.0


Section: Structure Destructors

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

Functions:
embHitlistDelDestructor for hitlist object.
embHitDelDestructor for hit object.
embSignatureDelDestructor for Signature object.


Function embHitlistDel

Destructor for hitlist object.

Prototype

void embHitlistDel (
      EmbPHitlist* ptr
);

TypeNameRead/WriteDescription
EmbPHitlist*ptrOutputHitlist object pointer
void RETURN

From EMBOSS 2.9.0


Function embHitDel

Destructor for hit object.

Prototype

void embHitDel (
      EmbPHit* ptr
);

TypeNameRead/WriteDescription
EmbPHit*ptrOutputHit object pointer
void RETURN

From EMBOSS 2.9.0


Function embSignatureDel

Destructor for Signature object.

Prototype

void embSignatureDel (
      EmbPSignature* ptr
);

TypeNameRead/WriteDescription
EmbPSignature*ptrOutputSignature 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:
embHitMergeCreates a new Hit object which corresponds to a merging of the two sequences from the Hit objects hit1 and hit2.


Function embHitMerge

Creates a new Hit object which corresponds to a merging of the two sequences from the Hit objects hit1 and hit2.

Prototype

EmbPHit embHitMerge (
      const EmbPHit hit1,
      const EmbPHit hit2
);

TypeNameRead/WriteDescription
const EmbPHithit1InputHit 1
const EmbPHithit2InputHit 2
EmbPHit RETURNPointer to Hit object.

From EMBOSS 2.9.0


Section: Operators

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

Functions:
embHitlistMatchFoldFunction to sort Hitlist object by Fold element.
embMatchScoreFunction to sort Hit objects by score record. Usually called by ajListSort.
embMatchinvScoreFunction to sort Hit objects by score record. Usually called by ajListSort. The sorting order is inverted - i.e. it returns -1 if score1 > score2 (as opposed to embMatchScore).
embMatchLigidFunction to sort Hit objects by Ligid record (referenced via Sig element).
embMatchSNFunction to sort Hit objects by sn element within Sig element. Usually called by ajListSort.


Function embHitlistMatchFold

Function to sort Hitlist object by Fold element.

Prototype

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

TypeNameRead/WriteDescription
const void*hit1InputPointer to Hitlist object 1
const void*hit2InputPointer to Hitlist object 2
ajint RETURN-1 if Fold1 should sort before Fold2, +1 if the Fold2 should sort first. 0 if they are identical.

From EMBOSS 2.9.0


Function embMatchScore

Function to sort Hit objects by score record. Usually called by ajListSort.

Prototype

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

TypeNameRead/WriteDescription
const void*hit1InputPointer to Hit object 1
const void*hit2InputPointer to Hit object 2
ajint RETURN1 if score1<score2, 0 if score1==score2, else -1.

From EMBOSS 2.9.0


Function embMatchinvScore

Function to sort Hit objects by score record. Usually called by ajListSort. The sorting order is inverted - i.e. it returns -1 if score1 > score2 (as opposed to embMatchScore).

Prototype

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

TypeNameRead/WriteDescription
const void*hit1InputPointer to Hit object 1
const void*hit2InputPointer to Hit object 2
ajint RETURN1 if score1<score2, 0 if score1==score2, else -1.

From EMBOSS 2.9.0


Function embMatchLigid

Function to sort Hit objects by Ligid record (referenced via Sig element).

Prototype

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

TypeNameRead/WriteDescription
const void*hit1InputPointer to Hit object 1
const void*hit2InputPointer to Hit object 2
ajint RETURN-1 if Ligid1 should sort before Ligid2, +1 if the Ligid2 should sort first. 0 if they are identical.

From EMBOSS 3.0.0


Function embMatchSN

Function to sort Hit objects by sn element within Sig element. Usually called by ajListSort.

Prototype

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

TypeNameRead/WriteDescription
const void*hit1InputPointer to Hit object 1
const void*hit2InputPointer to Hit object 2
ajint RETURN1 if sn1<sn2, 0 if sn1==sn2, else -1.

From EMBOSS 3.0.0


Section: Reporters

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

Functions:
embHitsOverlapChecks for overlap between two hits.


Function embHitsOverlap

Checks for overlap between two hits.

Prototype

AjBool embHitsOverlap (
      const EmbPHit hit1,
      const EmbPHit hit2,
      ajuint n
);

TypeNameRead/WriteDescription
const EmbPHithit1InputPointer to hit object 1
const EmbPHithit2InputPointer to hit object 2
ajuintnInputThreshold number of residues for overlap
AjBool RETURNTrue if the overlap between the sequences is at least as long as the threshold. False otherwise.

From EMBOSS 2.9.0


Section: Input & output

These functions are used for formatted input and output to file.

Functions:
embHitReadFastaRead a hit object from a file in extended FASTA format (see documentation for the DOMAINATRIX "seqsearch" application).
embHitlistReadRead a hitlist object from a file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application).
embHitlistReadFastaRead a hitlist object from a file in extended FASTA format (see documentation for the DOMAINATRIX "seqsearch" application).
embHitlistReadNodeReads a scop families file (see documentation for the EMBASSY DOMAINATRIX package) and writes a list of Hitlist objects containing all domains matching the scop classification provided.
embHitlistReadNodeFastaReads a domain families file (see documentation for the EMBASSY DOMAINATRIX package) and writes a list of Hitlist objects containing all domains matching the domain classification provided.
embHitlistWriteWrite contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.
embHitlistWriteSubsetWrite contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Only those hits are written for which a 1 is given in the corresponding position in array of integers. Text for Class, Architecture, Topology, Fold, Superfamily and Family is only written if the text is available.
embHitlistWriteFastaWrite contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.
embHitlistWriteSubsetFastaWrite contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Only those hits are written for which a 1 is given in the corresponding position in array of integers. Text for Class, Architecture, Topology, Fold, Superfamily and Family is only written if the text is available.
embHitlistWriteHitFastaWrite contents of one Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.
embSignatureReadNewRead a Signature object from a file in embl-like format (see documentation for the DOMAINATRIX "sigscan" application).
embSignatureWriteWrite contents of a Signature object to an output file in embl-like format (see documentation for the DOMAINATRIX "sigscan" application).
embSignatureHitsReadReads a signature hits file, allocates a Hitlist object and writes it with hits from a signature hits file (see documentation for the DOMAINATRIX "sigscan" application). In other words, this function reads the results of a scan of a signature against a protein sequence database.
embSignatureHitsWriteWrites a list of AjOHit objects to an output file (see documentation for the DOMAINATRIX "sigscan" application). This is intended for displaying the results from scans of a signature against a protein sequence database. The Hitlist must have first been classified by a call to embHitlistClassify. Hits up to the first user-specified number of false hits are written.


Function embHitReadFasta

Read a hit object from a file in extended FASTA format (see documentation for the DOMAINATRIX "seqsearch" application).

Prototype

EmbPHit embHitReadFasta (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
EmbPHit RETURNHit object, or NULL if the file was not in extended FASTA (DHF) format (indicated by a token count of the the lines beginning with '>').

From EMBOSS 3.0.0


Function embHitlistRead

Read a hitlist object from a file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application).

Prototype

EmbPHitlist embHitlistRead (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
EmbPHitlist RETURNHitlist object

From EMBOSS 2.9.0


Function embHitlistReadFasta

Read a hitlist object from a file in extended FASTA format (see documentation for the DOMAINATRIX "seqsearch" application).

Prototype

EmbPHitlist embHitlistReadFasta (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
EmbPHitlist RETURNHitlist object

From EMBOSS 3.0.0


Function embHitlistReadNode

Reads a scop families file (see documentation for the EMBASSY DOMAINATRIX package) and writes a list of Hitlist objects containing all domains matching the scop classification provided.

Prototype

AjPList embHitlistReadNode (
      AjPFile inf,
      const AjPStr fam,
      const AjPStr sfam,
      const AjPStr fold,
      const AjPStr klass
);

TypeNameRead/WriteDescription
AjPFileinfModifyFile containing multiple Hitlist objects
const AjPStrfamInputFamily.
const AjPStrsfamInputSuperfamily.
const AjPStrfoldInputFold.
const AjPStrklassInputClass.
AjPList RETURNList of Hitlist objects or NULL.

From EMBOSS 2.9.0


Function embHitlistReadNodeFasta

Reads a domain families file (see documentation for the EMBASSY DOMAINATRIX package) and writes a list of Hitlist objects containing all domains matching the domain classification provided.

Prototype

AjPList embHitlistReadNodeFasta (
      AjPFile inf,
      const AjPStr fam,
      const AjPStr sfam,
      const AjPStr fold,
      const AjPStr klass
);

TypeNameRead/WriteDescription
AjPFileinfModifyFile containing multiple Hitlist objects
const AjPStrfamInputFamily.
const AjPStrsfamInputSuperfamily.
const AjPStrfoldInputFold.
const AjPStrklassInputClass.
AjPList RETURNList of Hitlist objects or NULL.

From EMBOSS 3.0.0


Function embHitlistWrite

Write contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.

Prototype

AjBool embHitlistWrite (
      AjPFile outf,
      const EmbPHitlist obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const EmbPHitlistobjInputHitlist object
AjBool RETURNTrue on success

From EMBOSS 2.9.0


Function embHitlistWriteSubset

Write contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Only those hits are written for which a 1 is given in the corresponding position in array of integers. Text for Class, Architecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Prototype

AjBool embHitlistWriteSubset (
      AjPFile outf,
      const EmbPHitlist obj,
      const AjPUint ok
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const EmbPHitlistobjInputHitlist object
const AjPUintokInputWhether hits are to be printed or not
AjBool RETURNTrue on success

From EMBOSS 2.9.0


Function embHitlistWriteFasta

Write contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.

Prototype

AjBool embHitlistWriteFasta (
      AjPFile outf,
      const EmbPHitlist obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const EmbPHitlistobjInputHitlist object
AjBool RETURNTrue on success

From EMBOSS 3.0.0


Function embHitlistWriteSubsetFasta

Write contents of a Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Only those hits are written for which a 1 is given in the corresponding position in array of integers. Text for Class, Architecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Prototype

AjBool embHitlistWriteSubsetFasta (
      AjPFile outf,
      const EmbPHitlist obj,
      const AjPUint ok
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const EmbPHitlistobjInputHitlist object
const AjPUintokInputWhether hits are to be printed or not
AjBool RETURNTrue on success

From EMBOSS 3.0.0


Function embHitlistWriteHitFasta

Write contents of one Hitlist object to an output file in embl-like format (see documentation for the DOMAINATRIX "seqsearch" application). Text for Class, Fold, Superfamily and Family is only written if the text is available.

Prototype

AjBool embHitlistWriteHitFasta (
      AjPFile outf,
      ajuint n,
      const EmbPHitlist obj
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
ajuintnInputNumber of hit
const EmbPHitlistobjInputHitlist object
AjBool RETURNTrue on success

From EMBOSS 3.0.0


Function embSignatureReadNew

Read a Signature object from a file in embl-like format (see documentation for the DOMAINATRIX "sigscan" application).

Prototype

EmbPSignature embSignatureReadNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
EmbPSignature RETURNSignature object

From EMBOSS 2.9.0


Function embSignatureWrite

Write contents of a Signature object to an output file in embl-like format (see documentation for the DOMAINATRIX "sigscan" application).

Prototype

AjBool embSignatureWrite (
      AjPFile outf,
      const EmbPSignature obj
);

TypeNameRead/WriteDescription
AjPFileoutfOutputOutput file stream
const EmbPSignatureobjInputSignature object
AjBool RETURNajTrue on success

From EMBOSS 2.9.0


Function embSignatureHitsRead

Reads a signature hits file, allocates a Hitlist object and writes it with hits from a signature hits file (see documentation for the DOMAINATRIX "sigscan" application). In other words, this function reads the results of a scan of a signature against a protein sequence database.

Prototype

EmbPHitlist embSignatureHitsRead (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
EmbPHitlist RETURNHitlist object that was allocated.

From EMBOSS 2.9.0


Function embSignatureHitsWrite

Writes a list of AjOHit objects to an output file (see documentation for the DOMAINATRIX "sigscan" application). This is intended for displaying the results from scans of a signature against a protein sequence database. The Hitlist must have first been classified by a call to embHitlistClassify. Hits up to the first user-specified number of false hits are written.

Prototype

AjBool embSignatureHitsWrite (
      AjPFile outf,
      const EmbPSignature sig,
      const EmbPHitlist hitlist,
      ajuint n
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const EmbPSignaturesigInputSignature object
const EmbPHitlisthitlistInputHitlist objects with hits from scan
ajuintnInputMax. no. false hits to output
AjBool RETURNTrue if file was written

From EMBOSS 2.9.0


Section: Miscellaneous

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

Functions:
embHitlistClassifyClassifies a list of signature-sequence hits (held in a Hitlist object) according to list of target sequences (a list of Hitlist objects).
embSignatureCompileFunction to compile a signature: calls embSigposNew to allocate an array of AjOSigpos objects within an AjOSignature object, and then writes this array. The signature must first have been allocated by using the embSignatureNew function.
embSignatureAlignSeqPerforms an alignment of a signature to a protein sequence. The signature must have first been compiled by calling the embSignatureCompile function. A Hit object is written.
embSignatureAlignSeqallAligns a signature to a set of sequences and writes a Hitlist object with the results. The top-scoring <n> hits are written. The signature must have first been compiled by calling the embSignatureCompile function. Memory for an Hitlist object must be allocated beforehand by using the Hitlist constructor with an arg. of 0.
embSigExitCleanup of signature function internals.


Function embHitlistClassify

Classifies a list of signature-sequence hits (held in a Hitlist object) according to list of target sequences (a list of Hitlist objects).

Prototype

AjBool embHitlistClassify (
      EmbPHitlist hitlist,
      const AjPList targets,
      ajuint thresh
);

TypeNameRead/WriteDescription
EmbPHitlisthitlistModifyHitlist object with hits
const AjPListtargetsInputList of AjOHitlist objects with targets
ajuintthreshInputMinimum length (residues) of overlap required for two hits with the same code to be counted as the same hit.
AjBool RETURNTrue on success, else False

From EMBOSS 2.9.0


Function embSignatureCompile

Function to compile a signature: calls embSigposNew to allocate an array of AjOSigpos objects within an AjOSignature object, and then writes this array. The signature must first have been allocated by using the embSignatureNew function.

Prototype

AjBool embSignatureCompile (
      EmbPSignature* S,
      float gapo,
      float gape,
      const AjPMatrixf matrix
);

TypeNameRead/WriteDescription
EmbPSignature*SOutputSignature object
floatgapoInputGap opening penalty
floatgapeInputGap extension penalty
const AjPMatrixfmatrixInputResidue substitution matrix
AjBool RETURNTrue if array was written succesfully.

From EMBOSS 2.9.0


Function embSignatureAlignSeq

Performs an alignment of a signature to a protein sequence. The signature must have first been compiled by calling the embSignatureCompile function. A Hit object is written.

Prototype

AjBool embSignatureAlignSeq (
      const EmbPSignature S,
      const AjPSeq seq,
      EmbPHit* hit,
      ajuint nterm
);

TypeNameRead/WriteDescription
const EmbPSignatureSInputSignature object
const AjPSeqseqInputProtein sequence
EmbPHit*hitOutputHit object pointer
ajuintntermInputN-terminal matching option
AjBool RETURNTrue if a signature-sequence alignment was successful and the Hit object was written. Returns False if there was an internal error, bad arg's etc. or in cases where a sequence is rejected because of N-terminal matching options).

From EMBOSS 2.9.0


Function embSignatureAlignSeqall

Aligns a signature to a set of sequences and writes a Hitlist object with the results. The top-scoring <n> hits are written. The signature must have first been compiled by calling the embSignatureCompile function. Memory for an Hitlist object must be allocated beforehand by using the Hitlist constructor with an arg. of 0.

Prototype

AjBool embSignatureAlignSeqall (
      const EmbPSignature sig,
      AjPSeqall db,
      ajuint n,
      EmbPHitlist* hitlist,
      ajuint nterm
);

TypeNameRead/WriteDescription
const EmbPSignaturesigInputSignature object
AjPSeqalldbModifyProtein sequences
ajuintnInputMax. number of top-scoring hits to store
EmbPHitlist*hitlistOutputHitlist object pointer
ajuintntermInputN-terminal matching option
AjBool RETURNTrue if Hitlist object was written succesfully.

From EMBOSS 2.9.0


Function embSigExit

Cleanup of signature function internals.

Prototype

void embSigExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.1.0