ajpat.c


Function ajPatternSeqNewList

Constructor for a sequence pattern object. Sets all but compiled object. That is set with search function. Adds the pattern to a pattern list.

Synopsis

Prototype
AjPPatternSeq ajPatternSeqNewList (
      AjPPatlistSeq plist,
      const AjPStr name,
      const AjPStr pat,
      ajuint mismatch
);

TypeNameRead/WriteDescription
AjPPatlistSeqplistModifyPattern list
const AjPStrnameInputName of the pattern
const AjPStrpatInputPattern as string
ajuintmismatchInputmismatch value
AjPPatternSeq RETURNNew pattern object

Input
name:(Input)Name of the pattern
pat:(Input)Pattern as string
mismatch:(Input)mismatch value
Input & Output
plist:(Modify)Pattern list
Returns
AjPPatternSeq:New pattern object

Description

Constructor for a sequence pattern object. Sets all but compiled object. That is set with search function. Adds the pattern to a pattern list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexNewList

Constructor for a pattern object. Sets all but compiled object. That is set with search function. Adds the pattern to a pattern list.

Synopsis

Prototype
AjPPatternRegex ajPatternRegexNewList (
      AjPPatlistRegex plist,
      const AjPStr name,
      const AjPStr pat
);

TypeNameRead/WriteDescription
AjPPatlistRegexplistModifyRegular expression pattern list
const AjPStrnameInputName of the pattern
const AjPStrpatInputPattern as string
AjPPatternRegex RETURNNew regular expression pattern object

Input
name:(Input)Name of the pattern
pat:(Input)Pattern as string
Input & Output
plist:(Modify)Regular expression pattern list
Returns
AjPPatternRegex:New regular expression pattern object

Description

Constructor for a pattern object. Sets all but compiled object. That is set with search function. Adds the pattern to a pattern list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexDel

Destructor for a regular expression pattern object

Synopsis

Prototype
void ajPatternRegexDel (
      AjPPatternRegex* pthys
);

TypeNameRead/WriteDescription
AjPPatternRegex*pthysDeletePattern object reference
void RETURN

Output
pthys:(Delete)Pattern object reference
Returns
void:No return value

Description

Destructor for a regular expression pattern object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqDel

Destructor for a pattern object

Synopsis

Prototype
void ajPatternSeqDel (
      AjPPatternSeq* pthys
);

TypeNameRead/WriteDescription
AjPPatternSeq*pthysDeletePattern object reference
void RETURN

Output
pthys:(Delete)Pattern object reference
Returns
void:No return value

Description

Destructor for a pattern object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqGetName

Returns the name of the pattern.

Synopsis

Prototype
const AjPStr ajPatternSeqGetName (
      const AjPPatternSeq thys
);

TypeNameRead/WriteDescription
const AjPPatternSeqthysInputPattern
const AjPStr RETURNName of the pattern. Real pointer in structure.

Input
thys:(Input)Pattern
Returns
const AjPStr:Name of the pattern. Real pointer in structure.

Description

Returns the name of the pattern.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexGetName

Returns the name of the pattern.

Synopsis

Prototype
const AjPStr ajPatternRegexGetName (
      const AjPPatternRegex thys
);

TypeNameRead/WriteDescription
const AjPPatternRegexthysInputPattern
const AjPStr RETURNName of the pattern. Real pointer in structure.

Input
thys:(Input)Pattern
Returns
const AjPStr:Name of the pattern. Real pointer in structure.

Description

Returns the name of the pattern.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqGetPattern

Returns pattern in string format.

Synopsis

Prototype
const AjPStr ajPatternSeqGetPattern (
      const AjPPatternSeq thys
);

TypeNameRead/WriteDescription
const AjPPatternSeqthysInputPattern
const AjPStr RETURNPattern. Real pointer in structure.

Input
thys:(Input)Pattern
Returns
const AjPStr:Pattern. Real pointer in structure.

Description

Returns pattern in string format.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexGetPattern

