コード例 #1
0
    def select_all_score_blast_p_all_attributes(self):
        """
        return all the blast scores in the database

        :return: cursor with all scores blast
        :rtype Cursor list
        """
        sql_string = "SELECT id_blast_FSB_P, pident_FSB_P, length_FSB_P, mismatch_FSB_P, gapopen_FSB_P, pstart_FSB_P, pend_FSB_P, bstart_FSB_P, bend_FSB_P, evalue_FSB_P, bitscore_FSB_P, plen_FSB_P, blen_FSB_P, FK_id_PPI_couple_PCP_FSB_P FROM F_SCORE_BLAST_P"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #2
0
    def select_dataset_conf_ds(self):
        """
        return all the connections dataset_conf_dataset

        :return: cursor with all sources dataset_conf_dataset
        :rtype Cursor list
        """
        sql_string = "SELECT id_ds_conf_ds_DCD, value_config_DCD, FK_id_configuration_DCT_DCD, FK_id_dataset_DS_DCD FROM DATASET_CONF_DS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #3
0
    def select_all_prodom_all_attributes(self):
        """
        return all the PROT_DOM in the database

        :return: cursor with all domains
        :rtype Cursor list
        """
        sql_string = "SELECT id_prot_dom_DP, FK_id_protein_PT_DP, FK_id_domain_DO_DP FROM PROT_DOM"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #4
0
    def select_all_domain_interaction_by_pfam(self, pfam_designation):
        """
        return all the DDI interactions in the DOMINE database given a pfam

        :return: cursor with all DDI
        :rtype Cursor list
        """
        sql_string = "select DISTINCT Domain1, Domain2, iPfam, 3did, ME, RCDP, Pvalue, Fusion, DPEA, PE, GPE, DIPD, RDFF, KGIDDI, INSITE, DomainGA, PP, PredictionConfidence, SameGO from INTERACTION Where Domain1 LIKE '" + str(pfam_designation) + "%' or Domain2 LIKE '" + str(pfam_designation) + "%'"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #5
0
    def select_all_LT_all_attributes(self):
        """
        return all the lysis type in the database

        :return: cursor with all lysis type
        :rtype Cursor list
        """
        sql_strin = "SELECT * FROM LYSIS_TYPE"
        dalObj = DAL(self.da_name, sql_strin)
        results = dalObj.executeSelect()
        return results
コード例 #6
0
    def select_all_cogs_all_attributes(self):
        """
        return all the cogs in the database

        :return: cursor with all cogs
        :rtype Cursor list
        """
        sql_string = "SELECT * FROM COGS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #7
0
    def get_all_interactions(self):
        """
        return all the interactions as in INTERACTION table in DOMINE database

        :return: cursor with all domains
        :rtype Cursor list
        """
        sql_string = "select Domain1, Domain2, iPfam, 3did, ME, RCDP, Pvalue, Fusion, DPEA, PE, GPE, DIPD, RDFF, KGIDDI, INSITE, DomainGA, PP, PredictionConfidence, SameGO from INTERACTION"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #8
0
ファイル: PFAM_SQL.py プロジェクト: diogom1790/inphinity
    def get_all_domains(self):
        """
        return all the domains in the database DOMINE. Return only the id (PFXXXXX)

        :return: cursor with all domains
        :rtype Cursor list
        """
        sql_string = "select DomainAcc from PFAM"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #9
0
    def select_all_domains_ds_all_attributes(self):
        """
        return all the Domains_ds configurations in the database

        :return: cursor with all domains_ds
        :rtype Cursor list
        """
        sql_string = "SELECT id_domains_ds_DD, range_DD, auto_split_DD, nomralization_data_DD, FK_id_configuration_CF_DD, FK_id_user_US_DD FROM DOMAINS_DS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #10
