embdmx.c


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:
embDmxNrseqNewCreates an empty non redundant sequence object
embDmxScophitsToHitlistReads 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.
embDmxScophitToHitCopies the contents from a Scophit to a Hit object. Creates the Hit object if necessary.
embDmxScophitsAccToHitlistReads 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.
embDmxHitsWriteWrites 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.
embDmxScopToScophitWrites a Scophit structure with the common information in a Scop structure. The swissprot sequence is taken in preference to the pdb sequence.
embDmxScopalgToScopTakes 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.
embDmxScophitsOverlapAccChecks for overlap and identical accession numbers between two hits.
embDmxScophitsOverlapChecks for overlap between two hits.
embDmxScophitMergeCreates a new Scophit object which corresponds to a merging of the two sequences from the Scophit objects hit1 and hit2.
embDmxScophitMergeInsertOtherCreates 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).
embDmxScophitMergeInsertOtherTargetCreates 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).
embDmxScophitMergeInsertOtherTargetBothCreates 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).
embDmxScophitMergeInsertThisCreates 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).
embDmxScophitMergeInsertThisTargetCreates 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).
embDmxScophitMergeInsertThisTargetBothCreates 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).
embDmxSeqNRReads 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.
embDmxSeqNRRangeReads 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.
embDmxSeqCompallReads 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.
embDmxScophitReadAllFastaReads a DHF file and returns a list of Scophit objects. Parsing routine is identical to embHitlistReadFasta.
embDmxHitlistToScophitsRead from a list of Hitlist structures and writes a list of Scophit structures.


Function embDmxNrseqNew

Creates an empty non redundant sequence object

Prototype

EmbPDmxNrseq embDmxNrseqNew (
      const AjPSeq seq
);

TypeNameRead/WriteDescription
const AjPSeqseqInputSequence object
EmbPDmxNrseq RETURNNew non-redundant sequence object

From EMBOSS 6.1.0


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.

Prototype

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

TypeNameRead/WriteDescription
const AjPListinInputList of pointers to Scophit objects
EmbPHitlist*outOutputPointer to Hitlist object
AjIList*iterModifyPointer to iterator for list.
AjBool RETURNTrue on success (lists were processed ok)

From EMBOSS 2.9.0


Function embDmxScophitToHit

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

Prototype

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

TypeNameRead/WriteDescription
EmbPHit*toOutputHit object pointer
const AjPScophitfromInputScophit object
AjBool RETURNTrue if copy was successful.

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPListinInputList of pointers to Scophit objects
EmbPHitlist*outOutputPointer to Hitlist object
AjIList*iterModifyPointer to iterator for list.
AjBool RETURNTrue on success (lists were processed ok)

From EMBOSS 2.9.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.

Prototype

AjBool embDmxHitsWrite (
      AjPFile outf,
      EmbPHitlist hits,
      ajint maxhits
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
EmbPHitlisthitsModifyHitlist objects with hits from scan
ajintmaxhitsInputMax. hits to write.
AjBool RETURNTrue if file was written

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPScopsourceInputThe Scop object to convert
AjPScophit*targetOutputDestination of the the scophit structure to write to.
AjBool RETURNajTrue on the success of creating a Scophit structure.

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPScopalgalignInputContains a seed alignment.
AjPScop const*scop_arrInputArray of AjPScop objects
ajintscop_dimInputSize of array
AjPList*listOutputList of Scop objects.
AjBool RETURNA populated list has been returned (a file has been written)

From EMBOSS 2.9.0


Function embDmxScophitsOverlapAcc

Checks for overlap and identical accession numbers between two hits.

Prototype

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

TypeNameRead/WriteDescription
const AjPScophith1InputPointer to hit object 1
const AjPScophith2InputPointer 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


Function embDmxScophitsOverlap

Checks for overlap between two hits.

Prototype

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

TypeNameRead/WriteDescription
const AjPScophith1InputPointer to hit object 1
const AjPScophith2InputPointer 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


Function embDmxScophitMerge

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

Prototype

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

TypeNameRead/WriteDescription
const AjPScophithit1InputScophit 1
const AjPScophithit2InputScophit 2
AjPScophit RETURNPointer to Scophit object.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
AjPListlistModifyList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjBool RETURNTrue on success.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
AjPListlistModifyList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjBool RETURNTrue on success.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
AjPListlistModifyList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjBool RETURNTrue on success.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
const AjPListlistInputList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjIListiterModifyList iterator
AjBool RETURNTrue on success.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
const AjPListlistInputList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjIListiterModifyList iterator
AjBool RETURNTrue on success.

From EMBOSS 2.9.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).

Prototype

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

TypeNameRead/WriteDescription
const AjPListlistInputList of Scophit objects
AjPScophithit1DeleteScophit object 1
AjPScophithit2DeleteScophit object 2
AjIListiterModifyList iterator
AjBool RETURNTrue on success.

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPListinputInputList of EmbPDmxNrseq objects
AjPUint*keepOutput0: rejected (redundant) sequence, 1: the sequence was retained
ajint*nsetOutputNumber of non-garbage sequences in nr set
const AjPMatrixfmatrixInputResidue substitution matrix
floatgapopenInputGap insertion penalty
floatgapextendInputGap extension penalty
floatthreshInputThreshold residue id. for "redundancy"
AjBoolCheckGarbageInputIf 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.
AjBool RETURNajTrue on success

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPListinputInputList of EmbPDmxNrseq objects
AjPUint*keepOutput0: rejected (redundant) sequence, 1: the sequence was retained
ajint*nsetOutputNumber of non-garbage sequences in nr set.
const AjPMatrixfmatrixInputResidue substitution matrix
floatgapopenInputGap insertion penalty
floatgapextendInputGap extension penalty
floatthreshlowInputThreshold lower limit
floatthreshupInputThreshold upper limit
AjBoolCheckGarbageInputIf 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.
AjBool RETURNajTrue on success

From EMBOSS 2.9.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.

Prototype

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

TypeNameRead/WriteDescription
const AjPListinputInputList of ajPSeq's
AjPFloat2d*scoresOutputSequence similarity values
const AjPMatrixfmatrixInputResidue substitution matrix
floatgapopenInputGap insertion penalty
floatgapextendInputGap extension penalty
AjBool RETURNajTrue on success

From EMBOSS 3.0.0


Function embDmxScophitReadAllFasta

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

Prototype

AjPList embDmxScophitReadAllFasta (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyDHF file.
AjPList RETURNList of Scophit object pointers, or NULL (error).

From EMBOSS 3.0.0


Function embDmxHitlistToScophits

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

Prototype

AjBool embDmxHitlistToScophits (
      const AjPList in,
      AjPList out
);

TypeNameRead/WriteDescription
const AjPListinInputList of pointers to Hitlist structures
AjPListoutOutputList of Scophit structures
AjBool RETURNTrue on success (lists were processed ok)

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:
embDmxNrseqDelCreates an empty non redundant sequence object


Function embDmxNrseqDel

Creates an empty non redundant sequence object

Prototype

void embDmxNrseqDel (
      EmbPDmxNrseq* Pnrseq
);

TypeNameRead/WriteDescription
EmbPDmxNrseq*PnrseqDeleteNon-redundant sequence object
void RETURN

From EMBOSS 6.1.0