Returns pattern in string format.

Synopsis

Prototype
const AjPStr ajPatternRegexGetPattern (
      const AjPPatternRegex thys
);

TypeNameRead/WriteDescription
const AjPPatternRegexthysInputPattern
const AjPStr RETURNPattern. Real pointer in structure.

Input
thys:(Input)Pattern
Returns
const AjPStr:Pattern. Real pointer in structure.

Description

Returns pattern in string format.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqGetCompiled

Returns void pointer to compiled pattern.

Synopsis

Prototype
AjPPatComp ajPatternSeqGetCompiled (
      const AjPPatternSeq thys
);

TypeNameRead/WriteDescription
const AjPPatternSeqthysInputPattern
AjPPatComp RETURNReference for compiled pattern

Input
thys:(Input)Pattern
Returns
AjPPatComp:Reference for compiled pattern

Description

Returns void pointer to compiled pattern.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexGetCompiled

Returns void pointer to compiled pattern. Compiles expression if not yet done.

Synopsis

Prototype
AjPRegexp ajPatternRegexGetCompiled (
      const AjPPatternRegex thys
);

TypeNameRead/WriteDescription
const AjPPatternRegexthysInputPattern
AjPRegexp RETURNReference for compiled pattern

Input
thys:(Input)Pattern
Returns
AjPRegexp:Reference for compiled pattern

Description

Returns void pointer to compiled pattern. Compiles expression if not yet done.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqGetProtein

Returns true if the pattern is for a protein sequence.

Synopsis

Prototype
AjBool ajPatternSeqGetProtein (
      const AjPPatternSeq thys
);

TypeNameRead/WriteDescription
const AjPPatternSeqthysInputPattern
AjBool RETURNajTrue for a protein pattern

Input
thys:(Input)Pattern
Returns
AjBool:ajTrue for a protein pattern

Description

Returns true if the pattern is for a protein sequence.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexGetType

Returns the type of the pattern.

Synopsis

Prototype
ajuint ajPatternRegexGetType (
      const AjPPatternRegex thys
);

TypeNameRead/WriteDescription
const AjPPatternRegexthysInputPattern
ajuint RETURNType of the pattern.

Input
thys:(Input)Pattern
Returns
ajuint:Type of the pattern.

Description

Returns the type of the pattern.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqGetMismatch

Returns the mismatch of the pattern.

Synopsis

Prototype
ajuint ajPatternSeqGetMismatch (
      const AjPPatternSeq thys
);

TypeNameRead/WriteDescription
const AjPPatternSeqthysInputPattern
ajuint RETURNMismatch value of the pattern.

Input
thys:(Input)Pattern
Returns
ajuint:Mismatch value of the pattern.

Description

Returns the mismatch of the pattern.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqSetCompiled

Sets the compiled pattern

Synopsis

Prototype
void ajPatternSeqSetCompiled (
      AjPPatternSeq thys,
      void* pat
);

TypeNameRead/WriteDescription
AjPPatternSeqthysModifyPattern
void*patModifyCompiled pattern
void RETURN

Input & Output
thys:(Modify)Pattern
pat:(Modify)Compiled pattern
Returns
void:No return value

Description

Sets the compiled pattern

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexSetCompiled

Sets the compiled pattern

Synopsis

Prototype
void ajPatternRegexSetCompiled (
      AjPPatternRegex thys,
      AjPRegexp pat
);

TypeNameRead/WriteDescription
AjPPatternRegexthysModifyPattern
AjPRegexppatModifyCompiled pattern
void RETURN

Input & Output
thys:(Modify)Pattern
pat:(Modify)Compiled pattern
Returns
void:No return value

Description

Sets the compiled pattern

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternSeqDebug

Constructor for a pattern list object

Synopsis

Prototype
void ajPatternSeqDebug (
      const AjPPatternSeq pat
);

TypeNameRead/WriteDescription
const AjPPatternSeqpatInputPattern object
void RETURN

Input
pat:(Input)Pattern object
Returns
void:No return value

