public static HlaAssignmentsToConsider GetInstance(QmmrModelOnePeptide qmmrModelOnePeptide) { EveryHlaAssignmentToConsiderBitFlip aEveryHlaAssignmentToConsiderBitFlip = new EveryHlaAssignmentToConsiderBitFlip(); aEveryHlaAssignmentToConsiderBitFlip.QmmrModelOnePeptide = qmmrModelOnePeptide; return(aEveryHlaAssignmentToConsiderBitFlip); }
public static HlaAssignmentsToConsider GetInstance(QmmrModelOnePeptide qmmrModelOnePeptide) { EveryHlaAssignmentToConsiderReplace1s aEveryHlaAssignmentToConsiderReplace1s = new EveryHlaAssignmentToConsiderReplace1s(); aEveryHlaAssignmentToConsiderReplace1s.QmmrModelOnePeptide = qmmrModelOnePeptide; return(aEveryHlaAssignmentToConsiderReplace1s); }
public static HlaAssignmentsToConsider GetInstance(QmmrModelOnePeptide qmmrModelOnePeptide, int depth) { SpecialFunctions.CheckCondition(depth > 0); //!!!raise error EveryHlaAssignmentOfThisDepth aEveryHlaAssignmentOfThisDepth = new EveryHlaAssignmentOfThisDepth(); aEveryHlaAssignmentOfThisDepth.QmmrModelOnePeptide = qmmrModelOnePeptide; aEveryHlaAssignmentOfThisDepth.Depth = depth; return(aEveryHlaAssignmentOfThisDepth); }
private double FindBestHlaAssignmentSet(QmrrPartialModelCollection qmrrPartialModelCollection, double depth) { double sumScore = 0.0; PeptideToBestHlaAssignmentSoFar = new Dictionary <string, BestSoFar <double, TrueCollection> >(); foreach (QmrrPartialModel qmrrPartialModel in qmrrPartialModelCollection) { QmmrModelOnePeptide aQmmrModelOnePeptide = QmmrModelOnePeptideGetInstance(qmrrPartialModel, BestParamsSoFar.Champ, depth); aQmmrModelOnePeptide.FindBestHlaAssignment(); sumScore += aQmmrModelOnePeptide.BestHlaAssignmentSoFar.ChampsScore; PeptideToBestHlaAssignmentSoFar.Add(qmrrPartialModel.Peptide, aQmmrModelOnePeptide.BestHlaAssignmentSoFar); } return(sumScore); }
protected QmmrModelOnePeptide QmmrModelOnePeptideGetInstance(QmrrPartialModel qmrrPartialModel, OptimizationParameterList qmrrParams, double depth) { QmmrModelOnePeptide aQmmrModelOnePeptide = new QmmrModelOnePeptide(); aQmmrModelOnePeptide.QmrrModelMissingAssignment = QmrrModelMissingAssignment.GetInstance(ModelLikelihoodFactories, qmrrPartialModel, qmrrParams); aQmmrModelOnePeptide.CreateNoSwitchablesHlaAssignment(); if (depth == 0) { // do nothing } else if (depth == Math.Floor(depth)) { SpecialFunctions.CheckCondition(depth > 0); aQmmrModelOnePeptide.SetForDepthSearch((int)Math.Floor(depth)); } else { SpecialFunctions.CheckCondition(depth == 1.5); aQmmrModelOnePeptide.SetForBitFlipsAnd1Replacement(); } return(aQmmrModelOnePeptide); }