public List<int> RemoveDataBaseRedundancy(BlastObj obj, double removeAboveIdentiyTheshold, Boolean rebuildDatabase) { var l = new List<int>(); for (int i = 0; i < obj.entries.Count; i++) { if (obj.entries[i].blastFasta.giID == obj.queryFasta.giID) continue; if (obj.entries[i].Identity > removeAboveIdentiyTheshold) { for (int j = 0; j < this._fastaDBSet.Count; j++) { if (this._fastaDBSet[j].giID == obj.entries[i].blastFasta.giID) { l.Add(this._fastaDBSet[j].giID); this._fastaDBSet.RemoveAt(j); break; } } } } if (rebuildDatabase) this.CreateLocalBlastDatabase(this.command, this._blastType, this._fastaDBSet, this._fastaSetPath, true); return l; }
public BlastObj PerformBlast(String queryPath, bool includeWaitTime) { if (this._blastType == BlastType.Null) return null; this._lastQueryPath = queryPath; var cs = LocalBlaster.BlastCommands[(int)this._blastType] + @" -db " + this._localDBPath + @"\~tempLocalBlastDB" + @" -query " + queryPath + @" -out " + _outputPath + @"\~tempBlastOutput.txt"; this.command.RunCommandLine(cs, this._NCBIBlasteEXEPath); //C:\Ryan\ProteinProj\ProjectFiles\~tempLocalBlast.txt", NCBIExs); if (includeWaitTime) while (command.isRunning) { } var bo = new BlastObj(queryPath, _outputPath + @"\~tempBlastOutput.txt"); /* if (this._fastaDBSet != null) for (int i = 0; i < bo.entries.Count; i++) { for (int j = 0; j < this._fastaDBSet.Count; j++) { if (bo.entries[i].blastFasta.giID == this._fastaDBSet[j].giID) { bo.entries[i].sourceFasta = this._fastaDBSet[j]; break; } if (j == this._fastaDBSet.Count - 1) continue; } }*/ return bo; }