embpat.c
Create a regular expression for a string and substitute the chars for
Nucleotides or proteins as needed.
Synopsis
Prototype
AjPStr embPatSeqCreateRegExp (
const AjPStr thys,
AjBool protein
);
Input
| thys: | (Input) | string to create reg expr from. |
| protein: | (Input) | is it a protein. |
Returns
| AjPStr: | the new regular expression. |
Description
Create a regular expression for a string and substitute the chars for
Nucleotides or proteins as needed.
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
Create a regular expression for a string and substitute the chars for
Nucleotides or proteins as needed.
Synopsis
Prototype
AjPStr embPatSeqCreateRegExpC (
const char* ptr,
AjBool protein
);
Input
| ptr: | (Input) | text to create reg expr from. |
| protein: | (Input) | is it a protein. |
Returns
| AjPStr: | the new regular expression. |
Description
Create a regular expression for a string and substitute the chars for
Nucleotides or proteins as needed.
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
Find all the regular expression matches of reg in the string string.
Synopsis
Prototype
EmbPPatMatch embPatSeqMatchFind (
const AjPSeq seq,
const AjPStr reg
);
Input
| seq: | (Input) | Sequence to be searched. |
| reg: | (Input) | regular expression string. |
Returns
| EmbPPatMatch: | Results of the pattern matching. |
Description
Find all the regular expression matches of reg in the string string.
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
Find all the regular expression matches of reg in the string string.
Synopsis
Prototype
EmbPPatMatch embPatSeqMatchFindC (
const AjPSeq seq,
const char* reg
);
Input
| seq: | (Input) | Sequence to be searched. |
| reg: | (Input) | regular expression text. |
Returns
| EmbPPatMatch: | Results of the pattern matching. |
Description
Find all the regular expression matches of reg in the string string.
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
Find all the regular expression matches of reg in the string string.
Synopsis
Prototype
EmbPPatMatch embPatMatchFind (
const AjPStr regexp,
const AjPStr strng,
AjBool left,
AjBool right
);
Input
| regexp: | (Input) | Regular expression string. |
| strng: | (Input) | String to be searched. |
| left: | (Input) | has to match the start |
| right: | (Input) | has to match the end |
Returns
| EmbPPatMatch: | Results of the pattern matching. |
Description
Find all the regular expression matches of reg in the string string.
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
Find all the regular expression matches of reg in the string string.
Synopsis
Prototype
EmbPPatMatch embPatMatchFindC (
const AjPStr regexp,
const char* sptr,
AjBool left,
AjBool right
);
Input
| regexp: | (Input) | Regular expression string. |
| sptr: | (Input) | String to be searched. |
| left: | (Input) | has to match the start |
| right: | (Input) | has to match the end |
Returns
| EmbPPatMatch: | Results of the pattern matching. |
Description
Find all the regular expression matches of reg in the string string.
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
Returns the length from the pattern match structure for index'th item.
Synopsis
Prototype
ajint embPatMatchGetLen (
const EmbPPatMatch data,
ajint index
);
Input
| data: | (Input) | results of match. |
| index: | (Input) | index to structure. |
Returns
| ajint: | returns -1 if not available. |
Description
Returns the length from the pattern match structure for index'th item.
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
Returns the End point for the pattern match structure for index'th item.
Synopsis
Prototype
ajint embPatMatchGetEnd (
const EmbPPatMatch data,
ajint index
);
Input
| data: | (Input) | results of match. |
| index: | (Input) | index to structure. |
Returns
| ajint: | returns -1 if not available. |
Description
Returns the End point for the pattern match structure for index'th item.
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
Returns the number of pattern matches in the structure.
Synopsis
Prototype
ajint embPatMatchGetNumber (
const EmbPPatMatch data
);
Input
| data: | (Input) | results of match. |
Returns
| ajint: | returns -1 if not available. |
Description
Returns the number of pattern matches in the structure.
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
Returns the start position from the pattern match structure for
index'th item.
Synopsis
Prototype
ajint embPatMatchGetStart (
const EmbPPatMatch data,
ajint index
);
Input
| data: | (Input) | results of match. |
| index: | (Input) | index to structure. |
Returns
| ajint: | returns -1 if not available. |
Description
Returns the start position from the pattern match structure for
index'th item.
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
Free all the memory from the pattern match search.
Synopsis
Prototype
void embPatMatchDel (
EmbPPatMatch* pthis
);
Output
| pthis: | (Delete) | results to be freed. |
Returns
Description
Free all the memory from the pattern match search.
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
Convert a prosite pattern to a regular expression
Start and end are indicated by boolean options, as the pattern may have
been processed for the other pattern matching methods
Synopsis
Prototype
AjPStr embPatPrositeToRegExp (
const AjPStr s
);
Input
Returns
| AjPStr: | regular expression |
Description
Convert a prosite pattern to a regular expression
Start and end are indicated by boolean options, as the pattern may have
been processed for the other pattern matching methods
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
Convert a prosite pattern to a regular expression string.
start and end say whether the ends should match in case this is a processed
pattern, but there is still a check for angle brackets.
Synopsis
Prototype
AjPStr embPatPrositeToRegExpEnds (
const AjPStr s,
AjBool start,
AjBool end
);
Input
| s: | (Input) | prosite pattern |
| start: | (Input) | must match start |
| end: | (Input) | must match end |
Returns
| AjPStr: | regular expression |
Description
Convert a prosite pattern to a regular expression string.
start and end say whether the ends should match in case this is a processed
pattern, but there is still a check for angle brackets.
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
Create a new restriction object
Synopsis
Prototype
EmbPPatRestrict embPatRestrictNew (
void
);
Returns
| EmbPPatRestrict: | the allocated object |
Description
Create a new restriction object
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
Delete a restriction object
Synopsis
Prototype
void embPatRestrictDel (
EmbPPatRestrict* thys
);
Output
| thys: | (Delete) | restriction object |
Returns
Description
Delete a restriction object
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
Read next restriction enzyme from re file
Synopsis
Prototype
AjBool embPatRestrictReadEntry (
EmbPPatRestrict re,
AjPFile inf
);
Output
| re: | (Output) | restriction object to fill |
Input & Output
| inf: | (Modify) | input file pointer |
Returns
| AjBool: | True if read successful |
Description
Read next restriction enzyme from re 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
Scan a sequence with a restriction object
Synopsis
Prototype
ajint embPatRestrictScan (
const EmbPPatRestrict enz,
const AjPStr substr,
const AjPStr binstr,
const AjPStr revstr,
const AjPStr binrev,
ajint len,
AjBool ambiguity,
AjBool plasmid,
ajint min,
ajint max,
ajint begin,
AjPList l
);
Input
| enz: | (Input) | Enyme information |
| substr: | (Input) | Sequence as ASCII |
| binstr: | (Input) | Sequence as binary IUB |
| revstr: | (Input) | Sequence as ASCII reversed |
| binrev: | (Input) | Sequence as binary IUB reversed |
| len: | (Input) | Length of sequence |
| ambiguity: | (Input) | Allow ambiguity (binary search) |
| plasmid: | (Input) | Allow circular DNA |
| min: | (Input) | Minimum # of matches allowed |
| max: | (Input) | Maximum # of matches |
| begin: | (Input) | Sequence offset |
Input & Output
| l: | (Modify) | List to push hits to |
Returns
Description
Scan a sequence with a restriction object
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
Initialise a Knuth-Morris-Pratt pattern.
Synopsis
Prototype
void embPatKMPInit (
const AjPStr pat,
ajint len,
ajint* next
);
Input
| pat: | (Input) | pattern |
| len: | (Input) | length of pattern |
Output
| next: | (Output) | offset table |
Returns
Description
Initialise a Knuth-Morris-Pratt pattern.
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
Perform a Knuth-Morris-Pratt search
Synopsis
Prototype
ajint embPatKMPSearch (
const AjPStr str,
const AjPStr pat,
ajint slen,
ajint plen,
const ajint* next,
ajint start
);
Input
| str: | (Input) | string to search |
| pat: | (Input) | pattern to use |
| slen: | (Input) | length of string |
| plen: | (Input) | length of pattern |
| next: | (Input) | array from embPatKMPInit |
| start: | (Input) | position within str to start search |
Returns
| ajint: | Index of match in str or -1 if not found |
Description
Perform a Knuth-Morris-Pratt search
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
Initialise a Boyer-Moore-Horspool pattern.
Synopsis
Prototype
void embPatBMHInit (
const AjPStr pat,
ajint len,
ajint* skip
);
Input
| pat: | (Input) | pattern |
| len: | (Input) | pattern length |
Output
| skip: | (Output) | offset table |
Returns
Description
Initialise a Boyer-Moore-Horspool pattern.
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
Perform a Boyer-Moore-Horspool search
Synopsis
Prototype
ajint embPatBMHSearch (
const AjPStr str,
const AjPStr pat,
ajint slen,
ajint plen,
const ajint* skip,
ajint start,
AjBool left,
AjBool right,
AjPList l,
const AjPStr name,
ajint begin
);
Input
| str: | (Input) | string to search |
| pat: | (Input) | pattern to use |
| slen: | (Input) | length of string |
| plen: | (Input) | length of pattern |
| skip: | (Input) | array from embPatBMHInit |
| start: | (Input) | position within str to start search |
| left: | (Input) | has to match the start |
| right: | (Input) | has to match the end |
| name: | (Input) | name of entry |
| begin: | (Input) | offset in orig sequence |
Input & Output
| l: | (Modify) | list to push to |
Returns
Description
Perform a Boyer-Moore-Horspool search
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
Initialise a Baeza-Yates,Perleberg pattern.
Synopsis
Prototype
void embPatBYPInit (
const AjPStr pat,
ajint len,
EmbPPatBYPNode offset,
ajint* buf
);
Input
| pat: | (Input) | pattern |
| len: | (Input) | pattern length |
Output
| offset: | (Output) | character index |
| buf: | (Output) | mismatch count |
Returns
Description
Initialise a Baeza-Yates,Perleberg pattern.
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
Put a matching BYP search hit on the heap
as an EmbPMatMatch structure
Synopsis
Prototype
void embPatPushHit (
AjPList l,
const AjPStr name,
ajint pos,
ajint plen,
ajint begin,
ajint mm
);
Input
| name: | (Input) | string name |
| pos: | (Input) | Sequence match position |
| plen: | (Input) | pattern length |
| begin: | (Input) | Sequence offset |
| mm: | (Input) | number of mismatches |
Input & Output
| l: | (Modify) | list to push to |
Returns
Description
Put a matching BYP search hit on the heap
as an EmbPMatMatch structure
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
Perform a Baeza-Yates,Perleberg search.
Synopsis
Prototype
ajint embPatBYPSearch (
const AjPStr str,
const AjPStr name,
ajint begin,
ajint slen,
ajint plen,
ajint mm,
EmbPPatBYPNode offset,
ajint* buf,
AjPList l,
AjBool amino,
AjBool carboxyl,
const AjPStr pat
);
Input
| str: | (Input) | search string |
| name: | (Input) | search string |
| begin: | (Input) | sequence offset |
| slen: | (Input) | string length |
| plen: | (Input) | pattern length |
| mm: | (Input) | allowed mismatches (Hamming distance) |
| amino: | (Input) | if true, match at amino terminal end |
| carboxyl: | (Input) | if true, match at carboxyl terminal end |
| pat: | (Input) | original pattern |
Input & Output
| offset: | (Modify) | character index |
| buf: | (Modify) | mismatch count array |
| l: | (Modify) | list to push hits to |
Returns
Description
Perform a Baeza-Yates,Perleberg search.
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
Classify patterns according to type. The pattern is set up upper case,
has start and end processing turned into boolean flags. Sets other boolean
flags for properties of the pattern so that a suitable processing
method can be selected.
Synopsis
Prototype
AjBool embPatClassify (
const AjPStr pat,
AjPStr* cleanpat,
AjBool* amino,
AjBool* carboxyl,
AjBool* fclass,
AjBool* ajcompl,
AjBool* dontcare,
AjBool* range,
AjBool protein
);
Input
| pat: | (Input) | original pattern |
| protein: | (Input) | true if protein false if DNA |
Output
| cleanpat: | (Output) | cleaned pattern |
| amino: | (Output) | set if must match start of sequence |
| carboxyl: | (Output) | set if must match end of sequence |
| fclass: | (Output) | set if class e.g. [ABC] |
| ajcompl: | (Output) | set if complement e.g. |
| dontcare: | (Output) | set if X (protein) or N (DNA) |
| range: | (Output) | set if range specified e.g. (3,10) |
Returns
Description
Classify patterns according to type. The pattern is set up upper case,
has start and end processing turned into boolean flags. Sets other boolean
flags for properties of the pattern so that a suitable processing
method can be selected.
Usage
ajcompl: ABC
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
Initialise a Shift-Or pattern.
Synopsis
Prototype
void embPatSOInit (
const AjPStr pat,
ajuint* table,
ajuint* limit
);
Input
Output
| table: | (Output) | SO table |
| limit: | (Output) | match limit |
Returns
Description
Initialise a Shift-Or pattern.
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
Perform a Shift-OR search.
Synopsis
Prototype
ajint embPatSOSearch (
const AjPStr str,
const AjPStr name,
ajuint first,
ajint begin,
ajint plen,
const ajuint* table,
ajuint limit,
AjPList l,
AjBool amino,
AjBool carboxyl
);
Input
| str: | (Input) | search string |
| name: | (Input) | search string |
| first: | (Input) | first char of pattern |
| begin: | (Input) | sequence offset |
| plen: | (Input) | pattern length |
| table: | (Input) | SO table |
| limit: | (Input) | SO limit |
| amino: | (Input) | must match start |
| carboxyl: | (Input) | must match end |
Input & Output
| l: | (Modify) | list to push hits to |
Returns
Description
Perform a Shift-OR search.
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
Initialise a Baeza-Yates Gonnet class pattern.
Synopsis
Prototype
void embPatBYGCInit (
const AjPStr pat,
ajint* m,
ajuint* table,
ajuint* limit
);
Input
Output
| m: | (Output) | real pattern length |
| table: | (Output) | SO table |
| limit: | (Output) | match limit |
Returns
Description
Initialise a Baeza-Yates Gonnet class pattern.
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
Perform a Baeza-Yates Gonnet search.
Synopsis
Prototype
ajint embPatBYGSearch (
const AjPStr str,
const AjPStr name,
ajint begin,
ajint plen,
const ajuint* table,
ajuint limit,
AjPList l,
AjBool amino,
AjBool carboxyl
);
Input
| str: | (Input) | search string |
| name: | (Input) | search string |
| begin: | (Input) | sequence offset |
| plen: | (Input) | pattern length |
| table: | (Input) | SO table |
| limit: | (Input) | SO limit |
| amino: | (Input) | must match start |
| carboxyl: | (Input) | must match end |
Input & Output
| l: | (Modify) | list to push hits to |
Returns
Description
Perform a Baeza-Yates Gonnet search.
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
Initialise a Tarhio-Ukkonen search
Synopsis
Prototype
void embPatTUInit (
const AjPStr pat,
ajint** skipm,
ajint m,
ajint k
);
Input
| pat: | (Input) | pattern |
| m: | (Input) | real pattern length |
| k: | (Input) | allowed mismatches |
Output
| skipm: | (Output) | mismatch skip array |
Returns
Description
Initialise a Tarhio-Ukkonen search
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
Perform a Tarhio-Ukkonen search
Synopsis
Prototype
ajint embPatTUSearch (
const AjPStr pat,
const AjPStr text,
ajint slen,
ajint* const* skipm,
ajint m,
ajint k,
ajint begin,
AjPList l,
AjBool amino,
AjBool carboxyl,
const AjPStr name
);
Input
| pat: | (Input) | pattern |
| text: | (Input) | text to search (incl ajcompl/class) |
| slen: | (Input) | length of text |
| skipm: | (Input) | mismatch skip array |
| m: | (Input) | real pattern length |
| k: | (Input) | allowed mismatches |
| begin: | (Input) | text offset |
| amino: | (Input) | true if text start |
| carboxyl: | (Input) | true if text end |
| name: | (Input) | name of text |
Input & Output
| l: | (Modify) | list to push to |
Returns
Description
Perform a Tarhio-Ukkonen search
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
Initialise a Tarhio-Ukkonen-Bleasby search
Synopsis
Prototype
void embPatTUBInit (
const AjPStr pat,
ajint** skipm,
ajint m,
ajint k,
ajint plen
);
Input
| pat: | (Input) | pattern |
| m: | (Input) | real pattern length |
| k: | (Input) | allowed mismatches |
| plen: | (Input) | full pattern length (incl ajcompl & class) |
Output
| skipm: | (Output) | mismatch skip array |
Returns
Description
Initialise a Tarhio-Ukkonen-Bleasby search
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
Perform a Tarhio-Ukkonen-Bleasby search
Synopsis
Prototype
ajint embPatTUBSearch (
const AjPStr pat,
const AjPStr text,
ajint slen,
ajint* const* skipm,
ajint m,
ajint k,
ajint begin,
AjPList l,
AjBool amino,
AjBool carboxyl,
const AjPStr name,
ajint plen
);
Input
| pat: | (Input) | pattern |
| text: | (Input) | text to search (incl ajcompl/class) |
| slen: | (Input) | length of text |
| skipm: | (Input) | mismatch skip array |
| m: | (Input) | real pattern length |
| k: | (Input) | allowed mismatches |
| begin: | (Input) | text offset |
| amino: | (Input) | true if text start |
| carboxyl: | (Input) | true if text end |
| name: | (Input) | name of text |
| plen: | (Input) | total pattern length |
Input & Output
| l: | (Modify) | list to push to |
Returns
Description
Perform a Tarhio-Ukkonen-Bleasby search
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
Match pattern to a sequence
Synopsis
Prototype
ajint embPatBruteForce (
const AjPStr seq,
const AjPStr pat,
AjBool amino,
AjBool carboxyl,
AjPList l,
ajint begin,
ajint mm,
const AjPStr name
);
Input
| seq: | (Input) | text |
| pat: | (Input) | pattern |
| amino: | (Input) | true if must match start |
| carboxyl: | (Input) | true if must match end |
| begin: | (Input) | text offset |
| mm: | (Input) | allowed mismatches |
| name: | (Input) | text entry name |
Input & Output
| l: | (Modify) | list on which to push hits |
Returns
Description
Match pattern to a 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
Match variable pattern against constant text.
Used for matching many patterns against one sequence.
Synopsis
Prototype
ajint embPatVariablePattern (
const AjPStr pattern,
const AjPStr text,
const AjPStr patname,
AjPList l,
ajint mode,
ajint mismatch,
ajint begin
);
Input
| pattern: | (Input) | pattern to match |
| text: | (Input) | text to scan |
| patname: | (Input) | ID or AC of pattern |
| mode: | (Input) | 1 for protein, 0 for nucleic acid |
| mismatch: | (Input) | allowed mismatches |
| begin: | (Input) | text offset |
Input & Output
| l: | (Modify) | list on which to push hits |
Returns
Description
Match variable pattern against constant text.
Used for matching many patterns against one 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
Replace RE names by the name of the prototype for that RE
Synopsis
Prototype
void embPatRestrictPreferred (
AjPList l,
const AjPTable t
);
Input
| t: | (Input) | table from embossre.equ file |
Input & Output
| l: | (Modify) | list of EmbPMatMatch hits |
Returns
Description
Replace RE names by the name of the prototype for that RE
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
Cut down the number of restriction enzyme hits from embPatRestrictScan
Notably double reporting of symmetric palindromes and reporting
of isoschizomers. Also provides an optional alphabetic sort.
If we don't allow isoschizomers, then names of all isoschizomers
found will be added to the string 'iso' in the returned list of
EmbPMatMatch structures. If 'isos' is AjTrue then they will be left alone.
Synopsis
Prototype
ajint embPatRestrictRestrict (
AjPList l,
ajint hits,
AjBool isos,
AjBool alpha
);
Input
| hits: | (Input) | number of hits from embPatRestrictScan |
| isos: | (Input) | Allow isoschizomers |
| alpha: | (Input) | Sort alphabetically |
Input & Output
| l: | (Modify) | list of hits from embPatRestrictScan |
Returns
| ajint: | adjusted number of hits |
Description
Cut down the number of restriction enzyme hits from embPatRestrictScan
Notably double reporting of symmetric palindromes and reporting
of isoschizomers. Also provides an optional alphabetic sort.
If we don't allow isoschizomers, then names of all isoschizomers
found will be added to the string 'iso' in the returned list of
EmbPMatMatch structures. If 'isos' is AjTrue then they will be left alone.
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
Sort restriction site hits on the basis of start position
Synopsis
Prototype
ajint embPatRestrictStartCompare (
const void* a,
const void* b
);
Input
| a: | (Input) | First EmbPMatMatch hit |
| b: | (Input) | Second EmbPMatMatch hit |
Returns
| ajint: | 0 if a and b are equal
-ve if a is less than b,
+ve if a is greater than b |
Description
Sort restriction site hits on the basis of start position
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
Sort restriction site hits on the basis of cut position
Synopsis
Prototype
ajint embPatRestrictCutCompare (
const void* a,
const void* b
);
Input
| a: | (Input) | First EmbPMatMatch hit |
| b: | (Input) | Second EmbPMatMatch hit |
Returns
| ajint: | 0 if a and b are equal
-ve if a is less than b,
+ve if a is greater than b |
Description
Sort restriction site hits on the basis of cut position
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
Sort restriction site hits on the basis of enzyme name
Synopsis
Prototype
ajint embPatRestrictNameCompare (
const void* a,
const void* b
);
Input
| a: | (Input) | First EmbPMatMatch hit |
| b: | (Input) | Second EmbPMatMatch hit |
Returns
| ajint: | 0 if a and b are equal
-ve if a is less than b,
+ve if a is greater than b |
Description
Sort restriction site hits on the basis of enzyme name
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
Main Restriction function. Scans sequence and rejects unwanted
cutters
Synopsis
Prototype
ajint embPatRestrictMatch (
const AjPSeq seq,
ajint begin,
ajint end,
AjPFile enzfile,
const AjPStr enzymes,
ajint sitelen,
AjBool plasmid,
AjBool ambiguity,
ajint min,
ajint max,
AjBool blunt,
AjBool sticky,
AjBool commercial,
AjPList l
);
Input
| seq: | (Input) | sequence |
| begin: | (Input) | start position in sequence |
| end: | (Input) | end position in sequence |
| enzymes: | (Input) | comma separated list of REs
or NULL for all |
| sitelen: | (Input) | minimum length of recognition site |
| plasmid: | (Input) | Circular DNA |
| ambiguity: | (Input) | Allow ambiguities |
| min: | (Input) | minimum number of true cuts |
| max: | (Input) | maximum number of true cuts |
| blunt: | (Input) | Allow blunt cutters |
| sticky: | (Input) | Allow sticky cutters |
| commercial: | (Input) | Allow Only report REs with a supplier |
Input & Output
| enzfile: | (Modify) | file pointer to .enz file |
| l: | (Modify) | list for (EmbPMatMatch) hits |
Returns
Description
Main Restriction function. Scans sequence and rejects unwanted
cutters
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
Return the type of a pattern
Synopsis
Prototype
ajint embPatGetType (
const AjPStr pattern,
AjPStr* cleanpat,
ajint mismatch,
AjBool protein,
ajint* m,
AjBool* left,
AjBool* right
);
Input
| pattern: | (Input) | original pattern |
| mismatch: | (Input) | number of allowed mismatches |
| protein: | (Input) | true if protein |
Output
| cleanpat: | (Output) | cleaned pattern |
| m: | (Output) | real length of pattern |
| left: | (Output) | must match left begin |
| right: | (Output) | must match right |
Returns
Description
Return the type of a pattern
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
Compile a pattern classified by embPatGetType
Synopsis
Prototype
void embPatCompile (
ajint type,
const AjPStr pattern,
ajint* plen,
ajint** buf,
EmbPPatBYPNode off,
ajuint** sotable,
ajuint* solimit,
ajint* m,
AjPStr* regexp,
ajint*** skipm,
ajint mismatch
);
Input
| type: | (Input) | pattern type |
| pattern: | (Input) | original pattern |
| mismatch: | (Input) | number of allowed mismatches |
Output
| plen: | (Output) | pattern length |
| buf: | (Output) | buffer for BMH search |
| off: | (Output) | offset buffer for B-Y/P search |
| sotable: | (Output) | buffer for SHIFT-OR |
| solimit: | (Output) | limit for SHIFT-OR |
| m: | (Output) | real length of pattern (from embPatGetType) |
| regexp: | (Output) | PCRE regexp string |
| skipm: | (Output) | skip buffer for Tarhio-Ukkonen |
Returns
Description
Compile a pattern classified by embPatGetType
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
Fuzzy search after embPatGetType and embPatCompile
Synopsis
Prototype
void embPatFuzzSearch (
ajint type,
ajint begin,
const AjPStr pattern,
const AjPStr name,
const AjPStr text,
AjPList l,
ajint plen,
ajint mismatch,
AjBool left,
AjBool right,
ajint* buf,
EmbPPatBYPNode off,
const ajuint* sotable,
ajint solimit,
const AjPStr regexp,
ajint* const* skipm,
ajint* hits,
ajint m,
void** tidy
);
Input
| type: | (Input) | pattern type |
| begin: | (Input) | text displacement (1=start) |
| pattern: | (Input) | processed pattern |
| name: | (Input) | name associated with text |
| text: | (Input) | text |
| plen: | (Input) | pattern length |
| mismatch: | (Input) | number of allowed mismatches |
| left: | (Input) | must match left |
| right: | (Input) | must match right |
| sotable: | (Input) | buffer for SHIFT-OR |
| solimit: | (Input) | limit for SHIFT-OR |
| regexp: | (Input) | PCRE regexp string |
| skipm: | (Input) | skip buffer for Tarhio-Ukkonen-Bleasby |
| m: | (Input) | real pat length (from embPatGetType/embPatCompile) |
Output
| hits: | (Output) | number of hits |
| tidy: | (Output) | data to free |
Input & Output
| l: | (Modify) | list to push hits onto |
| buf: | (Modify) | buffer for BMH search |
| off: | (Modify) | offset buffer for B-Y/P search |
Returns
Description
Fuzzy search after embPatGetType and embPatCompile
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
Compile a pattern classified by embPatGetType
Synopsis
Prototype
void embPatCompileII (
AjPPatComp thys,
ajint mismatch
);
Input
| mismatch: | (Input) | number of allowed mismatches |
Input & Output
| thys: | (Modify) | Prosite pattern stucture |
Returns
Description
Compile a pattern classified by embPatGetType
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
Fuzzy search after embPatGetType and embPatCompile
Synopsis
Prototype
void embPatFuzzSearchII (
AjPPatComp thys,
ajint begin,
const AjPStr name,
const AjPStr text,
AjPList l,
ajint mismatch,
ajint* hits,
void** tidy
);
Input
| begin: | (Input) | Sequence displacement (1=start) |
| name: | (Input) | Name associated with sequence |
| text: | (Input) | Sequence |
| mismatch: | (Input) | number of allowed mismatches |
Output
| hits: | (Output) | number of hits |
| tidy: | (Output) | data to free |
Input & Output
| thys: | (Modify) | Prosite pattern stucture |
| l: | (Modify) | List to push hits onto |
Returns
Description
Fuzzy search after embPatGetType and embPatCompile
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
Return the type of a pattern
Synopsis
Prototype
ajint embPatGetTypeII (
AjPPatComp thys,
const AjPStr pattern,
ajint mismatch,
AjBool protein
);
Input
| pattern: | (Input) | Original pattern |
| mismatch: | (Input) | Number of allowed mismatches |
| protein: | (Input) | True if protein |
Input & Output
| thys: | (Modify) | Prosite pattern stucture |
Returns
Description
Return the type of a pattern
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