ajdmx.c


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.

Function ajDmxScophitNew

Scophit object constructor.

Synopsis

Prototype

AjPScophit ajDmxScophitNew (
      void
);

Returns

AjPScophit:Pointer to a Scophit object

Description

Scophit object constructor.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgNew

Scopalg object constructor. This is normally called by the ajDmxScopalgRead function. Fore-knowledge of the number of sequences is required.

Synopsis

Prototype

AjPScopalg ajDmxScopalgNew (
      ajint n
);

Input

n:(Input)Number of sequences

Returns

AjPScopalg:Pointer to a Scopalg object

Description

Scopalg object constructor. This is normally called by the ajDmxScopalgRead function. Fore-knowledge of the number of sequences is required.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgRead

Read a Scopalg object from a file.

Synopsis

Prototype

AjBool ajDmxScopalgRead (
      AjPFile inf,
      AjPScopalg* thys
);

Output

thys:(Output)Scopalg object

Input & Output

inf:(Modify)Input file stream

Returns

AjBool:True if the file contained any data, even an empty alignment. False if the file did not contain a 'TY' record, which is taken to indicate a domain alignment file.

Description

Read a Scopalg object from a file.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

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.

Function ajDmxScophitDel

Destructor for Scophit object.

Synopsis

Prototype

void ajDmxScophitDel (
      AjPScophit* pthis
);

Output

pthis:(Output)Scophit object pointer

Returns

void:No return value

Description

Destructor for Scophit object.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitDelWrap

Wrapper to destructor for Scophit object for use with generic functions.

Synopsis

Prototype

void ajDmxScophitDelWrap (
      const void** ptr
);

Output

ptr:(Delete)Object pointer

Returns

void:No return value

Description

Wrapper to destructor for Scophit object for use with generic functions.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgDel

Destructor for Scopalg object.

Synopsis

Prototype

void ajDmxScopalgDel (
      AjPScopalg* pthis
);

Output

pthis:(Delete)Scopalg object pointer

Returns

void:No return value

Description

Destructor for Scopalg object.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

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.

Function ajDmxScophitListCopy

Read a list of Scophit structures and returns a pointer to a duplicate of the list.

Synopsis

Prototype

AjPList ajDmxScophitListCopy (
      const AjPList ptr
);

Input

ptr:(Input)List of Scophit objects

Returns

AjPList:True on success (list was duplicated ok)

Description

Read a list of Scophit structures and returns a pointer to a duplicate of the list.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCopy

Copies the contents from one Scophit object to another.

Synopsis

Prototype

AjBool ajDmxScophitCopy (
      AjPScophit* to,
      const AjPScophit from
);

Input

from:(Input)Scophit object

Output

to:(Output)Scophit object pointer

Returns

AjBool:True if copy was successful.

Description

Copies the contents from one Scophit object to another.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Modifiers

These functions use the contents of an instance and update them.

Function ajDmxScophitTargetLowPriority

Sets the Target element of a Scophit object to True if its Priority is low.

Synopsis

Prototype

AjBool ajDmxScophitTargetLowPriority (
      AjPScophit* h
);

Input & Output

h:(Modify)Pointer to Scophit object

Returns

AjBool:True on success. False otherwise.

Description

Sets the Target element of a Scophit object to True if its Priority is low.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitTarget2

Sets the Target2 element of a Scophit object to True.

Synopsis

Prototype

AjBool ajDmxScophitTarget2 (
      AjPScophit* h
);

Input & Output

h:(Modify)Pointer to Scophit object

Returns

AjBool:True on success. False otherwise.

Description

Sets the Target2 element of a Scophit object to True.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitTarget

Sets the Target element of a Scophit object to True.

Synopsis

Prototype

AjBool ajDmxScophitTarget (
      AjPScophit* h
);

Input & Output

h:(Modify)Pointer to Scophit object

Returns

AjBool:True on success. False otherwise.

Description

Sets the Target element of a Scophit object to True.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Operators

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

Function ajDmxScophitCheckTarget

Checks to see if the Target element of a Scophit object == ajTrue.

Synopsis

Prototype

AjBool ajDmxScophitCheckTarget (
      const AjPScophit ptr
);

Input

ptr:(Input)Scophit object pointer

Returns

AjBool:Returns ajTrue if the Target element of the Scophit object == ajTrue, returns ajFalse otherwise.

Description

Checks to see if the Target element of a Scophit object == ajTrue.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Reporters

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

