コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        public static void InitializeGroupTable()
        {
            DbCreator dbCreator         = new DbCreator();
            string    createTableString = "";
            string    createIndexString = "";
            string    tableName         = ProtCidSettings.dataType + "HomoSeqInfo";

            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL, " +
                                "PdbID CHAR(4) NOT NULL, " +
                                "SpaceGroup VARCHAR(30) NOT NULL, " +
                                "ASU VARCHAR(50) NOT NULL, " +
                                "Method VARCHAR(100) NOT NULL, " +
                                "Resolution FLOAT NOT NULL, " +
                                "InPfam CHAR NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (GroupSeqID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx2 ON {0} (PdbID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = ProtCidSettings.dataType + "Groups";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL, " +
                                "EntryPfamArch BLOB Sub_Type TEXT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (GroupSeqID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeResiduesContactsTables()
        {
            DbCreator dbCreator = new DbCreator();

            string tableName         = "SgInterfaceResidues";
            string createTableString = "CREATE TABLE " + tableName + " ( " +
                                       "PDBID        CHAR(4) NOT NULL, " +
                                       "INTERFACEID  INTEGER NOT NULL, " +
                                       "RESIDUE1     CHAR(3) NOT NULL, " +
                                       "SEQID1       CHAR(5) NOT NULL,  " +
                                       "RESIDUE2     CHAR(3) NOT NULL, " +
                                       "SEQID2       CHAR(5) NOT NULL, " +
                                       "DISTANCE     FLOAT NOT NULL);";

            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            string createIdxString = string.Format("CREATE INDEX {0}_Idx1 ON {0} (PdbID, InterfaceID);", tableName);

            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIdxString, tableName);


            tableName         = "SgInterfaceContacts";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "PDBID        CHAR(4) NOT NULL, " +
                                "INTERFACEID  INTEGER NOT NULL, " +
                                "RESIDUE1     CHAR(3) NOT NULL, " +
                                "SEQID1       CHAR(5) NOT NULL,  " +
                                "RESIDUE2     CHAR(3) NOT NULL, " +
                                "SEQID2       CHAR(5) NOT NULL, " +
                                "DISTANCE     FLOAT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIdxString = string.Format("CREATE INDEX {0}_Idx1 ON {0} (PdbID, InterfaceID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIdxString, tableName);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeDbTables()
        {
            DbCreator dbCreate = new DbCreator();

            if (dbCreate.IsTableExist(ProtCidSettings.protcidDbConnection, crystBuInterfaceCompTables[(int)BuType.PDB].TableName))
            {
                return;
            }
            string createTableString = string.Format("Create Table {0} ( " +
                                                     "PdbID CHAR(4) NOT NULL, InterfaceId INTEGER NOT NULL, " +
                                                     "BuID VARCHAR(8), BuInterfaceID INTEGER, QScore FLOAT);",
                                                     crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            string indexString = string.Format("Create INDEX {0}_Idx1 " +
                                               " ON {0} (PdbID, InterfaceID);", crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, crystBuInterfaceCompTables[(int)BuType.PDB].TableName);


            createTableString = string.Format("Create Table {0} ( " +
                                              "PdbID CHAR(4) NOT NULL, InterfaceId INTEGER NOT NULL, " +
                                              "BuID VARCHAR(8), BuInterfaceID INTEGER, QScore FLOAT);",
                                              crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, crystBuInterfaceCompTables[(int)BuType.PISA].TableName);

            indexString = string.Format("Create INDEX {0}_Idx1 " +
                                        " ON {0} (PdbID, InterfaceID);", crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
        }
コード例 #4
0
ファイル: BuCompTables.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        public static void InitializeDomainDbTables()
        {
            DbCreator dbCreator         = new DbCreator();
            string    tableName         = "";
            string    createTableString = "";
            string    createIndexString = "";

            #region domain interfaces data
            foreach (string buType in BuCompBuilder.buTypes)
            {
                if (buType == "asu")
                {
                    tableName = buType + "PfamDomainInterfaces";
                }
                else
                {
                    tableName = buType + "PfamBuDomainInterfaces";
                }
                createTableString = "CREATE TABLE " + tableName + " ( " +
                                    "RelSeqID INTEGER NOT NULL, " +
                                    "PdbID CHAR(4) NOT NULL, " +
                                    "BUID VARCHAR(8) NOT NULL, " +
                                    "InterfaceID INTEGER NOT NULL, " +
                                    "DomainInterfaceID INTEGER NOT NULL, " +
                                    "DomainID1 INTEGER NOT NULL, " +
                                    "DomainID2 INTEGER NOT NULL, " +
                                    "IsReversed CHAR(1) NOT NULL );";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
                createIndexString = string.Format("CREATE INDEX {0}_Idx1 ON {0} (PdbID, BuID);", tableName);
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);

                if (buType == "asu")
                {
                    tableName         = "AsuIntraDomainInterfaces";
                    createTableString = "CREATE TABLE AsuIntraDomainInterfaces ( " +
                                        "RelSeqID INTEGER NOT NULL, " +
                                        "PdbID CHAR(4) NOT NULL, " +
                                        "AsymChain CHAR(3) NOT NULL, " +
                                        "DomainInterfaceID INTEGER NOT NULL, " +
                                        "DomainID1 INTEGER NOT NULL, " +
                                        "DomainID2 INTEGER NOT NULL, " +
                                        "IsReversed CHAR(1) NOT NULL);";
                    dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
                    createIndexString = string.Format("CREATE INDEX AsuIntraDInterfaces_Idx1 ON {0} (PdbID, AsymChain);", tableName);
                    dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);
                }
            }

            tableName         = "PfamRelations";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "RelSeqID INTEGER NOT NULL, " +
                                "FamilyCode1 VARCHAR(15) NOT NULL, " +
                                "FamilyCode2 VARCHAR(15) NOT NULL );";
            dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_Idx1 ON {0} (RelSeqID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);
            #endregion
        }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private DataTable CreateTables(bool isUpdate)
        {
            DataTable pepInterfaceClusterStatTable = new DataTable("PfamPepClusterSumInfo");

            string[] sumColumns = { "PfamID",        "ClusterID",  "NumEntries",  "NumPepPfams",    "NumUnpSeqs", "NumCFs",
                                    "NumPepUnpSeqs", "NumPepSeqs", "SurfaceArea", "MinSeqIdentity", "ClusterInterface" };
            foreach (string col in sumColumns)
            {
                pepInterfaceClusterStatTable.Columns.Add(new DataColumn(col));
            }

            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createTableString = "Create Table " + pepInterfaceClusterStatTable.TableName + " ( " +
                                              " PfamID VARCHAR(40) NOT NULL, " +
                                              " ClusterID Integer Not NULL, " +
                                              " NumEntries Integer NOT NULL, " +
                                              " NumCFs Integer  NOT NULL," +
                                              " NumPepPfams Integer NOT NULL, " +
                                              " NumUnpSeqs Integer NOT NULL, " +
                                              " NumPepUnpSeqs Integer Not NULL, " +
                                              " NumPepSeqs Integer Not NULL, " +
                                              " SurfaceArea FLOAT, " +
                                              " MinSeqIdentity FLOAT, " +
                                              " ClusterInterface CHAR(10));";
                dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, pepInterfaceClusterStatTable.TableName);
            }
            return(pepInterfaceClusterStatTable);
        }