0
    def select_all_ddi_interactions_by_db(self, Fk_id_DB):
        """
        return all the DDI in the database by an DB FK

        :return: cursor with all DDI
        :rtype Cursor list
        """
        sql_string = "select id_DDI_inter_DD, FK_domain_a_DD, FK_domain_b_DD from DDI_INTERACTIONS, DDI_INTERACTIONS_DB Where id_DDI_inter_DD = FK_id_interaction_DD_DDB and FK_id_db_interaction_DDB = " + str(Fk_id_DB)
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #11
0
    def select_all_Datasets_conf_type(self):
        """
        return all the connections dataset configurations types

        :return: cursor with all types of configurations
        :rtype Cursor list
        """
        sql_string = "SELECT id_configuration_DCT, designation_DCT FROM DATASET_CONFIGURATIONS_TYPES"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #12
0
    def select_all_ddi_interactions(self):
        """
        return all the DDI in the database

        :return: cursor with all DDI
        :rtype Cursor list
        """
        sql_string = "SELECT id_DDI_inter_DD, FK_domain_a_DD, FK_domain_b_DD FROM DDI_INTERACTIONS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #13
0
    def select_all_pfam_interactions_by_pfam(self, pfam_designation):
        """
        return all the pfam interactions in the PFAM database given a pfam

        :return: cursor with all pfam interactions
        :rtype Cursor list
        """
        sql_string = "select DISTINCT * from pfamA_interactions Where pfamA_acc_A = '" + str(pfam_designation) + "' or pfamA_acc_B = '" + str(pfam_designation) + "'"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #14
0
    def select_all_pfam_interactions(self):
        """
        return all the pfam interactions in the database PFAM

        :return: cursor with all pfam interactions
        :rtype Cursor list
        """
        sql_string = "SELECT * FROM pfamA_interactions"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #15
0
    def get_all_pfam_acc(self):
        """
        return all the pfam in the database PFAM. Return only tha ACC

        :return: cursor with all pfam interactions
        :rtype Cursor list
        """
        sql_string = "SELECT DISTINCT pfamA_acc FROM pfamA"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #16
0
    def select_all_typesOr_all_attributes(self):
        """
        return all the Type_organism in the database

        :return: cursor with all Type_organism
        :rtype Cursor list
        """
        sql_string = "SELECT * FROM TYPE_ORGANISM"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #17
0
    def select_all_datasets_all_attributes(self):
        """
        return all the Datasets in the database

        :return: cursor with all datasets
        :rtype Cursor list
        """
        sql_string = "SELECT id_dataset_DS, date_time_creation_DS, name_DS, FK_id_user_US_DS FROM DATASETS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #18
0
    def select_all_cogprot_all_attributes(self):
        """
        return all the COGS_PROT in the database

        :return: cursor with all COGS_prots
        :rtype Cursor list
        """
        sql_string = "SELECT id_cog_prot_CP, FK_id_cog_CO_CP, FK_id_protein_PT_CP FROM COGS_PROT"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #19
0
    def select_all_bloc_score_domain(self):
        """
        return all the domains score bloc in the database

        :return: cursor with all domains score bloc
        :rtype Cursor list
        """

        sql_string = "SELECT score_dom_bloc_id_FSD, designation_FSD, date_creation_FSD FROM F_SCORE_DOMAINS_BLOC"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #20
0
    def get_all_score_domain_by_bloc_fk_id(self, fk_bloc_id):
        """
        return all the Score_domain in the database

        :return: cursor with all score_domain
        :rtype Cursor list
        """
        sql_string = "SELECT score_dom_id_SD, score_ddi_SD, FK_score_dom_bloc_FSD_SD, FK_prot_dom_bact_DP_SD, FK_prot_dom_phage_DP_SD, FK_couple_CP_SD FROM SCORE_DOMAIN WHERE FK_score_dom_bloc_FSD_SD = " + str(fk_bloc_id)

        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #21
0
    def select_all_wholeDNAs_all_attributes(self):
        """
        Consult the DB and return a list with all WHOLE_DNA objects with all details

        :return: cursor with all WHOLE_DNA
        :rtype Cursor list
        """

        sql_string = "SELECT * FROM WHOLE_DNA"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #22
