embdmx.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 embDmxScophitsToHitlist

Reads from a list of Scophit objects and writes a Hitlist object with the next block of hits with identical SCOP classification. If the iterator passed in is NULL it will read from the start of the list, otherwise it will read from the current position. Memory for the Hitlist will be allocated if necessary and must be freed by the user.

Synopsis

Prototype

AjBool embDmxScophitsToHitlist (
      const AjPList in,
      AjPHitlist* out,
      AjIList* iter
);

Input

in:(Input)List of pointers to Scophit objects

Output

out:(Output)Pointer to Hitlist object

Input & Output

iter:(Modify)Pointer to iterator for list.

Returns

AjBool:True on success (lists were processed ok)

Description

Reads from a list of Scophit objects and writes a Hitlist object with the next block of hits with identical SCOP classification. If the iterator passed in is NULL it will read from the start of the list, otherwise it will read from the current position. Memory for the Hitlist will be allocated if necessary and must be freed by the user.

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 embDmxScophitToHit

Copies the contents from a Scophit to a Hit object. Creates the Hit object if necessary.

Synopsis

Prototype

AjBool embDmxScophitToHit (
      AjPHit* to,
      const AjPScophit from
);

Input

from:(Input)Scophit object

Output

to:(Output)Hit object pointer

Returns

AjBool:True if copy was successful.

Description

Copies the contents from a Scophit to a Hit object. Creates the Hit object if necessary.

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 embDmxScophitsAccToHitlist

Reads from a list of Scophit objects and writes a Hitlist object with the next block of hits with identical SCOP classification. A Hit is only written to the Hitlist if an accession number is given. Also, only one of any pair of duplicate hits (overlapping hits with identical accession) will be written to the Hitlist. An 'overlap' is defined as a shared region of 10 or more residues. To check for these the list is first be sorted by Accession number.

If the iterator passed in is NULL it will read from the start of the list, otherwise it will read from the current position. Memory for the Hitlist will be allocated if necessary and must be freed by the user.

Synopsis

Prototype

AjBool embDmxScophitsAccToHitlist (
      const AjPList in,
      AjPHitlist* out,
      AjIList* iter
);

Input

in:(Input)List of pointers to Scophit objects

Output

out:(Output)Pointer to Hitlist object

Input & Output

iter:(Modify)Pointer to iterator for list.

Returns

AjBool:True on success (lists were processed ok)

Description

Reads from a list of Scophit objects and writes a Hitlist object with the next block of hits with identical SCOP classification. A Hit is only written to the Hitlist if an accession number is given. Also, only one of any pair of duplicate hits (overlapping hits with identical accession) will be written to the Hitlist. An 'overlap' is defined as a shared region of 10 or more residues. To check for these the list is first be sorted by Accession number.

If the iterator passed in is NULL it will read from the start of the list, otherwise it will read from the current position. Memory for the Hitlist will be allocated if necessary and must be freed by the user.

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 embDmxHitsWrite

Writes a list of AjOHit objects to an output file. This is intended for displaying the results from scans of a model against a protein sequence database. Output in a sigplot compatible format.

Synopsis

Prototype

AjBool embDmxHitsWrite (
      AjPFile outf,
      const AjPHitlist hits,
      ajint maxhits
);

Input

hits:(Input)Hitlist objects with hits from scan
maxhits:(Input)Max. hits to write.

Input & Output

outf:(Modify)Output file stream

Returns

AjBool:True if file was written

Description

Writes a list of AjOHit objects to an output file. This is intended for displaying the results from scans of a model against a protein sequence database. Output in a sigplot compatible format.

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 embDmxScopToScophit

Writes a Scophit structure with the common information in a Scop structure. The swissprot sequence is taken in preference to the pdb sequence.

Synopsis

Prototype

AjBool embDmxScopToScophit (
      const AjPScop source,
      AjPScophit* target
);

Input

source:(Input)The Scop object to convert

Output

target:(Output)Destination of the the scophit structure to write to.

Returns

AjBool:ajTrue on the success of creating a Scophit structure.

Description

Writes a Scophit structure with the common information in a Scop structure. The swissprot sequence is taken in preference to 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 embDmxScopalgToScop

Takes a Scopalg object (scop alignment) and an array of Scop objects taken from, e.g. a scop classification file. Extracts the scop domain codes from the alignment and compiles a list of corresponding Scop objects from the scop classification file.

Synopsis

Prototype

AjBool embDmxScopalgToScop (
      const AjPScopalg align,
      AjPScop const* scop_arr,
      ajint scop_dim,
      AjPList* list
);

Input

align:(Input)Contains a seed alignment.
scop_arr:(Input)Array of AjPScop objects
scop_dim:(Input)Size of array

Output

list:(Output)List of Scop objects.

Returns

AjBool:A populated list has been returned (a file has been written)

Description

Takes a Scopalg object (scop alignment) and an array of Scop objects taken from, e.g. a scop classification file. Extracts the scop domain codes from the alignment and compiles a list of corresponding Scop objects from the scop classification 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

Function embDmxScophitsOverlapAcc

Checks for overlap and identical accession numbers between two hits.

