public ActionResult Index(string type)
 {
     if (type == null || !RankTypes.ContainsKey(type))
     {
         return(RedirectToAction("Index", new { type = "all" }));
     }
     else
     {
         return(View(GameCache.GetRankChar(RankTypes[type])));
     }
 }
Beispiel #2
0
        private bool ApplyRanking(RankingState rankingState, double ionMz, MatchedFragmentIon match, bool filter, int start, int end, double startMz, ref RankedMI rankedMI)
        {
            // Avoid ranking precursor ions without losses, if the precursor isotopes will
            // not be taken from product ions
            if (!ExcludePrecursorIsotopes || match.IonType != IonType.precursor || match.Losses != null)
            {
                int offset = OrdinalToOffset(match.IonType, match.Ordinal);
                var type   = match.IonType;
                if (filter)
                {
                    if (TargetInfoObj.LookupMods == null || !TargetInfoObj.LookupMods.HasCrosslinks)
                    {
                        if (!TransitionSettings.Accept(Sequence, MoleculeMassesObj.precursorMz, type, offset, ionMz, start,
                                                       end, startMz))
                        {
                            return(false);
                        }
                    }
                }
                if (rankingState.matchAll)
                {
                    if (MinMz > ionMz || ionMz > MaxMz)
                    {
                        return(false);
                    }

                    if (!RankTypes.Contains(type))
                    {
                        return(false);
                    }

                    if (RankLimit.HasValue && rankingState.Ranked >= RankLimit)
                    {
                        return(false);
                    }

                    if (type != IonType.precursor)
                    {
                        // CONSIDER(bspratt) we may eventually want adduct-level control for small molecules, not just abs charge
                        if (!RankCharges.Contains(Math.Abs(match.Charge.AdductCharge)))
                        {
                            return(false);
                        }
                    }
                }

                rankedMI = rankedMI.ChangeRank(rankingState.RankNext());
                return(true);
            }

            return(false);
        }
 public MilitaryRank(int id, string name, RankTypes type)
 {
     ID   = id;
     Name = name;
     Type = type;
 }
Beispiel #4
0
 Rank(RankTypes rankType)
 {
     RankType = rankType;
 }