The residue (or nucleotide) i in an alignment column, is compared to all other residues (j) in the column. The score for i is the sum over all residues j (not i=j) of the score(ij)*weight(j) . Where score(ij) is taken from a nucleotide or protein scoring matrix (see -datafile qualifier) and the "weight(j)" is the weighting given to the sequence j, which is given in the alignment file.
The highest scoring type of residue is then found in the column. If the number of positive matches for this residue is greater than the "plurality value" then this residue is the consensus. The positive matches for a residue i are calculated as being the sum of weights of all the residues that increase the score of residue i (i.e. positive).
Where no consensus is found at a position i, an 'n' or an 'x' character is output; (depending on it being a DNA or protein sequence).
The "plurality" qualifier allows the user to set a cut-off for the number of positive matches below which there is no consensus.
The "identity" qualifier provides the facility of setting the required number of identities at a site for it to give a consensus at that position. Therefore, if this is set to the number of sequences in the alignment only columns of identities contribute to the consensus.
The "setcase" qualifier sets the threshold for the positive matches above which the consensus is is upper-case and below which the consensus is in lower-case.
|