void FidoInterface::run() { dogridSearch = !(alpha != -1 && beta != -1 && gamma != -1); double peptidePrior_local = peptidePrior; if(computePriors) { peptidePrior_local = estimatePriors(); if(VERB > 1) { std::cerr << "The estimated peptide level prior probability is : " << peptidePrior_local << std::endl; } } double local_protein_threshold = proteinThreshold; if(truncate) local_protein_threshold = 0.0; proteinGraph = new GroupPowerBigraph (alpha,beta,gamma,nogroupProteins,noseparate,noprune,trivialGrouping); proteinGraph->setMaxAllowedConfigurations(max_allow_configurations); proteinGraph->setPeptidePrior(peptidePrior_local); if(reduceTree && dogridSearch) { //NOTE lets create a smaller tree to estimate the parameters faster if(VERB > 1) { std::cerr << "Reducing the tree of proteins to increase the speed of the grid search.." << std::endl; } proteinGraph->setProteinThreshold(reduced_proteinThreshold); proteinGraph->setPsmThreshold(reduced_psmThreshold); proteinGraph->setPeptideThreshold(reduced_peptideThreshold); proteinGraph->setGroupProteins(false); proteinGraph->setSeparateProteins(false); proteinGraph->setPruneProteins(false); proteinGraph->setTrivialGrouping(true); proteinGraph->setMultipleLabeledPeptides(false); } else { proteinGraph->setProteinThreshold(local_protein_threshold); proteinGraph->setPsmThreshold(psmThreshold); proteinGraph->setPeptideThreshold(peptideThreshold); proteinGraph->setMultipleLabeledPeptides(allow_multiple_labeled_peptides); } }
bool FidoInterface::initialize(Scores& peptideScores, const Enzyme* enzyme) { doGridSearch_ = !(alpha_ != -1 && beta_ != -1 && gamma_ != -1); localPeptidePrior_ = kPeptidePrior; if (kComputePriors) { if (absenceRatio_ != 1.0) { localPeptidePrior_ = 1 - absenceRatio_; } else { localPeptidePrior_ = estimatePriors(peptideScores); } if (VERB > 1) { std::cerr << "The estimated peptide level prior probability is : " << localPeptidePrior_ << std::endl; } } peptideScorePtr_ = &peptideScores; return ProteinProbEstimator::initialize(peptideScores, enzyme); }
void FidoInterface::run() { doGridSearch_ = !(alpha_ != -1 && beta_ != -1 && gamma_ != -1); double localPeptidePrior = kPeptidePrior; if (kComputePriors) { if (absenceRatio_ != 1.0) { localPeptidePrior = 1 - absenceRatio_; } else { localPeptidePrior = estimatePriors(); } if (VERB > 1) { std::cerr << "The estimated peptide level prior probability is : " << localPeptidePrior << std::endl; } } proteinGraph_ = new GroupPowerBigraph(alpha_, beta_, gamma_, noClustering_, noPartitioning_, noPruning_, trivialGrouping_); proteinGraph_->setMaxAllowedConfigurations(LOG_MAX_ALLOWED_CONFIGURATIONS); proteinGraph_->setPeptidePrior(localPeptidePrior); if (gridSearchThreshold_ > 0.0 && doGridSearch_) { //NOTE lets create a smaller tree to estimate the parameters faster if (VERB > 1) { std::cerr << "Reducing the tree of proteins to increase the speed of the grid search.." << std::endl; } proteinGraph_->setProteinThreshold(gridSearchThreshold_); proteinGraph_->setPsmThreshold(gridSearchThreshold_); proteinGraph_->setPeptideThreshold(gridSearchThreshold_); proteinGraph_->setNoClustering(false); // i.e. do clustering proteinGraph_->setNoPartitioning(false); // i.e. do partitioning proteinGraph_->setNoPruning(false); // i.e. do pruning proteinGraph_->setTrivialGrouping(true); proteinGraph_->setMultipleLabeledPeptides(false); } else { proteinGraph_->setProteinThreshold(proteinThreshold_); proteinGraph_->setPsmThreshold(kPsmThreshold); proteinGraph_->setPeptideThreshold(kPeptideThreshold); proteinGraph_->setMultipleLabeledPeptides(kAddPeptideDecoyLabel); } }