Skip to main content
. 2024 Mar 7;15(3):341. doi: 10.3390/genes15030341
Algorithm 1: Calculation of CAT profile for DNA sequence
Input: DNA sequence as string (AGGTGCCGGT…….)
Output: CAT profile: {C:{D,H}, A:{D,H}, T:{D,H}}
Processing Steps:
Step1: Loop over sequence:
Count exact matches and near matches of the input DNA string. Consider when there were near or exact match with the previous comparison and sum bonuses given during the iteration.
var nearMatch = benchmark.NearMatch(i, dnaString[i]);
var exactMatch = benchmark.ExactMatch(i, dnaString[i]);

nearMatches += nearMatch + prevMatches * nearMatch;
exactMatches += exactMatch + prevMatches * exactMatch;

prevMatches = sequencePrevLength/(i + 1) + exactMatch + nearMatch - Benchmark.minPoint;

bonusTotal += i == dnaString.Length - 1 ? 0 : prevMatches;
sequencePrevLength += (1 * prevMatches);
Step2: For each benchmark:
dnaDistance = (nearMatches + exactMatches)/(bonusTotal + dnaString.Length);
Calculate Cos(sequence benchmark distance, benchmark to benchmark distance)
Calculate H(calculated benchmark cos)
Calculate D(calculated benchmark cos)