Exemple #1
0
        /*
         * Determines if a peptide's retention time is in the past, future, or present
         * Returns PAST(-1) if the retention window has passed, PRESENT(0) if the
         * retention window is in the future, FUTURE(1) if the retention window is
         * active.
         */
        public String retentionTense(Peptide pep)
        {
            RetentionTime rt         = pep.getRetentionTime();
            bool          isObserved = !rt.IsPredicted();
            double        rtStart    = rt.getRetentionTimeStart();
            double        rtEnd      = rt.getRetentionTimeEnd();

            if (isObserved)
            {
                if (pep.isExcluded(currentTime))
                {
                    return(CURRENT_OBSERVED);
                }
                else
                {
                    return(PAST_OBSERVED);
                }
            }
            else if (pep.isExcluded(currentTime))
            {
                return(PRESENT);
            }
            else if (rtStart > currentTime)
            {
                return(FUTURE);
            }
            else if (rtEnd < currentTime)
            {
                return(PAST);
            }
            return(ERROR);
        }
Exemple #2
0
        public bool isExcluded(double time)
        {
            double rtStart = retentionTime.getRetentionTimeStart();
            double rtEnd   = retentionTime.getRetentionTimeEnd();

            if (rtStart <= time && rtEnd >= time)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }