public PatternIdentifier() { _apm = new ApproximatePatternMatchingCalculator(); _patternConverter = new PatternConverter(); _ngen = new NeighborhoodGenerator(); _rc = new ReverseComplement(); }
public string Solve(string dna, int k, double[,] profile) { PatternConverter patternConverter = new PatternConverter(); var kmers = ExtractKmers(dna, k).ToList(); double maxProbability = 0; int maxIndex = -1; for (var row = 0; row < kmers.Count; row++) { string kmer = kmers[row]; double product = 1; for (int index = 0; index < kmer.Length; index++) { product *= profile[patternConverter.SymbolToNumber(kmer[index]), index]; } if (maxProbability < product) { maxProbability = product; maxIndex = row; } } return kmers[maxIndex]; }
public FrequencyCalculator() { converter = new PatternConverter(); }
public ClumpFinder() { _calculator = new FrequencyCalculator(); _converter = new PatternConverter(); }