コード例 #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="isUpdate"></param>
        /// <returns></returns>
        private DataTable CreateTable(bool isUpdate)
        {
            string tableName = "PfamClansInPDB";

            string[]  clanColumns       = { "ClanAcc", "NumPfams", "NumPfamsPdb", "NumPfamsPeptide", "NumPfamsDnaRna", "NumEntries", "NumUniprots" };
            DataTable pfamClansPdbTable = new DataTable(tableName);

            foreach (string col in clanColumns)
            {
                pfamClansPdbTable.Columns.Add(new DataColumn(col));
            }

            if (!isUpdate)
            {
                string createTableString = "Create Table " + tableName + " ( " +
                                           " ClanAcc              VARCHAR(10) NOT NULL, " +
                                           " NumPfams             Integer NOT NULL, " +
                                           " NumPfamsPdb          Integer NOT NULL, " +
                                           " NumPfamsPeptide      Integer NOT NULL, " +
                                           " NumPfamsDnaRna       Integer NOT NULL, " +
                                           " NumEntries           Integer NOT NULL, " +
                                           " NumUniProts          Integer NOT NULL " +
                                           ");";
                DbCreator dbCreator = new DbCreator();
                dbCreator.CreateTableFromString(ProtCidSettings.pdbfamDbConnection, createTableString, "PfamClansInPDB");
            }
            return(pfamClansPdbTable);
        }
コード例 #7
0
ファイル: PfamLigandClusters.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        /// <param name="isUpdate"></param>
        private void CreateTables(bool isUpdate)
        {
            pfamLigandClusterTable = new DataTable(tableName);
            string[] clusterCols = { "PfamID", "ClusterID", "PdbID", "ChainDomainID", "LigandChain", "LigandFileChain" };
            foreach (string col in clusterCols)
            {
                pfamLigandClusterTable.Columns.Add(new DataColumn(col));
            }

            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createTableString = "Create Table " + tableName + " ( " +
                                              "PfamID varchar(40) NOT NULL, " +
                                              "ClusterID Integer NOT NULL, " +
                                              "PdbID char(4) Not Null, " +
                                              "ChainDomainID Integer Not Null, " +
                                              "LigandChain char(3) Not Null, " +
                                              "LigandFileChain char(3) Not Null);";
                dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
                string createIndexString = "Create Index " + tableName + "_cluster ON " + tableName + "(PfamID, ClusterID);";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
                createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PdbID, ChainDomainID);";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            }
        }
コード例 #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="isUpdate"></param>
        private void InitializeTables(bool isUpdate)
        {
            string tableName = "PdbPfamDomainFileInfo";

            string[] tableCols = { "PdbID", "DomainID", "EntityID", "AsymChain", "SeqStart", "SeqEnd", "FileStart", "FileEnd" };
            domainFileInfoTable = new DataTable(tableName);
            foreach (string col in tableCols)
            {
                domainFileInfoTable.Columns.Add(new DataColumn(col));
            }

            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createTableString = "CREATE TABLE " + tableName + " ( " +
                                              "PdbID CHAR(4) NOT NULL, " +
                                              "DomainID BIGINT NOT NULL, " +
                                              "EntityID INTEGER NOT NULL, " +
                                              "AsymChain CHAR(3) NOT NULL, " +
                                              "SeqStart INTEGER NOT NULL, " +
                                              "SeqEnd INTEGER NOT NULL, " +
                                              "FileStart INTEGER NOT NULL, " +
                                              "FileEnd INTEGER NOT NULL );";
                dbCreate.CreateTableFromString(createTableString, tableName);
                string createIndexString = "CREATE INDEX " + tableName + "_idx1 ON " + tableName + "(PdbID);";
                dbCreate.CreateIndex(createIndexString, tableName);
                createIndexString = "CREATE INDEX " + tableName + "_idx2 ON " + tableName + "(DomainID);";
                dbCreate.CreateIndex(createIndexString, tableName);
            }
        }
コード例 #9
0
ファイル: LigandComPfamHmm.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        /// 
        /// </summary>
        /// <param name="isUpdate"></param>
        private void CreateTables(bool isUpdate)
        {
            InitializeComHmmTable();

            if (! isUpdate)
            {
                DbCreator dbCreate = new DbCreator ();
                 string dbCreateTableString = "Create Table " + tableName + " ( " +
                    "PfamID Varchar(40) Not Null, " +
                    "PdbID1 char(4) Not Null, " +
                    "ChainDomainID1 Integer Not Null, " +
                    "LigandChain1 char(3) Not Null, " +
                    "PdbID2 char(4) Not Null, " +
                    "ChainDomainID2 Integer Not Null, " +
                    "LigandChain2 char(3) Not Null, " +
                    "NumOfHmmSites1 Integer Not Null, " +
                    "NumOfHmmSites2 Integer Not Null, " +
                    "NumOfComHmmSites Integer Not Null, " +
                    "Jscore FLOAT Not Null);";
                dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, dbCreateTableString, tableName);
                string indexString = "Create Index PfamLigandComHmm_pfam on " + tableName + " (PfamID)";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, tableName);
                indexString = "Create Index PfamLigandComHmm_pdb on " + tableName + "(PdbID1, PdbID2)";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, tableName);
                indexString = "Create Index PfamLigandComHmm_pdb1 on " + tableName + "(PdbID1, ChainDomainID1)";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, tableName);
                indexString = "Create Index PfamLigandComHmm_pdb2 on " + tableName + "(PdbID2, ChainDomainID2)";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, tableName);
            }
        }
コード例 #10
0
ファイル: NonredundantCfGroups.cs プロジェクト: ijlab/ProtCID
        private void InitializeDbTable()
        {
            DbCreator dbCreat           = new DbCreator();
            string    createTableString = string.Format("CREATE TABLE {0} ( " +
                                                        " GroupSeqID INTEGER NOT NULL, " +
                                                        " CfGroupID INTEGER NOT NULL, " +
                                                        " PdbID CHAR(4) NOT NULL, " +
                                                        " SpaceGroup VARCHAR(30) NOT NULL, " +
                                                        " ASU VARCHAR(255) NOT NULL);",
                                                        GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);

            dbCreat.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString,
                                          GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);

            string indexString = string.Format("Create Index {0}_pdb on {0} (PdbID);",
                                               GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);

            dbCreat.CreateIndex(ProtCidSettings.protcidDbConnection, indexString,
                                GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);

            indexString = string.Format("Create Index {0}_groupcf on {0} (GroupSeqID, CfGroupID);",
                                        GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);
            dbCreat.CreateIndex(ProtCidSettings.protcidDbConnection, indexString,
                                GroupDbTableNames.dbTableNames[GroupDbTableNames.NonredundantCfGroups]);
        }
コード例 #11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="isUpdate"></param>
        /// <returns></returns>
        private DataTable CreatePfamDnaRnaInteractTable(bool isUpdate)
        {
            string[]  pfamDnaRnaCols = { "PdbID",    "BuID",           "ChainDomainID", "PfamID", "DnaRnaChain", "DnaRnaSymmetryString",
                                         "AsymChain", "SymmetryString", "DnaRnaSeqID",   "SeqID",  "HmmSeqID" };
            DataTable pfamDnaRnaTable = new DataTable("pfamDnaRnas");

            foreach (string col in pfamDnaRnaCols)
            {
                pfamDnaRnaTable.Columns.Add(new DataColumn(col));
            }
            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createTableString = "Create Table " + pfamDnaRnaTable.TableName + " ( " +
                                              " PdbID CHAR(4) NOT NULL, " +
                                              " BuID VARCHAR(8) NOT NULL, " +
                                              " PfamID VARCHAR(40) NOT NULL, " +
                                              " ChainDomainID INTEGER NOT NULL, " +
                                              " DnaRnaChain CHAR(3) NOT NULL, " +
                                              " DnaRnaSymmetryString VARCHAR(15), " +
                                              " DnaRnaSeqID INTEGER NOT NULL, " +
                                              " AsymChain CHAR(3) NOT NULL, " +
                                              " SymmetryString VARCHAR(15), " +
                                              " SeqID INTEGER NOT NULL, " +
                                              " HmmSeqID INTEGER NOT NULL);";
                dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, pfamDnaRnaTable.TableName);

                string createIndexString = "CREATE INDEX " + pfamDnaRnaTable.TableName + "_idx1 ON " + pfamDnaRnaTable.TableName + "(PdbID, ChainDomainID);";
                dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, pfamDnaRnaTable.TableName);
            }
            return(pfamDnaRnaTable);
        }
