Preprocessing utilities header. More...
Go to the source code of this file.
Functions | |
Chain * | createChainComplement (Chain *chain) |
Creates chain complement. More... | |
void | readFastaChain (Chain **chain, const char *path) |
Fasta chain reading function. More... | |
void | readFastaChains (Chain ***chains, int *chainsLen, const char *path) |
Fasta chain reading function. More... | |
void | scorerCreateScalar (Scorer **scorer, int match, int mismatch, int gapOpen, int gapExtend) |
Scalar scorer creation utility functions. More... | |
void | scorerCreateMatrix (Scorer **scorer, char *name, int gapOpen, int gapExtend) |
Nonscalar scorer creation utility functions. More... | |
Preprocessing utilities header.
Creates chain complement.
Function persumes the characters in the chain are nucleotides. Every 'A' is turned into 'T', every 'C' to 'G' and vice versa. Any other characters are left intact. Also the complement chain is in the reverse order of the original.
chain | chain object |
void readFastaChain | ( | Chain ** | chain, |
const char * | path | ||
) |
Fasta chain reading function.
Function reads file from the given path, which should be in the fasta format. More on fasta format http://en.wikipedia.org/wiki/FASTA_format. Function persumes only one chain is in the file. Function persumes that the fasta chain name is no more than 1000 characters long.
chain | output chain object |
path | file path |
void readFastaChains | ( | Chain *** | chains, |
int * | chainsLen, | ||
const char * | path | ||
) |
Fasta chain reading function.
Function works in the same way as the readFastaChain() but does not persume only one chain is in the file.
chains | output chain array object |
chainsLen | output chain array length |
path | file path |
void scorerCreateMatrix | ( | Scorer ** | scorer, |
char * | name, | ||
int | gapOpen, | ||
int | gapExtend | ||
) |
Nonscalar scorer creation utility functions.
Scorer is created with the max score equal to 26. Observing the scorerEncode() method it means this scorer only accepts alphabet characters and it must not be used with no other characters. This function is used for creating the scorer with the most common standard similarity matrices.
scorer | output scorer object |
name | name can be one of the "BLOSUM_62", "BLOSUM_45", "BLOSUM_50", "BLOSUM_80", "BLOSUM_90", "PAM_30", "PAM_70" or "PAM_250" |
gapOpen | affine gap open penalty, defined as positive integer |
gapExtend | affine gap extend penalty, defined as positive integer |
void scorerCreateScalar | ( | Scorer ** | scorer, |
int | match, | ||
int | mismatch, | ||
int | gapOpen, | ||
int | gapExtend | ||
) |
Scalar scorer creation utility functions.
Scorer is created with the max score equal to 26. Observing the scorerEncode() method it means this scorer only accepts alphabet characters and it must not be used with no other characters. This scorer is scalar, see scorerIsScalar().
scorer | output scorer object |
match | match score for every two equal codes, defined as positive integer |
mismatch | mismatch penalty for every two unequal codes, defined as negative integer |
gapOpen | affine gap open penalty, defined as positive integer |
gapExtend | affine gap extend penalty, defined as positive integer |