private List <TaxonomicClassification> GetBestMatchingTaxonomies(SpeciesInfo candidate, List <TaxonomicClassification> localTaxonomies) { var speciesMatches = GetAllMatchesForSpecies(candidate, localTaxonomies); if (speciesMatches.Count > 0) { return(speciesMatches); } if (candidate.GetName().ToLower() == "human") { return(new List <TaxonomicClassification>()); //TODO: hack to prevent overzealous matching for humans. Need to figure out a better way... } var genusMatches = GetAllMatchesForGenus(candidate, localTaxonomies); if (genusMatches.Count > 0) { return(genusMatches); } var familyMatches = GetAllMatchesForFamily(candidate, localTaxonomies); if (familyMatches.Count > 0) { return(familyMatches); } return(new List <TaxonomicClassification>()); }
private Double GetMinProbability(SpeciesInfo speciesInfo) { var key = speciesInfo.GetName().ToLower(); return(ProbabilityMins.ContainsKey(key) ? ProbabilityMins[key] : ProbabilityMins["default"]); }