예제 #1
0
 /// <summary>
 /// initialize tables
 /// </summary>
 /// <param name="isUpdate"></param>
 protected void InitializeTables(bool isUpdate)
 {
     // create tables in memory
     HomoGroupTables.InitializeTables();
     if (!isUpdate)
     {
         HomoGroupTables.InitializeAllGroupDbTables();
         // reuse the alignments data
         //    HomoGroupTables.InitializeGroupTable();
         //     HomoGroupTables.AddFlagColumn ();
     }
 }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pdbId1"></param>
        /// <param name="pdbId2"></param>
        public DataTable GetEntryAlignmentInfoFromAlignmentsTables(string pdbId1, string pdbId2)
        {
            if (HomoGroupTables.homoGroupTables == null)
            {
                HomoGroupTables.InitializeTables();
            }
            HomoGroupTables.homoGroupTables[HomoGroupTables.HomoRepEntryAlign].Clear();

            string[] homoEntries = new string[1];
            homoEntries[0] = pdbId2;

            entryAlignment.RetrieveRepEntryAlignment(pdbId1, homoEntries, -1);

            GetHomoEntryAlignAsymInfo(ref HomoGroupTables.homoGroupTables[HomoGroupTables.HomoRepEntryAlign]);

            return(HomoGroupTables.homoGroupTables[HomoGroupTables.HomoRepEntryAlign]);
            //       return alignInfoTable;
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="updateGroups"></param>
        public void UpdateGroupMissingEntryAlignments(int[] updateGroups)
        {
            HomoGroupTables.InitializeTables();
            InitializeEntityCrcRepTable();

            delDataWriter = new StreamWriter("DeletedAlignData.txt", true);
            delDataWriter.WriteLine(DateTime.Today.ToShortDateString());

            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Retrieve rep entries alignments info in each group.");
            ProtCidSettings.progressInfo.currentOperationLabel = "Alignments info";

            string tableName = ProtCidSettings.dataType + "HomoGroupEntryAlign";

            ProtCidSettings.logWriter.WriteLine(tableName);
            ProtCidSettings.logWriter.WriteLine("Retrieve rep entries alignments info in each group.");

            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.progStrQueue.Enqueue(tableName);
            ProtCidSettings.progressInfo.totalOperationNum = updateGroups.Length;
            ProtCidSettings.progressInfo.totalStepNum      = updateGroups.Length;

            foreach (int groupId in updateGroups)
            {
                ProtCidSettings.progressInfo.currentFileName = groupId.ToString();
                ProtCidSettings.progressInfo.currentOperationNum++;
                ProtCidSettings.progressInfo.currentStepNum++;

                try
                {
                    DataTable missingAlignTable = GetMissingAlignTable(groupId, tableName);
                    if (missingAlignTable.Rows.Count == 0)
                    {
                        continue;
                    }
                    string[] groupEntries = GetGroupAlignEntries(missingAlignTable);
                    SetEntryPdbCrcMapTable(groupEntries);
                    UpdateMissingAlignEntryTable(groupId, missingAlignTable, entityCrcRepTable);
                }
                catch (Exception ex)
                {
                    ProtCidSettings.logWriter.WriteLine(groupId + " " + ex.Message);
                    ProtCidSettings.logWriter.Flush();
                    ProtCidSettings.progressInfo.progStrQueue.Enqueue(groupId + " " + ex.Message);
                }
            }
            ProtCidSettings.progressInfo.progStrQueue.Enqueue(tableName + " Done!");

            tableName = ProtCidSettings.dataType + "HomoRepEntryAlign";
            ProtCidSettings.logWriter.WriteLine(tableName);
            ProtCidSettings.logWriter.WriteLine("Retrieve rep entries alignments info in each group.");

            ProtCidSettings.progressInfo.ResetCurrentProgressInfo();
            ProtCidSettings.progressInfo.progStrQueue.Enqueue(tableName);
            ProtCidSettings.progressInfo.totalOperationNum = updateGroups.Length;
            ProtCidSettings.progressInfo.totalStepNum      = updateGroups.Length;

            foreach (int groupId in updateGroups)
            {
                ProtCidSettings.progressInfo.currentFileName = groupId.ToString();
                ProtCidSettings.progressInfo.currentOperationNum++;
                ProtCidSettings.progressInfo.currentStepNum++;

                try
                {
                    DataTable missingAlignTable = GetMissingAlignTable(groupId, tableName);
                    if (missingAlignTable.Rows.Count == 0)
                    {
                        continue;
                    }
                    string[] groupEntries = GetGroupAlignEntries(missingAlignTable);
                    SetEntryPdbCrcMapTable(groupEntries);
                    UpdateMissingAlignEntryTable(groupId, missingAlignTable, entityCrcRepTable);
                }
                catch (Exception ex)
                {
                    ProtCidSettings.logWriter.WriteLine(groupId + " " + ex.Message);
                    ProtCidSettings.logWriter.Flush();
                    ProtCidSettings.progressInfo.progStrQueue.Enqueue(groupId + " " + ex.Message);
                }
            }
            delDataWriter.Close();
            ProtCidSettings.progressInfo.progStrQueue.Enqueue(tableName + " Done!");
            ProtCidSettings.progressInfo.progStrQueue.Enqueue("Done!");
            ProtCidSettings.logWriter.WriteLine("Done!");
        }
예제 #4
0
 /// <summary>
 /// initialize tables
 /// </summary>
 /// <param name="isUpdate"></param>
 protected void InitializeTables()
 {
     // create tables in memory
     HomoGroupTables.InitializeTables();
     GetDuplicateSgHash();
 }