コード例 #12
0
ファイル: ChainLigands.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        private DataTable InitializeTable(bool isUpdate)
        {
            string[]  pfamLigandColumns = { "PdbID", "AsymID",    "ChainAsymID", "SeqID", "ChainSeqID", "Distance",
                                            "Atom",   "ChainAtom", "Residue",     "ChainResidue" };
            DataTable pfamLigandTable = new DataTable("ChainLigands");

            foreach (string ligandCol in pfamLigandColumns)
            {
                pfamLigandTable.Columns.Add(new DataColumn(ligandCol));
            }
            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createTableString = "Create Table " + pfamLigandTable.TableName + " (" +
                                              " PdbID CHAR(4) NOT NULL, " +
                                              " AsymID CHAR(3) NOT NULL, " +
                                              //    " Ligand CHAR(5) NOT NULL, " +
                                              " ChainAsymID CHAR(3), " +
                                              " SeqID INTEGER NOT NULL, " +
                                              " ChainSeqID INTEGER NOT NULL, " +
                                              " ATOM CHAR(4) NOT NULL, " +
                                              " ChainATom CHAR(4), " +
                                              " Residue CHAR(3), " +
                                              " ChainResidue CHAR(3), " +
                                              " Distance FLOAT" +
                                              " );";
                dbCreate.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, pfamLigandTable.TableName);
                string createIndexString = "CREATE INDEX " + pfamLigandTable.TableName + "_idx1 ON " + pfamLigandTable.TableName + "(PdbID, AsymID)";
                dbCreate.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, pfamLigandTable.TableName);
            }
            return(pfamLigandTable);
        }
コード例 #13
0
        private void InitializeDbTables()
        {
            DbCreator dbCreate          = new DbCreator();
            string    createTableString = string.Format("CREATE Table {0} ( " +
                                                        " GroupSeqID INTEGER NOT NULL, " +
                                                        " SpaceGroup1 VARCHAR(30) NOT NULL, ASU1 VARCHAR(255) NOT NULL, PDBID1 CHAR(4) NOT NULL, " +
                                                        " NumOfInterfaces1 INTEGER NOT NULL, " +
                                                        " NumOfSgInterfaces1 INTEGER NOT NULL, NumOfSimInterfaces1 INTEGER NOT NULL, " +
                                                        " SpaceGroup2 VARCHAR(30) NOT NULL, ASU2 VARCHAR(255) NOT NULL, PDBID2 CHAR(4) NOT NULL, " +
                                                        " NumOfInterfaces2 INTEGER NOT NULL, " +
                                                        " NumOfSgInterfaces2 INTEGER NOT NULL, NumOfSimInterfaces2 INTEGER NOT NULL, " +
                                                        " MaxQ FLOAT NOT NULL, MinQ FLOAT NOT NULL, " +
                                                        " LeftMaxQ FLOAT NOT NULL, LeftMinQ FLOAT NOT NULL, Identity FLOAT NOT NULL, " +
                                                        " LeftMaxAsa1 FLOAT NOT NULL, LeftMaxAsa2 FLOAT NOT NULL);",
                                                        GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);

            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString,
                                           GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);
            string indexString = string.Format("CREATE INDEX {0}_Idx1 ON {0} (PdbID1);",
                                               GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);

            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString,
                                 GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);
            indexString = string.Format("CREATE INDEX {0}_Idx2 ON {0} (PdbID2);",
                                        GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);
            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString,
                                 GroupDbTableNames.dbTableNames[GroupDbTableNames.ReduntCrystForms]);
        }
コード例 #14
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dataType"></param>
        private void CreateDbRefTablesInDb(string dataType)
        {
            string    createTableString = "";
            string    createIndexString = "";
            DbCreator dbCreator         = new DbCreator();

            if (dataType == "sws")
            {
                createTableString = "CREATE TABLE " + dbRefTable.TableName + " ( " +
                                    " PdbID CHAR(4) NOT NULL, " +
                                    " RefID INTEGER NOT NULL, " +
                                    " EntityID INTEGER NOT NULL, " +
                                    //     " AuthorChain CHAR(3) NOT NULL, " +
                                    " DbAccession VARCHAR(15) NOT NULL, " +
                                    " PRIMARY KEY (PdbID, RefID));";
            }
            else
            {
                createTableString = "CREATE TABLE " + dbRefTable.TableName + " ( " +
                                    " PdbID CHAR(4) NOT NULL, " +
                                    " RefID INTEGER NOT NULL, " +
                                    " EntityID INTEGER NOT NULL, " +
                                    //     " AuthorChain CHAR(3) NOT NULL, " +
                                    " DbAccession VARCHAR(15) NOT NULL, " +
                                    " Isoform INTEGER NOT NULL, " +
                                    " PRIMARY KEY (PdbID, RefID));";
            }
            dbCreator.CreateTableFromString(createTableString, dbRefTable.TableName);
            createIndexString = "CREATE INDEX " + dbRefTable.TableName + "_idx1 ON " + dbRefTable.TableName + "(PdbID, EntityID);";
            dbCreator.CreateIndex(createIndexString, dbRefTable.TableName);

            createTableString = "CREATE TABLE" + dbRefSeqTable.TableName + " ( " +
                                " AlignID INTEGER NOT NULL, " +
                                " PdbID CHAR(4) NOT NULL, " +
                                " RefID INTEGER NOT NULL, " +
                                " AuthorChain CHAR(3) NOT NULL, " +
                                " DbAlignBeg INTEGER NOT NULL, " +
                                " DbAlignEnd INTEGER NOT NULL, " +
                                " AuthorAlignBeg INTEGER NOT NULL, " +
                                " AuthorAlignEnd INTEGER NOT NULL, " +
                                " SeqAlignBeg INTEGER NOT NULL, " +
                                " SeqAlignEnd INTEGER NOT NULL, " +
                                " PRIMARY KEY (PdbID, AlignID));";
            dbCreator.CreateTableFromString(createTableString, dbRefSeqTable.TableName);
            createIndexString = "CREATE INDEX " + dbRefSeqTable.TableName + "_idx1 ON " + dbRefSeqTable.TableName + "(PdbID, RefID);";
            dbCreator.CreateIndex(createIndexString, dbRefSeqTable.TableName);
        }
コード例 #15
0
ファイル: HhrFileParser.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        /// <param name="isUpdate"></param>
        /// <returns></returns>
        public DataTable CreateHHAlignmentTable(bool isUpdate, string tableName)
        {
            string[]  hhrAlignColumns = { "HitNo",         "Query",      "Hit",      "QueryLength", "HitLength",  "AlignLength",
                                          "Identity",       "Evalue",     "PValue",   "Score",       "Similarity", "Prob",
                                          "Sum_Probs",      "QueryStart", "QueryEnd", "HitStart",    "HitEnd",
                                          "QueryAlignment", "HitAlignment" /*, "QueryConsensus", "HitConsensus",
                                                                            * "QueryDssp", "HitDssp", "Confidence", "Match"*/};
            DataTable pfamHHalignTable = new DataTable(tableName);

            foreach (string hhCol in hhrAlignColumns)
            {
                pfamHHalignTable.Columns.Add(new DataColumn(hhCol));
            }

            if (!isUpdate)
            {
                DbCreator dbCreate          = new DbCreator();
                string    createIndexString = "";
                string    createTableString = "CREATE TABLE " + tableName + " ( " +
                                              "HitNO INTEGER NOT NULL, " +
                                              "Query VARCHAR(32) NOT NULL," +
                                              "Hit VARCHAR(32) NOT NULL, " +
                                              "QueryLength INTEGER, " +
                                              "HitLength INTEGER, " +
                                              "AlignLength INTEGER, " +
                                              "Identity FLOAT, " +
                                              "EValue  DOUBLE PRECISION, " +
                                              "PValue DOUBLE PRECISION, " +
                                              "Score DOUBLE PRECISION, " +
                                              "Similarity FLOAT, " +
                                              "Prob FLOAT, " +
                                              "Sum_Probs FLOAT, " +
                                              "QueryStart INTEGER, " + // for the input sequence
                                              "QueryEnd INTEGER, " +
                                              "HitStart INTEGER, " +
                                              "HitEnd INTEGER, " +
                                              "QueryAlignment BLOB Sub_Type 1, " +
                                              "HitAlignment BLOB Sub_Type 1);";

                /*     "QueryConsensus BLOB Sub_Type 1, " +
                 *   "HitConsensus BLOB Sub_Type 1, " +
                 *   "QueryDssp BLOB Sub_Type 1, " +
                 *   "HitDssp BLOB Sub_Type 1, " +
                 *   "Confidence BLOB Sub_Type 1, " +
                 *   "Match BLOB Sub_Type 1);";   */
                dbCreate.CreateTableFromString(ProtCidSettings.alignmentDbConnection, createTableString, tableName);
                createIndexString = "CREATE Index " + tableName + "_query ON " + tableName + "(Query)";
                dbCreate.CreateIndex(ProtCidSettings.alignmentDbConnection, createIndexString, tableName);
                createIndexString = "CREATE Index " + tableName + "_hit ON " + tableName + "(Hit)";
            }
            return(pfamHHalignTable);
        }
