#include <qual.h> int calc_quality( int contig, int start, int end, char *qual, float cons_cutoff, int qual_cutoff, int (*info_func)(int job, void *mydata, info_arg_t *theirdata), void *info_data) int database_info( int job, void *mydata, info_arg_t *theirdata);
This function calculates the quality codes for a given segment of a contig consensus sequence. The quality information is stored in the qual buffer, which should be allocated by the caller to be at least end-start+1 bytes long. The contents of this buffer is one byte per base, consisting of a letter between 'a' and 'j'. There are #defines in `qual.h' assigning meanings to these codes, which should be used in preference to hard coding the codes themselves. The defines and meanings are as follows.
a - R_GOOD_GOOD_EQ
b - R_GOOD_BAD
c - R_BAD_GOOD
d - R_GOOD_NONE
e - R_NONE_GOOD
f - R_BAD_BAD
g - R_BAD_NONE
h - R_NONE_BAD
i - R_GOOD_GOOD_NE
j - R_NONE_NONE
The contig, start and end arguments hold the contig and range to calculate the quality for. The ranges are inclusive and start counting with the first base as position 1.
qual_cutoff and cons_cutoff hold the quality and consensus cutoff
parameters. These are used in an identical manner to the
function. See section calc_quality.
The info_func and info_data arguments are also used in the same
calc_quality. Generally info_func should be
database_info and info_data should be a GapIO pointer.
This will then read the sequence data from the Gap4 database.
The function returns 0 for success, -1 for failure.