Esempio n. 1
0
        public static TargetedResult CreateTargetedResult(MassTagResultBase result)
        {
            TargetedResult tr;

            if (result is MassTagResult)
            {
                tr = new UnlabelledTargetedResult();
                writeStandardInfoToResult(tr, result);
                addAdditionalInfo(tr, result as MassTagResult);
            }
            else if (result is O16O18_TResult)
            {
                tr = new O16O18TargetedResult();
                writeStandardInfoToResult(tr, result);
                addAdditionalInfo(tr, result as O16O18_TResult);
            }
            else if (result is N14N15_TResult)
            {
                tr = new N14N15TargetedResult();
                writeStandardInfoToResult(tr, result);
                addAdditionalInfo(tr, result as N14N15_TResult);
            }
            else
            {
                throw new NotImplementedException();
            }



            return(tr);
        }
Esempio n. 2
0
        private static void addAdditionalInfo(TargetedResult tr, O16O18_TResult result)
        {
            O16O18TargetedResult r = (O16O18TargetedResult)tr;

            r.IntensityI0         = getIntensityFromIso(result.IsotopicProfile, 0);
            r.IntensityI2         = getIntensityFromIso(result.IsotopicProfile, 2);
            r.IntensityI4         = getIntensityFromIso(result.IsotopicProfile, 4);
            r.IntensityTheorI0    = getIntensityFromIso(result.MassTag.IsotopicProfile, 0);
            r.IntensityTheorI2    = getIntensityFromIso(result.MassTag.IsotopicProfile, 2);
            r.IntensityTheorI4    = getIntensityFromIso(result.MassTag.IsotopicProfile, 4);
            r.IntensityI4Adjusted = result.IntensityI4Adjusted;
        }