コード例 #16
0
        /// <summary>
        ///
        /// </summary>
        private void CreatProtBudBuTableInDb()
        {
            string[] buColumns         = buQuery.BuTableColumns;
            string   createTableString = "Create Table " + buTableName + "( ";
            string   lowerCaseBuCol    = "";

            foreach (string buCol in buColumns)
            {
                lowerCaseBuCol = buCol.ToLower();
                if (lowerCaseBuCol == "pdbid")
                {
                    createTableString += "PdbID CHAR(4) NOT NULL, ";
                }
                else if (lowerCaseBuCol.IndexOf("buid") > -1)
                {
                    createTableString += (buCol + " VARCHAR(10), ");
                }
                else if (lowerCaseBuCol.IndexOf("_entity") > -1 ||
                         lowerCaseBuCol.IndexOf("_asymid") > -1 ||
                         lowerCaseBuCol.IndexOf("_auth") > -1 ||
                         lowerCaseBuCol.IndexOf("_abc") > -1)
                {
                    createTableString += (buCol + " BLOB SUB_TYPE TEXT NOT NULL, ");
                }
                else if (lowerCaseBuCol == "samebus")
                {
                    createTableString += (buCol + " CHAR(9), ");
                }
                else if (lowerCaseBuCol == "dna" || lowerCaseBuCol == "rna" || lowerCaseBuCol == "ligands")
                {
                    createTableString += (buCol + " CHAR(3), ");
                }
                else if (lowerCaseBuCol == "resolution")
                {
                    createTableString += (buCol + " VARCHAR(32), ");
                }
                else if (lowerCaseBuCol == "names")
                {
                    createTableString += (buCol + " BLOB SUB_TYPE TEXT NOT NULL, ");
                }
            }
            createTableString  = createTableString.TrimEnd(", ".ToCharArray());
            createTableString += ");";
            DbCreator dbCreat = new DbCreator();

            dbCreat.CreateTableFromString(ProtCidSettings.pdbfamDbConnection, createTableString, buTableName);

            string createIndexString = "Create Index " + buTableName + "_idx1 ON " + buTableName +
                                       " ( PdbID, PdbBuID, PisaBuID);";

            dbCreat.CreateIndex(ProtCidSettings.pdbfamDbConnection, createIndexString, buTableName);
        }
コード例 #17
0
        /// <summary>
        /// initialize tables in database
        /// </summary>
        public static void InitializeDbTables()
        {
            DbCreator dbCreator                = new DbCreator();
            string    createTableString        = "";
            string    createIndexString        = "";
            string    buCompTableName          = "PdbPisaBuComp";
            string    buInterfaceCompTableName = "PdbPisaBuInterfaceComp";

            // for BU Comparison

            createTableString = "CREATE TABLE " + buCompTableName + " ( " +
                                "PdbID CHAR(4) NOT NULL, " +
                                "BuID1 VARCHAR(8) NOT NULL, " +
                                "BuID2 VARCHAR(8) NOT NULL, " +
                                "InterfaceNum1 INTEGER NOT NULL, " +
                                "InterfaceNum2 INTEGER NOT NULL, " +
                                "IsSame CHAR(1) NOT NULL);";

            dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, buCompTableName);

            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (PdbID, BuID1, BuID2);", buCompTableName);
            dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buCompTableName);

            // for BU Interface comparison
            createTableString = "CREATE TABLE " + buInterfaceCompTableName + " ( " +
                                "PdbID CHAR(4) NOT NULL, " +
                                "BuID1 VARCHAR(8) NOT NULL, " +
                                "BuID2 VARCHAR(8) NOT NULL, " +
                                "InterfaceID1 INTEGER NOT NULL, " +
                                "InterfaceID2 INTEGER NOT NULL, " +
                                "QScore FLOAT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, buInterfaceCompTableName);

            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (PdbID, BuID1, BuID2);", buInterfaceCompTableName);
            dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buInterfaceCompTableName);
        }
コード例 #18
0
ファイル: PfamBuClassifier.cs プロジェクト: ijlab/ProtCID
        private void InitializeDbTable()
        {
            DbCreator dbCreator = new DbCreator();

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, buGroupTable.TableName))
            {
                string createTableString = "Create Table " + buGroupTable.TableName + " ( " +
                                           " GroupSeqID INTEGER NOT NULL, " +
                                           " PdbID CHAR(4) NOT NULL, " +
                                           " BuID VARCHAR(8) NOT NULL, " +
                                           " EntityFormat VARCHAR(255) NOT NULL, " +
                                           " AsymFormat VARCHAR(255) NOT NULL, " +
                                           " AbcFormat VARCHAR(255) NOT NULL );";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, buGroupTable.TableName);

                string createIndexString = "Create INDEX " + buGroupTable.TableName + "_Idx1 ON " +
                                           buGroupTable.TableName + "(PdbID, BuID);";
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buGroupTable.TableName);

                createIndexString = "Create INDEX " + buGroupTable.TableName + "_idx2 ON " +
                                    buGroupTable.TableName + "(GroupSeqID);";
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buGroupTable.TableName);
            }

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, groupTable.TableName))
            {
                string createTableString = "Create Table " + groupTable.TableName + " ( " +
                                           " GroupSeqID INTEGER NOT NULL, " +
                                           " FamilyString BLOB Sub_Type Text NOT NULL);";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, groupTable.TableName);

                /*          string createIndexString = "Create INDEX " + groupTable.TableName + "_idx1 ON " +
                 *            groupTable.TableName + "(GroupSeqID);";
                 *        dbCreator.CreateTable(ProtCidSettings.buCompConnection, createIndexString, groupTable.TableName);*/
            }
        }
コード例 #19
0
ファイル: PfamLigandClusterHmm.cs プロジェクト: ijlab/ProtCID
 /// <summary>
 ///
 /// </summary>
 /// <param name="isUpdate"></param>
 private void CreateDbTable(bool isUpdate)
 {
     if (!isUpdate)
     {
         DbCreator dbCreate          = new DbCreator();
         string    createTableString = "Create Table " + tableName + " ( " +
                                       "PfamID varchar(40) NOT NULL, " +
                                       "ClusterID Integer NOT NULL, " +
                                       "PdbID char(4) Not Null, " +
                                       "ChainDomainID Integer Not Null, " +
                                       "LigandChain char(3) Not Null);";
         dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
         string createIndexString = "Create Index " + tableName + "_cluster ON " + tableName + "(PfamID, ClusterID);";
         dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
         createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PdbID, ChainDomainID);";
         dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
     }
 }
