public SpecificFragment(LipidClass lipidClass, LipidType lipidType, string fragmentDescription, FragmentationMode fragmentationMode, FragmentationType fragmentationType) { LipidClass = lipidClass; LipidType = lipidType; FragmentDescription = fragmentDescription; FragmentationMode = fragmentationMode; FragmentationType = fragmentationType; }
private double ScoreSingleFragmentationTypeDissimilarity( IEnumerable <MsMsSearchResult> searchResultList, List <ScoreModelUnit> relatedScoreModelUnits, FragmentationType fragmentationType, double maxIntensity) { double fragmentationTypeScore = 0; foreach (var result in searchResultList) { var fragment = result.TheoreticalPeak.Description; double intensity = 0; if (result.ObservedPeak != null) { intensity = Math.Log10(result.ObservedPeak.Intensity) / Math.Log10(maxIntensity); } var scoreUnits = relatedScoreModelUnits.Where(x => x.FragmentationType == fragmentationType && x.FragmentDescription.Equals(fragment)); var found = false; foreach (var scoreUnit in scoreUnits) { double fragmentScore; var inverseProbability = 1 - scoreUnit.Probability; // Observed if (!found && intensity <= scoreUnit.IntensityMax) { fragmentScore = Math.Log(inverseProbability / scoreUnit.Probability) - Math.Log(inverseProbability); found = true; } // Not Observed else { fragmentScore = -Math.Log(inverseProbability); } fragmentationTypeScore += fragmentScore; } } return(fragmentationTypeScore); }
public int CompareTo(ScoreModelUnit other) { if (!LipidClass.Equals(other.LipidClass)) { return(LipidClass.CompareTo(other.LipidClass)); } if (!LipidType.Equals(other.LipidType)) { return(LipidType.CompareTo(other.LipidType)); } if (!FragmentDescription.Equals(other.FragmentDescription)) { return(String.Compare(FragmentDescription, other.FragmentDescription, StringComparison.Ordinal)); } if (!FragmentationMode.Equals(other.FragmentationMode)) { return(FragmentationMode.CompareTo(other.FragmentationMode)); } if (!FragmentationType.Equals(other.FragmentationType)) { return(FragmentationType.CompareTo(other.FragmentationType)); } return(IntensityMax.CompareTo(other.IntensityMax)); }
public MsMsAnnotation(FragmentationType fragmentationType) { FragmentionType = fragmentationType; }