0
    def get_whole_dna_by_id(self, id_whole_dna):
        """
        Get a Whole_DNA by its id

        :return: Whole_DNA elements info
        :rtype List(infos Whole_DNA)
        """
        sql_string = "SELECT id_dna_WD, head_WD, head_id_WD, sequence_WD FROM WHOLE_DNA WHERE id_dna_WD = " + str(id_whole_dna)
        dalobj = DAL(self.db_name, sql_string)
        results = dalobj.executeSelect()

        return results[0]
コード例 #23
0
    def select_all_interaction_type_all_attributes(self):
        """
        return all the interactions type in the database

        :return: cursor with all Interactions Types
        :rtype Cursor list
        """

        sql_string = "SELECT id_type_inter_IT, designation_IT FROM INTERACTIONS_TYPES"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #24
0
    def get_family_by_id(self, id_genus):
        """
        Get a family by its id

        :return: Family elements info
        :rtype List(infos family)
        """
        sql_string = "SELECT id_family_FA, designation_FA FROM FAMILIES WHERE id_family_FA = " + str(id_genus)
        dalobj = DAL(self.db_name, sql_string)
        results = dalobj.executeSelect()

        return results[0]
コード例 #25
0
    def select_all_contigs_all_attributesby_fk_whole_dna(self, fk_whole_dna):
        """
        Consult the DB and return a list with contigs which have a FK_whole_DNA

        :return: cursor with the contigs
        :rtype Cursor list
        """
        sql_string = "SELECT id_contig_CT, id_contig_db_outside_CT, head_CT, sequence_CT, FK_id_whole_genome_WD_CT FROM CONTIGS WHERE FK_id_whole_genome_WD_CT = " + str(
            fk_whole_dna)
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #26
0
    def select_all_proteins_all_attributes(self):
        """
        return all the Proteins in the database

        :return: cursor with all proteins
        :rtype Cursor list
        """

        sql_string = "SELECT id_protein_PT, id_protein_BD_online_PT, designation_PT, sequence_PT, DNA_sequence_PT, start_point_PT, end_point_PT, start_point_cnt_PT, end_point_cnt_PT, FK_id_contig_CT_PT FROM PROTEINS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #27
0
    def select_all_proteins_all_attributes_by_organism_id(self, id_organism):
        """
        Consult the DB and return a list with proteins from an organism id

        :return: cursor with the proteins
        :rtype Cursor list
        """
        sql_string = "SELECT id_protein_PT, id_protein_BD_online_PT, designation_PT, sequence_PT, DNA_sequence_PT, start_point_PT, end_point_PT, start_point_cnt_PT, end_point_cnt_PT, FK_id_contig_CT_PT FROM PROTEINS, GENES WHERE id_protein_PT = FK_id_protein_PT_GE and FK_id_organism_OR_GE = " + str(
            id_organism)
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #28
0
    def select_all_proteins_all_attributes_by_fk_contig(self, fk_contig):
        """
        Consult the DB and return a list with proteins which have a fk_contig

        :return: cursor with the proteins
        :rtype Cursor list
        """
        sql_string = "SELECT id_protein_PT, id_protein_BD_online_PT, designation_PT, sequence_PT, DNA_sequence_PT, start_point_PT, end_point_PT, start_point_cnt_PT, end_point_cnt_PT, FK_id_contig_CT_PT FROM PROTEINS WHERE FK_id_contig_CT_PT = " + str(
            fk_contig)
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #29
0
    def select_all_couples_all_attributes(self):
        """
        return all the Couples in the database

        :return: cursor with all couples
        :rtype Cursor list
        """
        sql_string = "SELECT id_couple_CP, interaction_CP, FK_id_organism_bact_OR_CP, FK_id_organism_phage_OR_CP, FK_id_type_inter_IT_CP, FK_id_level_LI_CP, FK_id_lysis_LT_CP, FK_source_couple_SD_CP FROM COUPLES"

        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results
コード例 #30
0
    def select_all_level_interactions_all_attributes(self):
        """
        return all the Level interaction in the database

        :return: cursor with all Leve interaction
        :rtype Cursor list
        """

        sql_string = "SELECT id_level_LI, designation_LI FROM LEVEL_INTERACTIONS"
        dalObj = DAL(self.db_name, sql_string)
        results = dalObj.executeSelect()
        return results