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.

Synopsis

Prototype

void embWordLength (
      ajint wordlen
);

Input

wordlen:(Input)Word length

Returns

void:No return value

Description

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.

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

Synopsis

Prototype

void embWordClear (
      void
);

Returns

void:No return value

Description

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.

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 embWordPrintTable

Print the words found with their frequencies.

Synopsis

Prototype

void embWordPrintTable (
      const AjPTable table
);

Input

table:(Input)table to be printed

Returns

void:No return value

Description

Print the words found with their frequencies.

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 embWordPrintTableFI

Print the words found with their frequencies.

Synopsis

Prototype

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

Input

table:(Input)table to be printed
mincount:(Input)Minimum frequency to report

Input & Output

outf:(Modify)Output file.

Returns

void:No return value

Description

Print the words found with their frequencies.

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 embWordPrintTableF

Print the words found with their frequencies.

Synopsis

Prototype

void embWordPrintTableF (
      const AjPTable table,
      AjPFile outf
);

Input

table:(Input)table to be printed

Input & Output

outf:(Modify)Output file.

Returns

void:No return value

Description

Print the words found with their frequencies.

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 embWordFreeTable

delete the word table and free the memory.

Synopsis

Prototype

void embWordFreeTable (
      AjPTable* table
);

Output

table:(Delete)table to be deleted

Returns

void:No return value

Description

delete the word table and free the memory.

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 embWordMatchListDelete

delete the word table.

Synopsis

Prototype

void embWordMatchListDelete (
      AjPList* plist
);

Input & Output

plist:(Modify)list to be deleted.

Returns

void:No return value

Description

delete the word table.

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 embWordMatchListPrint

print the word table.

Synopsis

Prototype

void embWordMatchListPrint (
      AjPFile file,
      const AjPList list
);

Input

list:(Input)list to be printed.

Input & Output

file:(Modify)Output file

Returns

void:No return value

Description

print the word table.

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 embWordMatchListConvToFeat

convert the word table to feature tables.

Synopsis

Prototype

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

Input

list:(Input)list to be printed.
seq1:(Input)sequence
seq2:(Input)second sequence

Input & Output

tab1:(Modify)feature table for sequence 1
tab2:(Modify)feature table for sequence 2

Returns

void:No return value

Description

convert the word table to feature tables.

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 embWordGetTable

Builds a table of all words in a sequence.

The word length must be defined by a call to embWordLength.

Synopsis

Prototype

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

Input

seq:(Input)Sequence to be "worded"

Input & Output

table:(Modify)table to be created or updated.

Returns

ajint:1 if successful 0 if not.

Description

Builds a table of all words in a sequence.

The word length must be defined by a call to embWordLength.

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 embWordBuildMatchTable

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

We need three lists: (a) all hits, added in positional order (b) ongoing hits, where we have not reached the end yet which is a list of items in "all hits" being updated (c) new hits, found in the word table from the other sequence.

Synopsis

Prototype

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

Input

seq1MatchTable:(Input)Match table
seq2:(Input)Second sequence
orderit:(Input)1 to sort results at end, else 0.

Returns

AjPList:List of matches.

Description

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

We need three lists: (a) all hits, added in positional order (b) ongoing hits, where we have not reached the end yet which is a list of items in "all hits" being updated (c) new hits, found in the word table from the other 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 embWordMatchMin

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

Synopsis

Prototype

void embWordMatchMin (
      AjPList matchlist,
      ajint seq1length,
      ajint seq2length
);

Input

seq1length:(Input)length of sequence1 being considered
seq2length:(Input)length of sequence2 being considered

Input & Output

matchlist:(Modify)list of matches to reduce to non-overlapping set

Returns

void:No return value

Description

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

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 embWordMatchIter

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

Synopsis

Prototype

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

Output

start1:(Output)Start in first sequence
start2:(Output)Start in second sequence
len:(Output)Length of match

Input & Output

iter:(Modify)List iterator

Returns

AjBool:ajFalse if the iterator was exhausted

Description

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

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 embWordUnused

Unused functions. Here to keep compiler warnings away

Synopsis

Prototype

void embWordUnused (
      void
);

Returns

void:No return value

Description

Unused functions. Here to keep compiler warnings away

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 embWordExit

Cleanup word matching indexing internals on exit

Synopsis

Prototype

void embWordExit (
      void
);

Returns

void:No return value

Description

Cleanup word matching indexing internals on exit

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