コード例 #20
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeDbTable()
        {
            DbCreator dbCreator = new DbCreator();

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, domainInterfaceCompTable.TableName))
            {
                string createTableString = "CREATE TABLE " + domainInterfaceCompTable.TableName + " ( " +
                                           "RelSeqID INTEGER NOT NULL, " +
                                           "PdbID1 VARCHAR(4) NOT NULL, " +
                                           "PdbID2 VARCHAR(4) NOT NULL, " +
                                           "BuID1 VARCHAR(8) NOT NULL, " +
                                           "BuID2 VARCHAR(8) NOT NULL, " +
                                           "DomainInterfaceID1 INTEGER NOT NULL, " +
                                           "DomainInterfaceID2 INTEGER NOT NULL, " +
                                           "Qscore FLOAT NOT NULL);";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, domainInterfaceCompTable.TableName);
            }
        }
コード例 #21
0
ファイル: InterfaceStatData.cs プロジェクト: ijlab/ProtCID
        public void InitializeStatInfoTable(string type)
        {
            string[] statInfoCols = { "Category", "Single", "Pair", "Total" };
            dbStatInfoTable = new DataTable(type + "StatInfo");
            foreach (string statInfoCol in statInfoCols)
            {
                dbStatInfoTable.Columns.Add(new DataColumn(statInfoCol));
            }

            DbCreator dbCreate          = new DbCreator();
            string    createTableString = "Create Table " + type + "StatInfo ( " +
                                          " Category VARCHAR(30) NOT NULL, " +
                                          " Single Integer NOT NULL, " +
                                          " Pair Integer NOT NULL, " +
                                          " Total Integer NOT NULL );";

            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, type + "StatInfo");
        }
コード例 #22
0
        private void InitializeFamilyTablesInDb()
        {
            DbCreator dbCreator = new DbCreator();

            string tableName         = ProtCidSettings.dataType + "SgInterfaces";
            string createTableString = string.Format("CREATE TABLE {0} (" +
                                                     " GroupSeqID INTEGER NOT NULL, " +
                                                     " SpaceGroup VARCHAR(30) NOT NULL, " +
                                                     " ASU BLOB Sub_Type TEXT NOT NULL, " +
                                                     " PDBID CHAR(4) NOT NULL, " +
                                                     " InterfaceID INTEGER NOT NULL, " +
                                                     " NumOfSG INTEGER NOT NULL, " +
                                                     " NumOfSG_Identity INTEGER NOT NULL, " +
                                                     " SurfaceArea FLOAT );", tableName);

            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            string createIdxString = string.Format("CREATE INDEX {0}_Idx1 " +
                                                   " ON {0} (GroupSeqID, PdbID, InterfaceID);", tableName);

            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIdxString, tableName);
        }
コード例 #23
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeDbTable()
        {
            string createTableString = string.Format("CREATE Table {0} (" +
                                                     " ClanSeqID INTEGER NOT NULL, " +
                                                     " ClusterID INTEGER NOT NULL, " +
                                                     //     " RelSeqID INTEGER NOT NULL, " +
                                                     " GroupSeqID INTEGER NOT NULL, " +
                                                     " CFGroupID INTEGER NOT NULL, " +
                                                     " SpaceGroup VARCHAR(30) NOT NULL, " +
                                                     " ASU VARCHAR(50) NOT NULL, " +
                                                     " PDBID CHAR(4) NOT NULL, " +
                                                     " DomainInterfaceID INTEGER NOT NULL);",
                                                     tableName);
            DbCreator dbCreate = new DbCreator();

            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName, true);

            string indexString = string.Format("Create INDEX {0}_Idx1 ON {0} (ClanSeqID, PdbID, DomainInterfaceID);",
                                               tableName);

            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, tableName);
        }
コード例 #24
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dataType"></param>
        private void CreateDbTable(string dataType)
        {
            DbCreator dbCreate          = new DbCreator();
            string    createTableString = "";

            createTableString = "CREATE TABLE " + pdbUnpDbTable.TableName + " ( " +
                                " PdbID CHAR(4) NOT NULL, ";
            if (dataType == "ssmap")
            {
                createTableString += "Isoform INTEGER NOT NULL, ";
            }
            createTableString += (" AuthorChain CHAR(3) NOT NULL, " +
                                  " EntityID INTEGER NOT NULL, " +
                                  " DbAccession CHAR(6) NOT NULL, " +
                                  " PdbSequence BLOB Sub_Type Text NOT NULL, " +
                                  " UnpSequence BLOB Sub_Type Text NOT NULL, " +
                                  " AuthorSeqNumbers BLOB Sub_Type Text NOT NULL, " +
                                  " UnpSeqNumbers BLOB Sub_Type Text NOT NULL, " +
                                  " SeqNumbers BLOB Sub_Type Text NOT NULL );");
            dbCreate.CreateTableFromString(createTableString, pdbUnpDbTable.TableName);
            string createIndexString = "CREATE INDEX " + pdbUnpDbTable.TableName + "_idx1 ON " + pdbUnpDbTable.TableName + "(PdbID, AuthorChain);";

            dbCreate.CreateIndex(createIndexString, pdbUnpDbTable.TableName);
        }
コード例 #25
0
ファイル: BuCompTables.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        public static void InitializeDbTables()
        {
            DbCreator dbCreator         = new DbCreator();
            string    tableName         = "";
            string    createTableString = "";
            string    createIndexString = "";

            foreach (string buType in BuCompBuilder.buTypes)
            {
                if (buType == "asu")
                {
                    tableName = buType + "Interfaces";
                }
                else
                {
                    tableName = buType + "BuInterfaces";
                }

                createTableString = "Create Table " + tableName + "( " +
                                    "PdbID CHAR(4) NOT NULL, " +
                                    "BuID VARCHAR(8) NOT NULL, " +
                                    "InterfaceID INTEGER NOT NULL, " +
                                    "AsymChain1 CHAR(3) NOT NULL, " +
                                    "AsymChain2 CHAR(3) NOT NULL, " +
                                    "AuthChain1 CHAR(3) NOT NULL, " +
                                    "AuthChain2 CHAR(3) NOT NULL, " +
                                    "EntityID1 INTEGER NOT NULL, " +
                                    "EntityID2 INTEGER NOT NULL, " +
                                    "SurfaceArea FLOAT NOT NULL, " +
                                    "NumOfCopy INTEGER NOT NULL, " +
                                    "PRIMARY KEY (PdbID, BuID, InterfaceID))";

                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);

                if (buType == "asu")
                {
                    tableName = buType + "SameInterfaces";
                }
                else
                {
                    tableName = buType + "BuSameInterfaces";
                }
                createTableString = "CREATE TABLE " + tableName + "( " +
                                    "PdbID CHAR(4) NOT NULL, " +
                                    "BuID VARCHAR(8) NOT NULL, " +
                                    "InterfaceID INTEGER NOT NULL, " +
                                    "SameInterfaceID INTEGER NOT NULL, " +
                                    "Chain1 CHAR(3) NOT NULL, " +
                                    "SymmetryString1 VARCHAR(50) NOT NULL, " +
                                    "Chain2 CHAR(3) NOT NULL, " +
                                    "SymmetryString2 VARCHAR(50) NOT NULL, " +
                                    "QScore FLOAT NOT NULL);";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
                createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (PdbID, BuID, InterfaceID);", tableName);
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);

                if (buType != "asu")
                {
                    tableName         = buType + "EntryBuInterfaceComp";
                    createTableString = "CREATE TABLE " + tableName + " ( " +
                                        "PdbID CHAR(4) NOT NULL, " +
                                        "BuID1 VARCHAR(8) NOT NULL, " +
                                        "InterfaceID1 INTEGER NOT NULL, " +
                                        "BuID2 VARCHAR(8) NOT NULL, " +
                                        "InterfaceID2 INTEGER NOT NULL, " +
                                        "QScore FLOAT NOT NULL);";
                    dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
                    createIndexString = string.Format("CREATE INDEX {0}BuInterfaceComp_idx1 " +
                                                      " ON {0}EntryBuInterfaceComp (PdbID, BuID1, BuID2);", buType);
                    dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);

                    tableName         = buType + "EntryBuComp";
                    createTableString = "CREATE TABLE " + tableName + " ( " +
                                        "PdbID CHAR(4) NOT NULL, " +
                                        "BUID1 VARCHAR(8) NOT NULL, " +
                                        "BUID2 VARCHAR(8) NOT NULL, " +
                                        "EntityFormat1 VARCHAR(150) NOT NULL, " +
                                        "EntityFormat2 VARCHAR(150) NOT NULL, " +
                                        "NumOfInterfaces1 INTEGER NOT NULL, " +
                                        "NumOfInterfaces2 INTEGER NOT NULL, " +
                                        "SameBUs CHAR(1) NOT NULL);";
                    dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, tableName);
                    createIndexString = string.Format("CREATE INDEX {0}BuComp_Idx1 " +
                                                      " ON {0}EntryBuComp (PdbID, BuID1, BuID2);", buType);
                    dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, tableName);
                }
            }
        }