Synopsis

Prototype

AjBool embDmxScophitsOverlapAcc (
      const AjPScophit h1,
      const AjPScophit h2,
      ajint n
);

Input

h1:(Input)Pointer to hit object 1
h2:(Input)Pointer to hit object 2
n:(Input)Threshold number of residues for overlap

Returns

AjBool:True if the overlap between the sequences is at least as long as the threshold. False otherwise.

Description

Checks for overlap and identical accession numbers between two hits.

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 embDmxScophitsOverlap

Checks for overlap between two hits.

Synopsis

Prototype

AjBool embDmxScophitsOverlap (
      const AjPScophit h1,
      const AjPScophit h2,
      ajint n
);

Input

h1:(Input)Pointer to hit object 1
h2:(Input)Pointer to hit object 2
n:(Input)Threshold number of residues for overlap

Returns

AjBool:True if the overlap between the sequences is at least as long as the threshold. False otherwise.

Description

Checks for overlap between two hits.

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 embDmxScophitMerge

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

The Typeobj of the merged hit is set. The merged hit is classified as follows : If hit1 or hit2 is a SEED, the merged hit is classified as a SEED. Otherwise, if hit1 or hit2 is HIT, the merged hit is clsasified as a HIT. If hit1 and hit2 are both OTHER, the merged hit remains classified as OTHER.

Synopsis

Prototype

AjPScophit embDmxScophitMerge (
      const AjPScophit hit1,
      const AjPScophit hit2
);

Input

hit1:(Input)Scophit 1
hit2:(Input)Scophit 2

Returns

AjPScophit:Pointer to Scophit object.

Description

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

The Typeobj of the merged hit is set. The merged hit is classified as follows : If hit1 or hit2 is a SEED, the merged hit is classified as a SEED. Otherwise, if hit1 or hit2 is HIT, the merged hit is clsasified as a HIT. If hit1 and hit2 are both OTHER, the merged hit remains classified as OTHER.

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 embDmxScophitMergeInsertOther

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertOther (
      AjPList list,
      AjPScophit hit1,
      AjPScophit hit2
);

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

list:(Modify)List of Scophit objects

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to 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

Function embDmxScophitMergeInsertOtherTarget

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertOtherTarget (
      AjPList list,
      AjPScophit hit1,
      AjPScophit hit2
);

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

list:(Modify)List of Scophit objects

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to 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

Function embDmxScophitMergeInsertOtherTargetBoth

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertOtherTargetBoth (
      AjPList list,
      AjPScophit hit1,
      AjPScophit hit2
);

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

