public int CompareTo(object obj) { if (null == obj) { return(1); } FoldChangeResult that = (FoldChangeResult)obj; var thisTuple = new Tuple <double, double>(FoldChange, MinFoldChange); var thatTuple = new Tuple <double, double>(that.FoldChange, that.MinFoldChange); return(((IComparable)thisTuple).CompareTo(thatTuple)); }
public bool Matches(SrmDocument document, Protein protein, Databinding.Entities.Peptide peptide, FoldChangeResult foldChangeResult, CutoffSettings cutoffSettings) { foreach (var match in matchOptions) { switch (match) { case MatchOption.ProteinName: case MatchOption.ProteinAccession: case MatchOption.ProteinPreferredName: case MatchOption.ProteinGene: case MatchOption.PeptideSequence: case MatchOption.PeptideModifiedSequence: case MatchOption.MoleculeGroupName: case MatchOption.MoleculeName: case MatchOption.CAS: case MatchOption.HMDB: case MatchOption.InChiKey: { var matchString = GetMatchString(document, protein, peptide); if (matchString == null || !Regex.IsMatch(matchString, RegExpr)) { return(false); } break; } case MatchOption.BelowLeftCutoff: { if (!cutoffSettings.FoldChangeCutoffValid || foldChangeResult.Log2FoldChange >= -cutoffSettings.Log2FoldChangeCutoff) { return(false); } break; } case MatchOption.AboveRightCutoff: { if (!cutoffSettings.FoldChangeCutoffValid || foldChangeResult.Log2FoldChange <= cutoffSettings.Log2FoldChangeCutoff) { return(false); } break; } case MatchOption.BelowPValueCutoff: { if (!cutoffSettings.PValueCutoffValid || foldChangeResult.AdjustedPValue <= Math.Pow(10, -cutoffSettings.PValueCutoff)) { return(false); } break; } case MatchOption.AbovePValueCutoff: { if (!cutoffSettings.PValueCutoffValid || foldChangeResult.AdjustedPValue >= Math.Pow(10, -cutoffSettings.PValueCutoff)) { return(false); } break; } } } return(true); }
public FoldChangeRow(Protein protein, Model.Databinding.Entities.Peptide peptide, IsotopeLabelType labelType, int? msLevel, GroupIdentifier group, int replicateCount, FoldChangeResult foldChangeResult) { Protein = protein; Peptide = peptide; IsotopeLabelType = labelType; MsLevel = msLevel; ReplicateCount = replicateCount; FoldChangeResult = foldChangeResult; Group = group; }