コード例 #26
0
ファイル: CrystInterfaceTables.cs プロジェクト: ijlab/ProtCID
        public static void  InitializeDbTables()
        {
            string    createTableString = "";
            string    createIndexString = "";
            string    tableName         = "";
            DbCreator dbCreator         = new DbCreator();

            tableName         = "CRYSTENTRYINTERFACES";
            createTableString = "CREATE TABLE CRYSTENTRYINTERFACES ( " +
                                "PDBID                CHAR(4) NOT NULL," +
                                "INTERFACEID          INTEGER NOT NULL," +
                                "ASYMCHAIN1           CHAR(4) NOT NULL," +
                                "AUTHCHAIN1           CHAR(3) NOT NULL," +
                                "ENTITYID1            INTEGER NOT NULL," +
                                "SYMMETRYSTRING1      VARCHAR(15) NOT NULL," +
                                "FULLSYMMETRYSTRING1  VARCHAR(30) NOT NULL," +
                                "ASYMCHAIN2           CHAR(4) NOT NULL," +
                                "AUTHCHAIN2           CHAR(3) NOT NULL," +
                                "ENTITYID2            INTEGER NOT NULL," +
                                "SYMMETRYSTRING2      VARCHAR(15) NOT NULL," +
                                "FULLSYMMETRYSTRING2  VARCHAR(30) NOT NULL," +
                                "SURFACEAREA          FLOAT DEFAULT -1 NOT NULL" +
                                "SymmetryIndex        FLOAT DEFAULT 0);"; // added on August 16, 2018 whether the interface with same pfam architecture is in symmetry
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = "CREATE INDEX CRYSTENTRYINTERFACES_IDX1 ON CRYSTENTRYINTERFACES (PDBID, INTERFACEID);";
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = "DIFENTRYINTERFACECOMP";
            createTableString = "CREATE TABLE DIFENTRYINTERFACECOMP (" +
                                "PDBID1           CHAR(4) NOT NULL," +
                                "INTERFACEID1     INTEGER NOT NULL," +
                                "PDBID2           CHAR(4) NOT NULL," +
                                "INTERFACEID2     INTEGER NOT NULL," +
                                "QSCORE           FLOAT NOT NULL," +
                                "IDENTITY         FLOAT NOT NULL, " +
                                "ISREVERSED       INTEGER NOT NULL );";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = "CREATE INDEX DIFENTRYINTERFACECOMP_IDX1 ON DIFENTRYINTERFACECOMP (PDBID1, INTERFACEID1);";
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            createIndexString = "CREATE INDEX DIFENTRYINTERFACECOMP_IDX2 ON DIFENTRYINTERFACECOMP (PDBID2, INTERFACEID2);";
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = "ENTRYINTERFACECOMP";
            createTableString = "CREATE TABLE ENTRYINTERFACECOMP (" +
                                "PDBID         CHAR(4) NOT NULL," +
                                "INTERFACEID1  INTEGER NOT NULL," +
                                "INTERFACEID2  INTEGER NOT NULL," +
                                "QSCORE        FLOAT NOT NULL," +
                                "ISREVERSED    INTEGER NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = "CREATE INDEX ENTRYINTERFACECOMP_IDX1 ON ENTRYINTERFACECOMP (PDBID);";
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            /*
             * Not maintain since Pfam30 since November 2016, due to the size of tables
             * */
/*
 *          tableName = "SGINTERFACECONTACTS";
 *          createTableString = "CREATE TABLE SGINTERFACECONTACTS (" +
 *                              "PDBID        CHAR(4) NOT NULL," +
 *                              "INTERFACEID  INTEGER NOT NULL," +
 *                              "RESIDUE1     CHAR(3) NOT NULL," +
 *                              "SEQID1       CHAR(5) NOT NULL," +
 *                              "RESIDUE2     CHAR(3) NOT NULL," +
 *                              "SEQID2       CHAR(5) NOT NULL," +
 *                              "DISTANCE     FLOAT NOT NULL);";
 *          dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
 *          createIndexString = "CREATE INDEX SGINTERFACECONTACTS_IDX1 ON SGINTERFACECONTACTS (PDBID, INTERFACEID);";
 *          dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
 *
 *          tableName = "SGINTERFACERESIDUES";
 *          createTableString = "CREATE TABLE SGINTERFACERESIDUES (" +
 *                              "PDBID        CHAR(4) NOT NULL," +
 *                              "INTERFACEID  INTEGER NOT NULL," +
 *                              "RESIDUE1     CHAR(3) NOT NULL," +
 *                              "SEQID1       CHAR(5) NOT NULL," +
 *                              "RESIDUE2     CHAR(3) NOT NULL," +
 *                              "SEQID2       CHAR(5) NOT NULL," +
 *                              "DISTANCE     FLOAT NOT NULL);";
 *          dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
 *          createIndexString = "CREATE INDEX SGINTERFACERESIDUES_IDX1 ON SGINTERFACERESIDUES (PDBID, INTERFACEID);";
 *          dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);*/
        }