Description

Constructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexDebug

Constructor for a pattern list object

Synopsis

Prototype
void ajPatternRegexDebug (
      const AjPPatternRegex pat
);

TypeNameRead/WriteDescription
const AjPPatternRegexpatInputPattern object
void RETURN

Input
pat:(Input)Pattern object
Returns
void:No return value

Description

Constructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexNew

Constructor for a pattern list object

Synopsis

Prototype
AjPPatlistRegex ajPatlistRegexNew (
      void
);

TypeNameRead/WriteDescription
AjPPatlistRegex RETURNNew pattern list object

Returns
AjPPatlistRegex:New pattern list object

Description

Constructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexNewType

Constructor for a pattern list object with a specified type

Synopsis

Prototype
AjPPatlistRegex ajPatlistRegexNewType (
      ajuint type
);

TypeNameRead/WriteDescription
ajuinttypeInputtype value
AjPPatlistRegex RETURNNew pattern list object

Input
type:(Input)type value
Returns
AjPPatlistRegex:New pattern list object

Description

Constructor for a pattern list object with a specified type

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqNew

Constructor for a pattern list object. Defaults to protein.

Synopsis

Prototype
AjPPatlistSeq ajPatlistSeqNew (
      void
);

TypeNameRead/WriteDescription
AjPPatlistSeq RETURNNew pattern list object

Returns
AjPPatlistSeq:New pattern list object

Description

Constructor for a pattern list object. Defaults to protein.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqNewType

Constructor for a pattern list object

Synopsis

Prototype
AjPPatlistSeq ajPatlistSeqNewType (
      AjBool type
);

TypeNameRead/WriteDescription
AjBooltypeInputTrue for a protein pattern
AjPPatlistSeq RETURNNew pattern list object

Input
type:(Input)True for a protein pattern
Returns
AjPPatlistSeq:New pattern list object

Description

Constructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexDel

Destructor for a pattern list object

Synopsis

Prototype
void ajPatlistRegexDel (
      AjPPatlistRegex* pthys
);

TypeNameRead/WriteDescription
AjPPatlistRegex*pthysDeletePattern list object reference
void RETURN

Output
pthys:(Delete)Pattern list object reference
Returns
void:No return value

Description

Destructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqDel

Destructor for a pattern list object

Synopsis

Prototype
void ajPatlistSeqDel (
      AjPPatlistSeq* pthys
);

TypeNameRead/WriteDescription
AjPPatlistSeq*pthysDeletePattern list object reference
void RETURN

Output
pthys:(Delete)Pattern list object reference
Returns
void:No return value

Description

Destructor for a pattern list object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqRead

Parses a file into pattern list object. If there is not mismatch value on pattern in file, it is assumed to be 0.

Synopsis

Prototype
AjPPatlistSeq ajPatlistSeqRead (
      const AjPStr patspec,
      const AjPStr patname,
      const AjPStr fmt,
      AjBool protein,
      ajuint mismatches
);

TypeNameRead/WriteDescription
const AjPStrpatspecInputPattern specification
const AjPStrpatnameInputDefault pattern name prefix
const AjPStrfmtInputPattern file format
AjBoolproteinInputajTrue for protein patterns
ajuintmismatchesInputdefault number of mismatches
AjPPatlistSeq RETURNPattern list

Input
patspec:(Input)Pattern specification
patname:(Input)Default pattern name prefix
fmt:(Input)Pattern file format
protein:(Input)ajTrue for protein patterns
mismatches:(Input)default number of mismatches
Returns
AjPPatlistSeq:Pattern list

Description

Parses a file into pattern list object. If there is not mismatch value on pattern in file, it is assumed to be 0.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexRead

Parses a file of regular expressions into a pattern list object.

Synopsis

Prototype
AjPPatlistRegex ajPatlistRegexRead (
      const AjPStr patspec,
      const AjPStr patname,
      const AjPStr fmt,
      ajuint type,
      AjBool upper,
      AjBool lower
);

