public void Correct(string prefix, IProteinSet proteinSet) { int count = 0; for (int i = 0; i < proteinIndex.Length; i++) { if (T07SearchEngineEnhancement.IsReverseProtein(proteinSet.GetName(proteinIndex[i]), prefix)) { count++; } } if (count == 0 || count == proteinIndex.Length) { return; } List <int> result = new List <int>(); for (int i = 0; i < proteinIndex.Length; i++) { if (!proteinSet.GetName(proteinIndex[i]).StartsWith(prefix)) { result.Add(proteinIndex[i]); } } proteinIndex = result.ToArray(); }
public bool HasReverseProteins(string revstring) { for (int i = 0; i < proteinIds.Length; i++) { if (T07SearchEngineEnhancement.IsReverseProtein(proteinIds[i], revstring)) { return(true); } } return(false); }
public bool HasOnlyReverseHits(string reverseStr, IProteinSet proteinSet) { for (int i = 0; i < proteinIndex.Length; i++) { if (!T07SearchEngineEnhancement.IsReverseProtein(proteinSet.GetName(proteinIndex[i]), reverseStr)) { return(false); } } return(true); }