コード例 #27
0
ファイル: PiscesDataTables.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        /// create table structures in the database
        /// </summary>
        public static void InitializeDbTables(DbConnect alignmentDbConnect)
        {
            if (!alignmentDbConnect.IsConnected())
            {
                alignmentDbConnect.ConnectToDatabase();
            }
            DbCreator dbCreator = new DbCreator();

            /*       string createTableString = "CREATE TABLE PsiBlastAlignments ( " +
             *                               "QueryEntry CHAR(4) NOT NULL," +
             *                               "QueryChain CHAR(3) NOT NULL," +
             *                               "QueryAsymChain CHAR(3)," +
             *                               "HitEntry CHAR(4) NOT NULL," +
             *                               "HitChain CHAR(3) NOT NULL," +
             *                               "HitAsymChain CHAR(3)," +
             *                               "QueryLength INTEGER  NOT NULL," +
             *                               "HitLength INTEGER  NOT NULL," +
             *                               "Identity FLOAT NOT NULL," +
             *                               "AlignmentLength INTEGER  NOT NULL," +
             *                               "E_value DOUBLE PRECISION NOT NULL," +
             *                               "QueryStart INTEGER  NOT NULL," +
             *                               "QueryEnd INTEGER  NOT NULL," +
             *                               "HitStart INTEGER  NOT NULL," +
             *                               "HitEnd INTEGER  NOT NULL," +
             *                               "QuerySequence BLOB SUB_TYPE TEXT NOT NULL," +
             *                               "HitSequence BLOB SUB_TYPE TEXT NOT NULL);";
             *     dbCreator.CreateTableFromString(alignmentDbConnect, createTableString, "PsiBlastAlignments");
             *     string createIdxString = "CREATE INDEX PsiblastAlign_queryindex ON PsiBlastAlignments(QueryEntry, QueryChain);";
             *     dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "PsiBlastAlignments");
             *     createIdxString = "CREATE INDEX PsiblastAlign_Hitindex ON PsiBlastAlignments(HitEntry, HitChain);";
             *     dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "PsiBlastAlignments");
             *
             *     createTableString = "CREATE TABLE CeAlignments ( " +
             *                               "QueryEntry CHAR(4) NOT NULL," +
             *                               "QueryChain CHAR(3) NOT NULL," +
             *                               "QueryAsymChain CHAR(3)," +
             *                               "HitEntry CHAR(4) NOT NULL," +
             *                               "HitChain CHAR(3) NOT NULL," +
             *                               "HitAsymChain CHAR(3)," +
             *                               "QueryLength INTEGER  NOT NULL," +
             *                               "HitLength INTEGER  NOT NULL," +
             *                               "Identity FLOAT NOT NULL," +
             *                               "AlignmentLength INTEGER  NOT NULL," +
             *                               "E_value DOUBLE PRECISION NOT NULL," +
             *                               "QueryStart INTEGER  NOT NULL," +
             *                               "QueryEnd INTEGER  NOT NULL," +
             *                               "HitStart INTEGER  NOT NULL," +
             *                               "HitEnd INTEGER  NOT NULL," +
             *                               "QuerySequence BLOB SUB_TYPE TEXT NOT NULL," +
             *                               "HitSequence BLOB SUB_TYPE TEXT NOT NULL);";
             *     dbCreator.CreateTableFromString(alignmentDbConnect, createTableString, "CeAlignments");
             *     createIdxString = "CREATE INDEX CeAlign_queryindex ON CeAlignments(QueryEntry, QueryChain);";
             *     dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "CeAlignments");
             *     createIdxString = "CREATE INDEX CeAlign_Hitindex ON CeAlignments(HitEntry, HitChain);";
             *     dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "CeAlignments");
             */
            string createTableString = "CREATE TABLE RedundantPdbChains ( " +
                                       "PdbID1 CHAR(4) NOT NULL," +
                                       "ChainID1 CHAR(3) NOT NULL," +
                                       "AsymChainID1 CHAR(3)," +
                                       "EntityID1 INTEGER, " +
                                       "PdbID2 CHAR(4) NOT NULL," +
                                       "ChainID2 CHAR(3) NOT NULL, " +
                                       "AsymChainID2 CHAR(3), " +
                                       "EntityID2 INTEGER);";

            dbCreator.CreateTableFromString(alignmentDbConnect, createTableString, "RedundantPdbChains");
            string createIdxString = "CREATE INDEX RedundantPdbChains_indexPdbid1 ON RedundantPdbChains(PdbID1);";

            dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "RedundantPdbChains");
            createIdxString = "CREATE INDEX RedundantPdbChains_indexPdbid2 ON RedundantPdbChains(PdbID2);";
            dbCreator.CreateIndex(alignmentDbConnect, createIdxString, "RedundantPdbChains");
        }
コード例 #28
0
        /// <summary>
        ///
        /// </summary>
        public static void InitializeAllGroupDbTables()
        {
            DbCreator dbCreator         = new DbCreator();
            string    createTableString = "";
            string    createIndexString = "";
            string    tableName         = ProtCidSettings.dataType + "HomoSeqInfo";

            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL, " +
                                "PdbID CHAR(4) NOT NULL, " +
                                "SpaceGroup VARCHAR(30) NOT NULL, " +
                                "ASU BLOB Sub_Type TEXT NOT NULL, " +
                                "Method VARCHAR(100) NOT NULL, " +
                                "Resolution FLOAT NOT NULL, " +
                                "InPfam CHAR NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (GroupSeqID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx2 ON {0} (PdbID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = ProtCidSettings.dataType + "HomoRepEntryAlign";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL," +
                                "PdbID1 CHAR(4) NOT NULL," +
                                "EntityID1 INTEGER NOT NULL," +
                                "PdbID2 CHAR(4) NOT NULL," +
                                "EntityID2 INTEGER NOT NULL," +
                                "Identity FLOAT NOT NULL," +
                                "QueryStart INTEGER NOT NULL," +
                                "QueryEnd INTEGER NOT NULL," +
                                "HitStart INTEGER NOT NULL," +
                                "HitEnd INTEGER NOT NULL," +
                                "QuerySequence BLOB Sub_Type TEXT NOT NULL," +
                                "HitSequence BLOB Sub_Type TEXT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (PdbID1);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx2 ON {0} (PdbID2);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = ProtCidSettings.dataType + "HomoGroupEntryAlign";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL," +
                                "PdbID1 CHAR(4) NOT NULL," +
                                "EntityID1 INTEGER NOT NULL," +
                                "PdbID2 CHAR(4) NOT NULL," +
                                "EntityID2 INTEGER NOT NULL," +
                                "Identity FLOAT NOT NULL," +
                                "QueryStart INTEGER NOT NULL," +
                                "QueryEnd INTEGER NOT NULL," +
                                "HitStart INTEGER NOT NULL," +
                                "HitEnd INTEGER NOT NULL," +
                                "QuerySequence BLOB Sub_Type TEXT NOT NULL," +
                                "HitSequence BLOB Sub_Type TEXT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            string indexName = ProtCidSettings.dataType + "GroupEntryAlign";

            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {1} (PdbID1);", indexName, tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx2 ON {1} (PdbID2);", indexName, tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);

            tableName         = ProtCidSettings.dataType + "Groups";
            createTableString = "CREATE TABLE " + tableName + " ( " +
                                "GroupSeqID INTEGER NOT NULL, " +
                                "EntryPfamArch BLOB Sub_Type TEXT NOT NULL);";
            dbCreator.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, tableName);
            createIndexString = string.Format("CREATE INDEX {0}_idx1 ON {0} (GroupSeqID);", tableName);
            dbCreator.CreateIndex(ProtCidSettings.protcidDbConnection, createIndexString, tableName);
        }