list:(Modify)List of Scophit objects

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Appends the new Scophit onto a list. Target hit1 and hit2 for removal (set the Target element to 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

Function embDmxScophitMergeInsertThis

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1 and hit2 for removal (set the Target element to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertThis (
      const AjPList list,
      AjPScophit hit1,
      AjPScophit hit2,
      AjIList iter
);

Input

list:(Input)List of Scophit objects

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

iter:(Modify)List iterator

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1 and hit2 for removal (set the Target element to 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

Function embDmxScophitMergeInsertThisTarget

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1, hit2 and the new Scophit for removal (set the Target element to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertThisTarget (
      const AjPList list,
      AjPScophit hit1,
      AjPScophit hit2,
      AjIList iter
);

Input

list:(Input)List of Scophit objects

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

iter:(Modify)List iterator

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1, hit2 and the new Scophit for removal (set the Target element to 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

Function embDmxScophitMergeInsertThisTargetBoth

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1, hit2 and the new Scophit for removal (both the Target and Target2 elements are set to ajTrue).

Synopsis

Prototype

AjBool embDmxScophitMergeInsertThisTargetBoth (
      const AjPList list,
      AjPScophit hit1,
      AjPScophit hit2,
      AjIList iter
);

Input

list:(Input)List of Scophit objects

Output

hit1:(Delete)Scophit object 1
hit2:(Delete)Scophit object 2

Input & Output

iter:(Modify)List iterator

Returns

AjBool:True on success.

Description

Creates a new Scophit object which corresponds to a merging of two Scophit objects hit1 and hit2. Insert the new Scophit immediately after hit2. Target hit1, hit2 and the new Scophit for removal (both the Target and Target2 elements are set to 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

Function embDmxSeqNR

Reads a list of AjPSeq's and writes an array describing the redundancy in the list. Elements in the array correspond to sequences in the list, i.e. the array[0] corresponds to the first sequence in the list.

Sequences are classed as redundant (0 in the array, i.e. they are possibly to be discarded later) if they exceed a threshold (%) level of sequence similarity to any other in the set (the shortest sequence of the current pair will be discarded). If, however, the CheckGarbage argument is set ON (True) then the the sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If the CheckGarbage argument is set OFF (False) the shortest sequence is marked as redundant as normal.

The set output will always contain at least 1 sequence.

Synopsis

Prototype

AjBool embDmxSeqNR (
      const AjPList input,
      AjPInt* keep,
      ajint* nset,
      const AjPMatrixf matrix,
      float gapopen,
      float gapextend,
      float thresh,
      AjBool CheckGarbage
);

Input

input:(Input)List of ajPSeq's
matrix:(Input)Residue substitution matrix
gapopen:(Input)Gap insertion penalty
gapextend:(Input)Gap extension penalty
thresh:(Input)Threshold residue id. for "redundancy"
CheckGarbage:(Input)If True, when two sequences are compared and deemed redundant, then the Sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If False, the shortest sequence is marked as redundant as normal.

Output

keep:(Output)0: rejected (redundant) sequence, 1: the sequence was retained
nset:(Output)Number of non-garbage sequences in nr set

Returns

AjBool:ajTrue on success

Description

Reads a list of AjPSeq's and writes an array describing the redundancy in the list. Elements in the array correspond to sequences in the list, i.e. the array[0] corresponds to the first sequence in the list.

Sequences are classed as redundant (0 in the array, i.e. they are possibly to be discarded later) if they exceed a threshold (%) level of sequence similarity to any other in the set (the shortest sequence of the current pair will be discarded). If, however, the CheckGarbage argument is set ON (True) then the the sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If the CheckGarbage argument is set OFF (False) the shortest sequence is marked as redundant as normal.

The set output will always contain at least 1 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 embDmxSeqNRRange

Reads a list of AjPSeq's and writes an array describing the redundancy in the list. Elements in the array correspond to sequences in the list, i.e. the array[0] corresponds to the first sequence in the list.

Sequences are classed as redundant (0 in the array, i.e. they are possibly to be discarded later) if they lie outside a range of threshold (%) sequence similarity to others in the set (the shortest sequence of the current pair will be discarded). If, however, the CheckGarbage argument is set ON (True) then the the sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If the CheckGarbage argument is set OFF (False) the shortest sequence is marked as redundant as normal.

Synopsis

Prototype

AjBool embDmxSeqNRRange (
      const AjPList input,
      AjPInt* keep,
      ajint* nset,
      const AjPMatrixf matrix,
      float gapopen,
      float gapextend,
      float threshlow,
      float threshup,
      AjBool CheckGarbage
);

Input

input:(Input)List of ajPSeq's
matrix:(Input)Residue substitution matrix
gapopen:(Input)Gap insertion penalty
gapextend:(Input)Gap extension penalty
threshlow:(Input)Threshold lower limit
threshup:(Input)Threshold upper limit
CheckGarbage:(Input)If True, when two sequences are compared and deemed redundant, then the Sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If False, the shortest sequence is marked as redundant as normal.

Output

keep:(Output)0: rejected (redundant) sequence, 1: the sequence was retained
nset:(Output)Number of non-garbage sequences in nr set.

Returns

AjBool:ajTrue on success

Description

Reads a list of AjPSeq's and writes an array describing the redundancy in the list. Elements in the array correspond to sequences in the list, i.e. the array[0] corresponds to the first sequence in the list.

Sequences are classed as redundant (0 in the array, i.e. they are possibly to be discarded later) if they lie outside a range of threshold (%) sequence similarity to others in the set (the shortest sequence of the current pair will be discarded). If, however, the CheckGarbage argument is set ON (True) then the the sequence that is *not* garbage is marked up as redundant. A sequence is "garbage" if the Garbage element of the data structure is set. If the CheckGarbage argument is set OFF (False) the shortest sequence is marked as redundant as normal.

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 embDmxSeqCompall

Reads a list of AjPSeq's and writes an array of sequence similarity values for an all-versus-all comparison of the sequences. The rows and columns in the array correspond to the order of the sequences in the list.

Synopsis

Prototype

AjBool embDmxSeqCompall (
      const AjPList input,
      AjPFloat2d* scores,
      const AjPMatrixf matrix,
      float gapopen,
      float gapextend
);

Input

input:(Input)List of ajPSeq's
matrix:(Input)Residue substitution matrix
gapopen:(Input)Gap insertion penalty
gapextend:(Input)Gap extension penalty

Output

scores:(Output)Sequence similarity values

Returns

AjBool:ajTrue on success

Description

Reads a list of AjPSeq's and writes an array of sequence similarity values for an all-versus-all comparison of the sequences. The rows and columns in the array correspond to the order of the sequences in 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 embDmxScophitReadAllFasta

Reads a DHF file and returns a list of Scophit objects. Parsing routine is identical to embHitlistReadFasta.

Synopsis

Prototype

AjPList embDmxScophitReadAllFasta (
      AjPFile inf
);

Input & Output

inf:(Modify)DHF file.

Returns

AjPList:List of Scophit object pointers, or NULL (error).

Description

Reads a DHF file and returns a list of Scophit objects. Parsing routine is identical to embHitlistReadFasta.

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 embDmxHitlistToScophits

Read from a list of Hitlist structures and writes a list of Scophit structures.

Synopsis

Prototype

AjBool embDmxHitlistToScophits (
      const AjPList in,
      AjPList* out
);

Input

in:(Input)List of pointers to Hitlist structures

Output

out:(Output)Pointer to list of Scophit structures

Returns

AjBool:True on success (lists were processed ok)

Description

Read from a list of Hitlist structures and writes a list of Scophit structures.

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