TypeNameRead/WriteDescription
const AjPStrpatspecInputName of the file with patterns
const AjPStrpatnameInputDefault pattern name prefix
const AjPStrfmtInputPattern file format
ajuinttypeInputType of the patterns
AjBoolupperInputConvert to upper case
AjBoollowerInputConvert to lower case
AjPPatlistRegex RETURNPattern list

Input
patspec:(Input)Name of the file with patterns
patname:(Input)Default pattern name prefix
fmt:(Input)Pattern file format
type:(Input)Type of the patterns
upper:(Input)Convert to upper case
lower:(Input)Convert to lower case
Returns
AjPPatlistRegex:Pattern list

Description

Parses a file of regular expressions into a pattern list object.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqGetSize

Gets number of patterns from list.

Synopsis

Prototype
ajuint ajPatlistSeqGetSize (
      const AjPPatlistSeq thys
);

TypeNameRead/WriteDescription
const AjPPatlistSeqthysInputPattern list object
ajuint RETURNNumber of patterns

Input
thys:(Input)Pattern list object
Returns
ajuint:Number of patterns

Description

Gets number of patterns from list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexGetSize

Gets number of patterns from list.

Synopsis

Prototype
ajuint ajPatlistRegexGetSize (
      const AjPPatlistRegex thys
);

TypeNameRead/WriteDescription
const AjPPatlistRegexthysInputPattern list object
ajuint RETURNNumber of patterns

Input
thys:(Input)Pattern list object
Returns
ajuint:Number of patterns

Description

Gets number of patterns from list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqGetNext

Gets next available pattern from list.

Synopsis

Prototype
AjBool ajPatlistSeqGetNext (
      AjPPatlistSeq thys,
      AjPPatternSeq* pattern
);

TypeNameRead/WriteDescription
AjPPatlistSeqthysModifyPattern list object
AjPPatternSeq*patternOutputPattern object reference
AjBool RETURNajTrue if there was next object

Output
pattern:(Output)Pattern object reference
Input & Output
thys:(Modify)Pattern list object
Returns
AjBool:ajTrue if there was next object

Description

Gets next available pattern from list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexGetNext

Gets next available pattern from list.

Synopsis

Prototype
AjBool ajPatlistRegexGetNext (
      AjPPatlistRegex thys,
      AjPPatternRegex* pattern
);

TypeNameRead/WriteDescription
AjPPatlistRegexthysModifyPattern list object
AjPPatternRegex*patternOutputPattern object reference
AjBool RETURNajTrue if there was next object

Output
pattern:(Output)Pattern object reference
Input & Output
thys:(Modify)Pattern list object
Returns
AjBool:ajTrue if there was next object

Description

Gets next available pattern from list.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexRewind

Resets the pattern list iteration.

Synopsis

Prototype
void ajPatlistRegexRewind (
      AjPPatlistRegex thys
);

TypeNameRead/WriteDescription
AjPPatlistRegexthysModifyPattern list object reference
void RETURN

Input & Output
thys:(Modify)Pattern list object reference
Returns
void:No return value

Description

Resets the pattern list iteration.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqRewind

Resets the pattern list iteration.

Synopsis

Prototype
void ajPatlistSeqRewind (
      AjPPatlistSeq thys
);

TypeNameRead/WriteDescription
AjPPatlistSeqthysModifyPattern list object reference
void RETURN

Input & Output
thys:(Modify)Pattern list object reference
Returns
void:No return value

Description

Resets the pattern list iteration.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexRemoveCurrent

Removes current pattern from pattern list. If looping has not started or pattern list has just been rewound then nothing is removed.

Synopsis

Prototype
void ajPatlistRegexRemoveCurrent (
      AjPPatlistRegex thys
);

TypeNameRead/WriteDescription
AjPPatlistRegexthysModifyPattern list from which to remove
void RETURN

Input & Output
thys:(Modify)Pattern list from which to remove
Returns
void:No return value

Description