Function ajDmxScophitCompScore

Function to sort Scophit objects by Score element. Usually called by ajListSort.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Hit object 1
hit2:(Input)Pointer to Hit object 2

Returns

ajint:1 if score1

Description

Function to sort Scophit objects by Score element. Usually called by ajListSort.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompPval

Function to sort AjOScophit objects by Pval record. Usually called by ajListSort.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Hit object 1
hit2:(Input)Pointer to Hit object 2

Returns

ajint:1 if Pval1>Pval2, 0 if Pval1==Pval2, else -1.

Description

Function to sort AjOScophit objects by Pval record. Usually called by ajListSort.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompAcc

Function to sort Scophit objects by Acc element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Acc1 should sort before Acc2, +1 if the Acc2 should sort first. 0 if they are identical in length and content.

Description

Function to sort Scophit objects by Acc element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompSunid

Function to sort Scophit object by Sunid_Family.

Synopsis

Prototype

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

Input

entry1:(Input)Pointer to AjOScophit object 1
entry2:(Input)Pointer to AjOScophit object 2

Returns

ajint:-1 if Sunid_Family1 < Sunid_Family2, +1 if the Sunid_Family2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Sunid_Family.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompSpr

Function to sort Scophit object by Spr element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Spr1 should sort before Spr2, +1 if the Spr2 should sort first. 0 if they are identical in length and content.

Description

Function to sort Scophit object by Spr element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompEnd

Function to sort Scophit object by End element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if End1 should sort before End2, +1 if the End2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by End element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompStart

Function to sort Scophit object by Start element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Start1 should sort before Start2, +1 if the Start2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Start element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompFam

Function to sort Scophit object by Family element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Family1 should sort before Family2, +1 if the Family2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Family element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompSfam

Function to sort Scophit object by Superfamily element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Superfamily1 should sort before Superfamily2, +1 if the Superfamily2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Superfamily element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompClass

Function to sort Scophit object by Class element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Class1 should sort before Class2, +1 if the Class2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Class element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitCompFold

Function to sort Scophit object by Fold element.

Synopsis

Prototype

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

Input

hit1:(Input)Pointer to Scophit object 1
hit2:(Input)Pointer to Scophit object 2

Returns

ajint:-1 if Fold1 should sort before Fold2, +1 if the Fold2 should sort first. 0 if they are identical.

Description

Function to sort Scophit object by Fold element.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgGetseqs

Read a Scopalg object and writes an array of AjPStr containing the sequences without gaps.

Synopsis

Prototype

ajint ajDmxScopalgGetseqs (
      const AjPScopalg thys,
      AjPStr** arr
);

Input

thys:(Input)Scopalg object

Output

arr:(Output)Array of AjPStr

Returns

ajint:Number of sequences read

Description

Read a Scopalg object and writes an array of AjPStr containing the sequences without gaps.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitsWrite

Write contents of a list of Scophits to an output file in embl-like format Text for Class, Archhitecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Synopsis

Prototype

AjBool ajDmxScophitsWrite (
      AjPFile outf,
      const AjPList list
);

Input

list:(Input)List object

Output

outf:(Output)Output file stream

Returns

AjBool:True on success

Description

Write contents of a list of Scophits to an output file in embl-like format Text for Class, Archhitecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitsWriteFasta

Write contents of a list of Scophits to an output file in DHF format Text for Class, Archhitecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Synopsis

Prototype

AjBool ajDmxScophitsWriteFasta (
      AjPFile outf,
      const AjPList list
);

Input

list:(Input)List object

Output

outf:(Output)Output file stream

Returns

AjBool:True on success

Description

Write contents of a list of Scophits to an output file in DHF format Text for Class, Archhitecture, Topology, Fold, Superfamily and Family is only written if the text is available.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScophitReadFasta

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

Synopsis

Prototype

AjPScophit ajDmxScophitReadFasta (
      AjPFile inf
);

Input & Output

inf:(Modify)Input file stream

Returns

AjPScophit:Scophit object, or NULL if the file was not in extended FASTA (DHF) format (indicated by a token count of the the lines beginning with '>').

Description

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

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgWrite

Write a Scopalg object to file in EMBOSS simple multiple sequence format (same as that used by clustal) annotated with domain classification as below (records are for SCOP domains in this example):

