Ejemplo n.º 1
0
 public SpecificFragment(LipidClass lipidClass, LipidType lipidType, string fragmentDescription, FragmentationMode fragmentationMode, FragmentationType fragmentationType)
 {
     LipidClass          = lipidClass;
     LipidType           = lipidType;
     FragmentDescription = fragmentDescription;
     FragmentationMode   = fragmentationMode;
     FragmentationType   = fragmentationType;
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 public MsMsAnnotation(FragmentationType fragmentationType)
 {
     FragmentionType = fragmentationType;
 }