static void ExecuteSingle(List <Antigen> antigens) { var sequences = GetSequencesByAntigens(antigens); var markov = new HiddenMarkovModel(sequences, TypeBioSequence); markov.Train(); for (int antibodySize = Constants.MIN_SIZE_ANTIBODY; antibodySize <= Constants.MAX_SIZE_ANTIBODY; antibodySize++) { var clonalgPR = new ClonalgPR(distance: markov, antigens: antigens, typeBioSequence: TypeBioSequence, antibodySize: antibodySize); clonalgPR.Execute(maximumIterations: 1000, percentHighAffinity: 0.6, percentLowAffinity: 0.4); } ReadAllFiles(antigens.Count()); }
static void ExecuteMultiple(List <List <Antigen> > antigens) { for (int index = 0; index < antigens.Count; index++) { var _antigens = antigens[index]; var sequences = _antigens.Select(s => s.Sequence).ToList(); var markov = new HiddenMarkovModel(sequences, TypeBioSequence); markov.Train(); var clonalgPR = new ClonalgPR(distance: markov, antigens: _antigens, typeBioSequence: TypeBioSequence); clonalgPR.Execute(maximumIterations: 10000, percentHighAffinity: 0.9, percentLowAffinity: 0.1, index); } ReadAllFiles(antigens.Count()); }