Removes current pattern from pattern list. If looping has not started or pattern list has just been rewound then nothing is removed.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqRemoveCurrent

Removes current pattern from pattern list. If looping has not started or pattern list has just been rewound then nothing is removed.

Synopsis

Prototype
void ajPatlistSeqRemoveCurrent (
      AjPPatlistSeq thys
);

TypeNameRead/WriteDescription
AjPPatlistSeqthysModifyPattern list from which to remove
void RETURN

Input & Output
thys:(Modify)Pattern list from which to remove
Returns
void:No return value

Description

Removes current pattern from pattern list. If looping has not started or pattern list has just been rewound then nothing is removed.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistAddSeq

Adds pattern into patternlist

Synopsis

Prototype
void ajPatlistAddSeq (
      AjPPatlistSeq thys,
      AjPPatternSeq pat
);

TypeNameRead/WriteDescription
AjPPatlistSeqthysModifyPattern list object reference
AjPPatternSeqpatModifyPattern to be added
void RETURN

Input & Output
thys:(Modify)Pattern list object reference
pat:(Modify)Pattern to be added
Returns
void:No return value

Description

Adds pattern into patternlist

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistAddRegex

Adds pattern into patternlist

Synopsis

Prototype
void ajPatlistAddRegex (
      AjPPatlistRegex thys,
      AjPPatternRegex pat
);

TypeNameRead/WriteDescription
AjPPatlistRegexthysModifyPattern list object reference
AjPPatternRegexpatModifyPattern to be added
void RETURN

Input & Output
thys:(Modify)Pattern list object reference
pat:(Modify)Pattern to be added
Returns
void:No return value

Description

Adds pattern into patternlist

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatCompNew

Create prosite pattern structure.

Synopsis

Prototype
AjPPatComp ajPatCompNew (
      void
);

TypeNameRead/WriteDescription
AjPPatComp RETURNpattern structure

Returns
AjPPatComp:pattern structure

Description

Create prosite pattern structure.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatCompDel

Delete prosite pattern structure.

Synopsis

Prototype
void ajPatCompDel (
      AjPPatComp* pthys
);

TypeNameRead/WriteDescription
AjPPatComp*pthysDeleteProsite pattern structure
void RETURN

Output
pthys:(Delete)Prosite pattern structure
Returns
void:No return value

Description

Delete prosite pattern structure.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatternRegexType

Returns type associated with a named type of regular expression

Synopsis

Prototype
ajuint ajPatternRegexType (
      const AjPStr type
);

TypeNameRead/WriteDescription
const AjPStrtypeInputRegular expression type
ajuint RETURNType number, defaults to 0 (string)

Input
type:(Input)Regular expression type
Returns
ajuint:Type number, defaults to 0 (string)

Description

Returns type associated with a named type of regular expression

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistRegexDoc

Documents patterns to a formatted string

Synopsis

Prototype
ajuint ajPatlistRegexDoc (
      AjPPatlistRegex plist,
      AjPStr* Pdoc
);

TypeNameRead/WriteDescription
AjPPatlistRegexplistModifyPattern list object
AjPStr*PdocOutputFormatted string
ajuint RETURNNumber of patterns

Output
Pdoc:(Output)Formatted string
Input & Output
plist:(Modify)Pattern list object
Returns
ajuint:Number of patterns

Description

Documents patterns to a formatted string

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajPatlistSeqDoc

Documents patterns to a formatted string

Synopsis

Prototype
ajuint ajPatlistSeqDoc (
      AjPPatlistSeq plist,
      AjPStr* Pdoc
);

TypeNameRead/WriteDescription
AjPPatlistSeqplistModifyPattern list object
AjPStr*PdocOutputFormatted string
ajuint RETURNNumber of patterns

Output
Pdoc:(Output)Formatted string
Input & Output
plist:(Modify)Pattern list object
Returns
ajuint:Number of patterns

Description

Documents patterns to a formatted string

See Also

See other functions in this section

Availability

In release 6.4.0