Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="entryBuInterfaceHashes"></param>
        public void ComapreEntryBuInterfaces(string pdbId, Dictionary <string, InterfaceChains[]>[] entryBuInterfaceHashes)
        {
            Dictionary <string, InterfacePairInfo[]> pdbPisaBuInterfaceCompHash = CompareEntryBuInterfaces(entryBuInterfaceHashes[(int)BuType.PDB], entryBuInterfaceHashes[(int)BuType.PISA]);

            InsertDataIntoTables(pdbId, pdbPisaBuInterfaceCompHash, "pdbpisa");

            dbInsert.InsertDataIntoDBtables(ProtCidSettings.buCompConnection, EntryBuCompTables.entryBuCompTables);
            EntryBuCompTables.ClearTables();
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        public void CompareEntryBUs()
        {
            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.currentOperationLabel = "Compare Entry BUs";

            string    queryString    = "Select Distinct PdbID From AsymUNit Where PolymerType = 'polypeptide';";
            DataTable protEntryTable = dbQuery.Query(ProtCidSettings.pdbfamDbConnection, queryString);

            EntryBuCompTables.InitializeTables();
            EntryBuCompTables.InitializeDbTables();

            ProtCidSettings.progressInfo.totalOperationNum = protEntryTable.Rows.Count;
            ProtCidSettings.progressInfo.totalStepNum      = protEntryTable.Rows.Count;
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Compare Entry BUs");

            string pdbId = "";

            foreach (DataRow entryRow in protEntryTable.Rows)
            {
                pdbId = entryRow["PdbID"].ToString();

                ProtCidSettings.progressInfo.currentOperationNum++;
                ProtCidSettings.progressInfo.currentStepNum++;
                ProtCidSettings.progressInfo.currentFileName = pdbId;

                try
                {
                    CompareEntryBUs(pdbId);
                }
                catch (Exception ex)
                {
                    ProtCidSettings.progressInfo.progStrQueue.Enqueue("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#if DEBUG
                    logWriter.WriteLine("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#endif
                }
            }
#if DEBUG
            logWriter.Close();
#endif
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Done!");
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        public void CompareMissingEntryBUs()
        {
            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.currentOperationLabel = "Compare Entry BUs";

            string[] missingEntries = GetMissingEntries();

            EntryBuCompTables.InitializeTables();

            ProtCidSettings.progressInfo.totalOperationNum = missingEntries.Length;
            ProtCidSettings.progressInfo.totalStepNum      = missingEntries.Length;
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Compare Entry BUs");

            foreach (string pdbId in missingEntries)
            {
                ProtCidSettings.progressInfo.currentOperationNum++;
                ProtCidSettings.progressInfo.currentStepNum++;
                ProtCidSettings.progressInfo.currentFileName = pdbId;

                try
                {
                    CompareEntryBUs(pdbId);
                }
                catch (Exception ex)
                {
                    ProtCidSettings.progressInfo.progStrQueue.Enqueue("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#if DEBUG
                    logWriter.WriteLine("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#endif
                }
            }
#if DEBUG
            logWriter.Close();
#endif
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Done!");
        }
Exemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        public void UpdateComparingEntryBUs(string[] updatedEntries)
        {
            EntryBuCompTables.InitializeTables();

            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.currentOperationLabel = "Compare Entry BUs";
            ProtCidSettings.progressInfo.totalOperationNum     = updatedEntries.Length;
            ProtCidSettings.progressInfo.totalStepNum          = updatedEntries.Length;
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Update Comparing Entry BUs");

            foreach (string pdbId in updatedEntries)
            {
                ProtCidSettings.progressInfo.currentOperationNum++;
                ProtCidSettings.progressInfo.currentStepNum++;
                ProtCidSettings.progressInfo.currentFileName = pdbId;

                try
                {
                    DeleteObsDataInDb(pdbId);

                    CompareEntryBUs(pdbId);
                }
                catch (Exception ex)
                {
                    ProtCidSettings.progressInfo.progStrQueue.Enqueue("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#if DEBUG
                    logWriter.WriteLine("Compare " + pdbId + " entry BUs errors: " + ex.Message);
#endif
                }
            }
#if DEBUG
            logWriter.Close();
#endif
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Done!");
            //     ProtCidSettings.progressInfo.threadFinished = true;
        }