# TY SCOP # XX # CL Alpha and beta proteins (a+b) # XX # FO Phospholipase D/nuclease # XX # SF Phospholipase D/nuclease # XX # FA Phospholipase D # XX # SI 64391 # XX d1f0ia1 1 AATPHLDAVEQTLRQVSPGLEGDVWERTSGNKLDGSAADPSDWLLQTP-GCWGDDKC 50 d1f0ia2 1 -----------------------------NVPV---------IAVG-GLG---VGIK 15

d1f0ia1 51 A-------------------------------D-RVGTKRLLAKMTENIGNATRTVD 75 d1f0ia2 16 DVDPKSTFRPDLPTASDTKCVVGLHDNTNADRDYDTV-NPEESALRALVASAKGHIE 65

Synopsis

Prototype

AjBool ajDmxScopalgWrite (
      const AjPScopalg scop,
      AjPFile outf
);

Input

scop:(Input)Scopalg object

Input & Output

outf:(Modify)Output file stream

Returns

AjBool:True on success (an alignment was written)

Description

Write a Scopalg object to file in EMBOSS simple multiple sequence format (same as that used by clustal) annotated with domain classification as below (records are for SCOP domains in this example):

# TY SCOP # XX # CL Alpha and beta proteins (a+b) # XX # FO Phospholipase D/nuclease # XX # SF Phospholipase D/nuclease # XX # FA Phospholipase D # XX # SI 64391 # XX d1f0ia1 1 AATPHLDAVEQTLRQVSPGLEGDVWERTSGNKLDGSAADPSDWLLQTP-GCWGDDKC 50 d1f0ia2 1 -----------------------------NVPV---------IAVG-GLG---VGIK 15

d1f0ia1 51 A-------------------------------D-RVGTKRLLAKMTENIGNATRTVD 75 d1f0ia2 16 DVDPKSTFRPDLPTASDTKCVVGLHDNTNADRDYDTV-NPEESALRALVASAKGHIE 65

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgWriteClustal

Writes a Scopalg object to a specified file in CLUSTAL format (just the alignment without the domain classification information).

Synopsis

Prototype

AjBool ajDmxScopalgWriteClustal (
      const AjPScopalg align,
      AjPFile outf
);

Input

align:(Input)Scopalg object

Input & Output

outf:(Modify)Outfile file pointer

Returns

AjBool:True on success (a file has been written)

Description

Writes a Scopalg object to a specified file in CLUSTAL format (just the alignment without the domain classification information).

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgWriteClustal2

Writes a Scopalg object to a specified file in CLUSTAL format (just the alignment without the domain classification information).

Synopsis

Prototype

AjBool ajDmxScopalgWriteClustal2 (
      const AjPScopalg align,
      AjPFile outf
);

Input

align:(Input)Scopalg object.

Input & Output

outf:(Modify)Outfile file pointer.

Returns

AjBool:True on success (a file has been written)

Description

Writes a Scopalg object to a specified file in CLUSTAL format (just the alignment without the domain classification information).

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxScopalgWriteFasta

Writes a Scopalg object to a specified file in FASTA format (just the alignment without the domain classification information).

Synopsis

Prototype

AjBool ajDmxScopalgWriteFasta (
      const AjPScopalg align,
      AjPFile outf
);

Input

align:(Input)A list Hitlist structures.

Input & Output

outf:(Modify)Outfile file pointer

Returns

AjBool:True on success (a file has been written)

Description

Writes a Scopalg object to a specified file in FASTA format (just the alignment without the domain classification information).

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Miscellaneous

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

Function ajDmxScopSeqFromSunid

Writes a sequence corresponding to a Scop domain given a Sunid for the domain. The sequence is taken from one of a list of Scop objects that is provided. The swissprot sequence is taken in priority over the pdb sequence.

Synopsis

Prototype

AjBool ajDmxScopSeqFromSunid (
      ajint id,
      AjPStr* seq,
      const AjPList list
);

Input

id:(Input)Search term
list:(Input)Sorted list of Scop objects

Output

seq:(Output)Result sequence

Returns

AjBool:True if a swissprot identifier code was found for the Pdb code.

Description

Writes a sequence corresponding to a Scop domain given a Sunid for the domain. The sequence is taken from one of a list of Scop objects that is provided. The swissprot sequence is taken in priority over the pdb sequence.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0

Function ajDmxDummyFunction

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

Synopsis

Prototype

void ajDmxDummyFunction (
      void
);

Returns

void:No return value

Description

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

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 3.0.0