コード例 #29
0
ファイル: BamDbUpdate.cs プロジェクト: DunbrackLab/ProtCID
        /// <summary>
        ///
        /// </summary>
        private void InitializeBamDbTables()
        {
            DbCreator dbCreator         = new DbCreator();
            string    createTableString = "";
            string    createIndexString = "";
            string    tableName         = "pdb_entry";

            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "TITLE                           BLOB sub_type TEXT Not Null, " +
                                "DESCRIPTION                     BLOB sub_type TEXT Not Null, " +
                                "EXPDTA                          VARCHAR(250) Not Null, " +
                                "KEYWORDS                        VARCHAR(250) Not Null, " +
                                "KEYWORDS_TEXT                   BLOB sub_type TEXT Not Null, " +
                                "PDB_ORI_DATE                    Date Not Null, " +
                                "RESOLUTION                      FLOAT);";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);


            tableName         = "pdb_dbref";
            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "REF_ID                          INTEGER Not Null, " +
                                "ENTITY_ID                       INTEGER Not Null, " +
                                "DB_NAME                         VARCHAR(10) Not Null, " +
                                "DB_CODE                         VARCHAR(32) Not Null, " +
                                "DB_ACCESSION                    VARCHAR(32) Not Null);";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID, Entity_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);

            tableName         = "pdb_seq";
            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "ENTITY_ID                       INTEGER Not Null, " +
                                "TYPE                            VARCHAR(64) Not Null, " +
                                "NSTD_MONOMER                    CHAR(1) Not Null, " +
                                "SEQ_CODE                        BLOB sub_type TEXT Not Null, " +
                                "SEQ_CODE_CANONICAL              BLOB sub_type TEXT Not Null);";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID, Entity_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);

            tableName         = "pdb_asym_auth";
            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "ENTITY_ID                       INTEGER Not Null, " +
                                "ASYM_ID                         VARCHAR(3) Not Null, " +
                                "AUTH_ASYM_ID                    VARCHAR(4) Not Null);";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);

            tableName         = "pdb_pfam";
            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "ENTITY_ID                       INTEGER Not Null, " +
                                "MODEL                           VARCHAR(50) Not Null, " +
                                "PFAM_accession                  VARCHAR(10) Not Null, " +
                                "Description                     VARCHAR(1200) Not Null, " +
                                "SEQ_F                           INTEGER Not Null, " +
                                "SEQ_T                           INTEGER Not Null, " +
                                "HMM_F                           INTEGER Not Null, " +
                                "HMM_T                           INTEGER Not Null, " +
                                "SCORE                           FLOAT, " +
                                "E_VALUE                         FLOAT);";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID, Entity_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);

            tableName         = "pdb_protbud";
            createTableString = "Create Table " + tableName + " ( " +
                                "PDB_ID                          CHAR(4) Not Null, " +
                                "NAME                            BLOB sub_type TEXT, " +
                                "PDBBUID                         VARCHAR(10) Not Null, " +
                                "PISABUID                        VARCHAR(10) Not Null, " +
                                "ASU_ENTITY                      BLOB sub_type TEXT Not Null, " +
                                "ASU_ASYMID                      BLOB sub_type TEXT Not Null, " +
                                "ASU_AUTH                        BLOB sub_type TEXT Not Null, " +
                                "ASU_ABC                         BLOB sub_type TEXT Not Null, " +
                                "PDBBU_ENTITY                    BLOB sub_type TEXT Not Null, " +
                                "PDBBU_ASYMID                    BLOB sub_type TEXT Not Null, " +
                                "PDBBU_AUTH                      BLOB sub_type TEXT Not Null, " +
                                "PDBBU_ABC                       BLOB sub_type TEXT Not Null, " +
                                "PISABU_ENTITY                   BLOB sub_type TEXT Not Null, " +
                                "PISABU_ASYMID                   BLOB sub_type TEXT Not Null, " +
                                "PISABU_AUTH                     BLOB sub_type TEXT Not Null, " +
                                "PISABU_ABC                      BLOB sub_type TEXT Not Null, " +
                                "SAMEBUS                         CHAR(9), " +
                                "DNA                             CHAR(3), " +
                                "RNA                             CHAR(3), " +
                                "LIGANDS                         CHAR(3), " +
                                "RESOLUTION                      VARCHAR(32));";
            dbCreator.CreateTableFromString(bamDbConnect, createTableString, tableName);
            createIndexString = "Create Index " + tableName + "_pdb ON " + tableName + "(PDB_ID);";
            dbCreator.CreateIndex(bamDbConnect, createIndexString, tableName);
        }
コード例 #30
0
ファイル: FatcatTables.cs プロジェクト: ijlab/ProtCID
        /// <summary>
        ///
        /// </summary>
        /// <param name="dbConnect"></param>
        /// <param name="dbTableName"></param>
        public static void InitializeDbTable(DbConnect dbConnect, string dbTableName)
        {
            string    createTableString = "";
            string    createIndexString = "";
            DbCreator dbCreator         = new DbCreator();
            string    pfamAlignType     = "";

            if (dbTableName.ToLower().IndexOf("pfam") > -1)
            {
                if (dbTableName.ToLower().IndexOf("pfamweak") > -1)
                {
                    pfamAlignType = "PfamDomainWeak";
                    if (dbTableName.ToLower().IndexOf("rigid") > -1)
                    {
                        pfamAlignType = "PfamDomainWeakRigid";
                    }
                }
                else
                {
                    pfamAlignType = "PfamDomain";
                    if (dbTableName.ToLower().IndexOf("rigid") > -1)
                    {
                        pfamAlignType = "PfamDomainRigid";
                    }
                }
                createTableString = string.Format("CREATE TABLE {0} ( " +
                                                  " QueryEntry CHAR(4) NOT NULL, QueryEntity INTEGER NOT NULL, " +
                                                  " QueryDomainID BIGINT NOT NULL, " +
                                                  " QueryDomainStart INTEGER NOT NULL, QueryLength INTEGER NOT NULL, " +
                                                  " HitEntry CHAR(4) NOT NULL, HitEntity INTEGER NOT NULL, " +
                                                  " HitDOmainID BIGINT NOT NULL, " +
                                                  " HitDomainStart INTEGER NOT NULL, HitLength INTEGER NOT NULL, " +
                                                  " Align_Len INTEGER NOT NULL, Score FLOAT NOT NULL, Gaps INTEGER NOT NULL, " +
                                                  " E_Value DOUBLE PRECISION NOT NULL, Identity FLOAT NOT NULL, Similarity FLOAT NOT NULL, " +
                                                  " AlignmentLength INTEGER NOT NULL, " +
                                                  " QuerySequence BLOB Sub_Type TEXT NOT NULL, HitSequence BLOB Sub_Type TEXT NOT NULL, ",
                                                  dbTableName);
                if (dbTableName.ToLower().IndexOf("weak") < 0)
                {
                    createTableString = createTableString +
                                        " QuerySeqNumbers BLOB Sub_Type TEXT NOT NULL, HitSeqNumbers BLOB Sub_Type TEXT NOT NULL, ";
                }
                createTableString = createTableString +
                                    " QueryStart INTEGER NOT NULL, QueryEnd INTEGER NOT NULL, " +
                                    " HitStart INTEGER NOT NULL, HitEnd INTEGER NOT NULL);";

                dbCreator.CreateTableFromString(dbConnect, createTableString, dbTableName);

                createIndexString = string.Format("CREATE INDEX {0}_Idx1 ON {1} (QueryEntry, QueryEntity);", pfamAlignType, dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);

                createIndexString = string.Format("CREATE INDEX {0}_Idx2 ON {1} (HitEntry, HitEntity);", pfamAlignType, dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);

                createIndexString = string.Format("CREATE INDEX {0}_Idx3 ON {1} (QueryEntry, QueryDomainID);", pfamAlignType, dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);

                createIndexString = string.Format("CREATE INDEX {0}_Idx4 ON {1} (HitEntry, HitDomainID);", pfamAlignType, dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);
            }
            else
            {
                createTableString = string.Format("CREATE TABLE {0} ( " +
                                                  " QueryEntry CHAR(4) NOT NULL, QueryChain CHAR(3) NOT NULL, QueryLength INTEGER NOT NULL, " +
                                                  " HitEntry CHAR(4) NOT NULL, HitChain CHAR(3) NOT NULL, HitLength INTEGER NOT NULL, " +
                                                  " Align_Len INTEGER NOT NULL, Score FLOAT NOT NULL, Gaps INTEGER NOT NULL, " +
                                                  " E_Value DOUBLE PRECISION NOT NULL, Identity FLOAT NOT NULL, Similarity FLOAT NOT NULL, " +
                                                  " AlignmentLength INTEGER NOT NULL, " +
                                                  " QuerySequence BLOB Sub_Type TEXT NOT NULL, HitSequence BLOB Sub_Type TEXT NOT NULL, " +
                                                  " QueryStart INTEGER NOT NULL, QueryEnd INTEGER NOT NULL, " +
                                                  " HitStart INTEGER NOT NULL, HitEnd INTEGER NOT NULL, " +
                                                  " QueryAsymChain CHAR(3), HitAsymChain CHAR(3));",
                                                  dbTableName);

                dbCreator.CreateTableFromString(dbConnect, createTableString, dbTableName);

                createIndexString = string.Format("CREATE INDEX FatcatAlign_Idx1 ON {0} (QueryEntry, QueryChain);", dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);

                createIndexString = string.Format("CREATE INDEX FatcatAlign_Idx2 ON {0} (HitEntry, HitChain);", dbTableName);
                dbCreator.CreateIndex(dbConnect, createIndexString, dbTableName);
            }
        }