embword.c


Function embWordLength

Sets the word length for all functions. Must be called first. Creates the word length list if not yet done. Pushes the latest word length value on the list.

Prototype

void embWordLength (
      ajint wordlen
);

TypeNameRead/WriteDescription
ajintwordlenInputWord length
void RETURN

From EMBOSS 1.0.0


Function embWordClear

Clears the word length for all functions. To be called when all is done. Pops the last word length from the list and frees it. If there is nothing else on the list, it frees the list.

Prototype

void embWordClear (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Function embWordPrintTable

Print the words found with their frequencies.

Prototype

void embWordPrintTable (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to be printed
void RETURN

From EMBOSS 1.0.0


Function embWordPrintTableFI

Print the words found with their frequencies.

Prototype

void embWordPrintTableFI (
      const AjPTable table,
      ajint mincount,
      AjPFile outf
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to be printed
ajintmincountInputMinimum frequency to report
AjPFileoutfModifyOutput file.
void RETURN

From EMBOSS 4.0.0


Function embWordPrintTableF

Print the words found with their frequencies.

Prototype

void embWordPrintTableF (
      const AjPTable table,
      AjPFile outf
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to be printed
AjPFileoutfModifyOutput file.
void RETURN

From EMBOSS 1.0.0


Function embWordFreeTable

delete the word table and free the memory.

Prototype

void embWordFreeTable (
      AjPTable* table
);

TypeNameRead/WriteDescription
AjPTable*tableDeletetable to be deleted
void RETURN

From EMBOSS 1.0.0


Function embWordMatchListDelete

delete the word table.

Prototype

void embWordMatchListDelete (
      AjPList* plist
);

TypeNameRead/WriteDescription
AjPList*plistModifylist to be deleted.
void RETURN

From EMBOSS 1.0.0


Function embWordMatchListPrint

print the word table.

Prototype

void embWordMatchListPrint (
      AjPFile file,
      const AjPList list
);

TypeNameRead/WriteDescription
AjPFilefileModifyOutput file
const AjPListlistInputlist to be printed.
void RETURN

From EMBOSS 1.0.0


Function embWordMatchListConvToFeat

convert the word table to feature tables.

Prototype

void embWordMatchListConvToFeat (
      const AjPList list,
      AjPFeattable* tab1,
      AjPFeattable* tab2,
      const AjPSeq seq1,
      const AjPSeq seq2
);

TypeNameRead/WriteDescription
const AjPListlistInputlist to be printed.
AjPFeattable*tab1Modifyfeature table for sequence 1
AjPFeattable*tab2Modifyfeature table for sequence 2
const AjPSeqseq1Inputsequence
const AjPSeqseq2Inputsecond sequence
void RETURN

From EMBOSS 1.0.0


Function embWordGetTable

Builds a table of all words in a sequence.

Prototype

AjBool embWordGetTable (
      AjPTable* table,
      const AjPSeq seq
);

TypeNameRead/WriteDescription
AjPTable*tableModifytable to be created or updated.
const AjPSeqseqInputSequence to be "worded"
AjBool RETURNajTrue if successful

From EMBOSS 1.0.0


Function embWordBuildMatchTable

Create a linked list of all the matches and order them by the second sequence.

Prototype

AjPList embWordBuildMatchTable (
      const AjPTable seq1MatchTable,
      const AjPSeq seq2,
      ajint orderit
);

TypeNameRead/WriteDescription
const AjPTableseq1MatchTableInputMatch table
const AjPSeqseq2InputSecond sequence
ajintorderitInput1 to sort results at end, else 0.
AjPList RETURNList of matches.

From EMBOSS 1.0.0


Function embWordMatchNew

Creates and initialises a word match object

Prototype

EmbPWordMatch embWordMatchNew (
      const AjPSeq seq,
      ajuint seq1start,
      ajuint seq2start,
      ajint length
);

TypeNameRead/WriteDescription
const AjPSeqseqInputQuery sequence, match has been found
ajuintseq1startInputStart position in target sequence
ajuintseq2startInputStart position in query sequence
ajintlengthInputlength of the word match
EmbPWordMatch RETURNNew word match object.

From EMBOSS 6.3.0


Function embWordMatchMin

Given a list of matches, reduce it to the minimal set of best non-overlapping matches.

Prototype

void embWordMatchMin (
      AjPList matchlist
);

TypeNameRead/WriteDescription
AjPListmatchlistModifylist of matches to reduce to non-overlapping set
void RETURN

From EMBOSS 2.0.0


Function embWordMatchFirstMax

Given list of matches returns the first match with maximum similarity/score.

Prototype

EmbPWordMatch embWordMatchFirstMax (
      const AjPList matchlist
);

TypeNameRead/WriteDescription
const AjPListmatchlistInputlist of matches
EmbPWordMatch RETURNmaximum match

From EMBOSS 6.3.0


Function embWordRabinKarpInit

Scans word/pattern table and repackages the words in EmbPWordRK objects to improve access efficiency by Rabin-Karp search. Computes hash values for each word/pattern.

Prototype

ajuint embWordRabinKarpInit (
      const AjPTable table,
      EmbPWordRK** ewords,
      ajuint wordlen,
      const AjPSeqset seqset
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable of patterns
EmbPWordRK**ewordsModifyExtended word objects to be used in Rabin-Karp search
ajuintwordlenInputLength of words/patterns, kmer size
const AjPSeqsetseqsetInputSequence set, input patterns were derived from
ajuint RETURNnumber of words

From EMBOSS 6.3.0


Function embWordRabinKarpSearch

Rabin Karp search for multiple patterns.

Prototype

ajuint embWordRabinKarpSearch (
      const AjPStr sseq,
      const AjPSeqset seqset,
      EmbPWordRK const* patterns,
      ajuint plen,
      ajuint npatterns,
      AjPList* matchlist,
      ajuint* lastlocation,
      AjBool checkmode
);

TypeNameRead/WriteDescription
const AjPStrsseqInputSequence to be scanned for multiple patterns
const AjPSeqsetseqsetInputSequence-set, where search patterns coming from
EmbPWordRK const*patternsInputPatterns to be searched
ajuintplenInputLength of patterns
ajuintnpatternsInputNumber of patterns
AjPList*matchlistModifyList of matches for each sequence in the sequence set
ajuint*lastlocationModifyPosition of the search for each sequence in the sequence set
AjBoolcheckmodeInputIf true, not writing features or alignments but running to produce match statistics only
ajuint RETURNtotal number of matches

From EMBOSS 6.3.0


Function embWordMatchIter

Return the start positions and length for the next match. The caller iterates over the list, which is a standard AjPList

Prototype

AjBool embWordMatchIter (
      AjIList iter,
      ajint* start1,
      ajint* start2,
      ajint* len,
      const AjPSeq* seq
);

TypeNameRead/WriteDescription
AjIListiterModifyList iterator
ajint*start1OutputStart in first sequence
ajint*start2OutputStart in second sequence
ajint*lenOutputLength of match
const AjPSeq*seqOutputPointer to sequence
AjBool RETURNajFalse if the iterator was exhausted

From EMBOSS 2.4.0


Function embWordUnused

Unused functions. Here to keep compiler warnings away

Prototype

void embWordUnused (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 2.0.0


Function embWordExit

Cleanup word matching indexing internals on exit

Prototype

void embWordExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 4.0.0