embaln.c
Create path matrix for Needleman-Wunsch
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPathCalc (
const char* a,
const char* b,
ajint lena,
ajint lenb,
float gapopen,
float gapextend,
float* path,
float* const* sub,
const AjPSeqCvt cvt,
ajint* compass,
AjBool show
);
Input
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| show: | (Input) | Display path matrix
Optimised to keep a maximum value to avoid looping down or left
to find the maximum. (il 29/07/99) |
Output
| path: | (Output) | path matrix |
| compass: | (Output) | Path direction pointer array |
Returns
Description
Create path matrix for Needleman-Wunsch
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 path matrix for Smith-Waterman
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPathCalcSW (
const char* a,
const char* b,
ajint lena,
ajint lenb,
float gapopen,
float gapextend,
float* path,
float* const* sub,
const AjPSeqCvt cvt,
ajint* compass,
AjBool show
);
Input
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| show: | (Input) | Display path matrix
Optimised to keep a maximum value to avoid looping down or left
to find the maximum. (il 29/07/99) |
Output
| path: | (Output) | path matrix |
| compass: | (Output) | Path direction pointer array |
Returns
Description
Create path matrix for Smith-Waterman
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
Score a matrix for Needleman Wunsch.
Nucleotides or proteins as needed.
Synopsis
Prototype
float embAlignScoreNWMatrix (
const float* path,
const AjPSeq a,
const AjPSeq b,
float* const* fmatrix,
const AjPSeqCvt cvt,
ajint lena,
ajint lenb,
float gapopen,
const ajint* compass,
float gapextend,
ajint* start1,
ajint* start2
);
Input
| path: | (Input) | path matrix |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| fmatrix: | (Input) | substitution matrix from
AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| gapopen: | (Input) | gap opening coefficient |
| compass: | (Input) | Path direction pointer array |
| gapextend: | (Input) | gap extension coefficient |
Output
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
| float: | Maximum path axis score |
Description
Score a matrix for Needleman Wunsch.
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
Walk down a matrix for Smith Waterman. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
float embAlignScoreSWMatrix (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPSeq a,
const AjPSeq b,
ajint lena,
ajint lenb,
float* const* sub,
const AjPSeqCvt cvt,
ajint* start1,
ajint* start2
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
Output
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
| float: | Score of best matching segment |
Description
Walk down a matrix for Smith Waterman. Form aligned strings.
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
Walk down a matrix for Smith Waterman. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignWalkSWMatrix (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPSeq a,
const AjPSeq b,
AjPStr* m,
AjPStr* n,
ajint lena,
ajint lenb,
float* const* sub,
const AjPSeqCvt cvt,
ajint* start1,
ajint* start2
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
Output
| m: | (Output) | alignment for first sequence |
| n: | (Output) | alignment for second sequence |
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
Description
Walk down a matrix for Smith Waterman. Form aligned strings.
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
Walk down a matrix for Needleman Wunsch. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignWalkNWMatrix (
const float* path,
const AjPSeq a,
const AjPSeq b,
AjPStr* m,
AjPStr* n,
ajint lena,
ajint lenb,
ajint* start1,
ajint* start2,
float gapopen,
float gapextend,
const AjPSeqCvt cvt,
const ajint* compass,
float* const* sub
);
Input
| path: | (Input) | path matrix |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| gapopen: | (Input) | gap open penalty |
| gapextend: | (Input) | gap extension penalty |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| compass: | (Input) | Path direction pointer array |
| sub: | (Input) | substitution matrix from AjPMatrixf |
Output
| m: | (Output) | alignment for first sequence |
| n: | (Output) | alignment for second sequence |
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
Description
Walk down a matrix for Needleman Wunsch. Form aligned strings.
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
Print a global alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPrintGlobal (
AjPFile outf,
const char* a,
const char* b,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float score,
AjBool mark,
float* const* sub,
const AjPSeqCvt cvt,
const char* namea,
const char* nameb,
ajint begina,
ajint beginb
);
Input
| a: | (Input) | complete first sequence |
| b: | (Input) | complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| score: | (Input) | alignment score from AlignScoreX |
| mark: | (Input) | mark matches and conservatives |
| sub: | (Input) | substitution matrix |
| cvt: | (Input) | conversion table for matrix |
| namea: | (Input) | name of first sequence |
| nameb: | (Input) | name of second sequence |
| begina: | (Input) | first sequence offset |
| beginb: | (Input) | second sequence offset |
Input & Output
| outf: | (Modify) | output stream |
Returns
Description
Print a global alignment
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
Print a local alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPrintLocal (
AjPFile outf,
const char* a,
const char* b,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float score,
AjBool mark,
float* const* sub,
const AjPSeqCvt cvt,
const char* namea,
const char* nameb,
ajint begina,
ajint beginb
);
Input
| a: | (Input) | complete first sequence |
| b: | (Input) | complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| score: | (Input) | alignment score from AlignScoreX |
| mark: | (Input) | mark matches and conservatives |
| sub: | (Input) | substitution matrix |
| cvt: | (Input) | conversion table for matrix |
| namea: | (Input) | name of first sequence |
| nameb: | (Input) | name of second sequence |
| begina: | (Input) | first sequence offset |
| beginb: | (Input) | second sequence offset |
Input & Output
| outf: | (Modify) | output stream |
Returns
Description
Print a local alignment
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
Calls unused functions to avoid warning messages
Synopsis
Prototype
void embAlignUnused (
void
);
Returns
Description
Calls unused functions to avoid warning messages
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 path matrix for Smith-Waterman and Needleman-Wunsch
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPathCalcFast (
const char* a,
const char* b,
ajint lena,
ajint lenb,
float gapopen,
float gapextend,
float* path,
float* const* sub,
const AjPSeqCvt cvt,
ajint* compass,
AjBool show,
ajint pathwidth
);
Input
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| show: | (Input) | Display path matrix |
| pathwidth: | (Input) | width of path matrix
Optimised to keep a maximum value to avoid looping down or left
to find the maximum. (il 29/07/99)
Further speeded up by using only width calculations instead of lena. |
Output
| path: | (Output) | path matrix |
| compass: | (Output) | Path direction pointer array |
Returns
Description
Create path matrix for Smith-Waterman and Needleman-Wunsch
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
Walk down a matrix for Smith Waterman. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
float embAlignScoreSWMatrixFast (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPSeq a,
const AjPSeq b,
ajint lena,
ajint lenb,
float* const* sub,
const AjPSeqCvt cvt,
ajint* start1,
ajint* start2,
ajint pathwidth
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| pathwidth: | (Input) | width of path matrix |
Output
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
| float: | Score of best matching segment |
Description
Walk down a matrix for Smith Waterman. Form aligned strings.
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
Walk down a matrix for Smith Waterman. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignWalkSWMatrixFast (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPSeq a,
const AjPSeq b,
AjPStr* m,
AjPStr* n,
ajint lena,
ajint lenb,
float* const* sub,
const AjPSeqCvt cvt,
ajint* start1,
ajint* start2,
ajint width
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening penalty |
| gapextend: | (Input) | gap extension penalty |
| a: | (Input) | first sequence |
| b: | (Input) | second sequence |
| lena: | (Input) | length of first sequence |
| lenb: | (Input) | length of second sequence |
| sub: | (Input) | substitution matrix from AjPMatrixf |
| cvt: | (Input) | Conversion array for AjPMatrixf |
| width: | (Input) | width of path matrix |
Output
| m: | (Output) | alignment for first sequence |
| n: | (Output) | alignment for second sequence |
| start1: | (Output) | start of alignment in first sequence |
| start2: | (Output) | start of alignment in second sequence |
Returns
Description
Walk down a matrix for Smith Waterman. Form aligned strings.
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 path matrix for a profile
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignProfilePathCalc (
const char* a,
ajint proflen,
ajint seqlen,
float gapopen,
float gapextend,
float* path,
float* const* fmatrix,
ajint* compass,
AjBool show
);
Input
| a: | (Input) | sequence |
| proflen: | (Input) | length of profile |
| seqlen: | (Input) | length of sequence |
| gapopen: | (Input) | gap opening coefficient |
| gapextend: | (Input) | gap extension coefficient |
| fmatrix: | (Input) | profile matrix |
| show: | (Input) | Display path matrix |
Output
| path: | (Output) | path matrix |
| compass: | (Output) | Path direction pointer array |
Returns
Description
Create path matrix for a profile
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
Walk down a profile path matrix for Smith Waterman. Form aligned strings.
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignWalkProfileMatrix (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPStr cons,
const AjPStr seq,
AjPStr* m,
AjPStr* n,
ajint proflen,
ajint seqlen,
float* const* fmatrix,
ajint* start1,
ajint* start2
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening coeff |
| gapextend: | (Input) | gap extension coeff |
| cons: | (Input) | consensus sequence |
| seq: | (Input) | second sequence |
| proflen: | (Input) | length of consensus sequence |
| seqlen: | (Input) | length of test sequence |
| fmatrix: | (Input) | profile |
Output
| m: | (Output) | alignment for consensus sequence |
| n: | (Output) | alignment for second sequence |
| start1: | (Output) | start of alignment in consensus sequence |
| start2: | (Output) | start of alignment in test sequence |
Returns
Description
Walk down a profile path matrix for Smith Waterman. Form aligned strings.
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
Print a profile alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignPrintProfile (
AjPFile outf,
const char* a,
const char* b,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float score,
AjBool mark,
float* const* fmatrix,
const char* namea,
const char* nameb,
ajint begina,
ajint beginb
);
Input
| a: | (Input) | complete first sequence |
| b: | (Input) | complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| score: | (Input) | alignment score from AlignScoreX |
| mark: | (Input) | mark matches and conservatives |
| fmatrix: | (Input) | profile |
| namea: | (Input) | name of first sequence |
| nameb: | (Input) | name of second sequence |
| begina: | (Input) | first sequence offset |
| beginb: | (Input) | second sequence offset |
Input & Output
| outf: | (Modify) | output stream |
Returns
Description
Print a profile alignment
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
Calculate Similarity of two sequences (same length)
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignCalcSimilarity (
const AjPStr m,
const AjPStr n,
float* const* sub,
const AjPSeqCvt cvt,
ajint lenm,
ajint lenn,
float* id,
float* sim,
float* idx,
float* simx
);
Input
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| sub: | (Input) | substitution matrix |
| cvt: | (Input) | conversion table for matrix |
| lenm: | (Input) | length of first sequence |
| lenn: | (Input) | length of second sequence |
Output
| id: | (Output) | % identity |
| sim: | (Output) | % similarity |
| idx: | (Output) | % identity wrt longest sequence |
| simx: | (Output) | % similarity wrt longest sequence |
Returns
Description
Calculate Similarity of two sequences (same length)
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
Score a profile path matrix for Smith Waterman.
Nucleotides or proteins as needed.
Synopsis
Prototype
float embAlignScoreProfileMatrix (
const float* path,
const ajint* compass,
float gapopen,
float gapextend,
const AjPStr seq,
ajint proflen,
ajint seqlen,
float* const* fmatrix,
ajint* start1,
ajint* start2
);
Input
| path: | (Input) | path matrix |
| compass: | (Input) | Path direction pointer array |
| gapopen: | (Input) | gap opening coeff |
| gapextend: | (Input) | gap extension coeff |
| seq: | (Input) | second sequence |
| proflen: | (Input) | length of consensus sequence |
| seqlen: | (Input) | length of test sequence |
| fmatrix: | (Input) | profile |
Output
| start1: | (Output) | start of alignment in consensus sequence |
| start2: | (Output) | start of alignment in test sequence |
Returns
| float: | profile alignment score |
Description
Score a profile path matrix for Smith Waterman.
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
Print a global alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignReportGlobal (
AjPAlign align,
const AjPSeq seqa,
const AjPSeq seqb,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float gapopen,
float gapextend,
float score,
const AjPMatrixf matrix,
ajint offset1,
ajint offset2
);
Input
| seqa: | (Input) | Complete first sequence |
| seqb: | (Input) | Complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| gapopen: | (Input) | Gap open penalty to report |
| gapextend: | (Input) | Gap extend penalty to report |
| score: | (Input) | alignment score from AlignScoreX |
| matrix: | (Input) | Floating point matrix |
| offset1: | (Input) | first sequence offset |
| offset2: | (Input) | second sequence offset |
Input & Output
| align: | (Modify) | Alignment object |
Returns
Description
Print a global alignment
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
Print a local alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignReportLocal (
AjPAlign align,
const AjPSeq seqa,
const AjPSeq seqb,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float gapopen,
float gapextend,
float score,
const AjPMatrixf matrix,
ajint offset1,
ajint offset2
);
Input
| seqa: | (Input) | complete first sequence |
| seqb: | (Input) | complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| gapopen: | (Input) | Gap open penalty to report |
| gapextend: | (Input) | Gap extend penalty to report |
| score: | (Input) | alignment score from AlignScoreX |
| matrix: | (Input) | Floating point matrix |
| offset1: | (Input) | first sequence offset |
| offset2: | (Input) | second sequence offset |
Input & Output
| align: | (Modify) | Alignment object |
Returns
Description
Print a local alignment
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
Print a profile alignment
Nucleotides or proteins as needed.
Synopsis
Prototype
void embAlignReportProfile (
AjPAlign thys,
const AjPSeqset seqset,
const char* a,
const char* b,
const AjPStr m,
const AjPStr n,
ajint start1,
ajint start2,
float score,
AjBool mark,
float* const* fmatrix,
const char* namea,
const char* nameb,
ajint begina,
ajint beginb
);
Input
| seqset: | (Input) | Aligned sequence set |
| a: | (Input) | complete first sequence |
| b: | (Input) | complete second sequence |
| m: | (Input) | Walk alignment for first sequence |
| n: | (Input) | Walk alignment for second sequence |
| start1: | (Input) | start of alignment in first sequence |
| start2: | (Input) | start of alignment in second sequence |
| score: | (Input) | alignment score from AlignScoreX |
| mark: | (Input) | mark matches and conservatives |
| fmatrix: | (Input) | profile |
| namea: | (Input) | name of first sequence |
| nameb: | (Input) | name of second sequence |
| begina: | (Input) | first sequence offset |
| beginb: | (Input) | second sequence offset |
Input & Output
| thys: | (Modify) | Alignment object |
Returns
Description
Print a profile alignment
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