Пример #1
0
def GlobalAnalysisGPCR (pr_data, pr_result, dist_thresold = 5.0, chemical_search = 0, option_stat = 0, option_model = 0):

    # search chemical substructures in docked ligand
    if chemical_search == 1 : 
        SearchChemicalSubstruct(pr_data, pr_result, control = 1)
    # build structure
    struct_neighbor = SearchNeighbor (pr_data, pr_result, dist_thresold = dist_thresold, debug = 1)
    
    for drug in struct_neighbor.keys () : 
        pr_drug = pathManage.CreatePathDir(pr_result + str(drug) + "/")
        if option_stat == 1: 
            # statistic -> same statistic as global database 
            statistic.globalRunStatistic(struct_neighbor[drug], dist_thresold, pr_drug)
        
        if option_model == 1 :
            SabilizationBySB(struct_neighbor[drug], pr_drug)
Пример #2
0
def main (name_database, max_distance = 5.0, RX = 3.00, RFree = 0.25, option_superimpose = 0, option_on_complexes_by_ligand = 0, option_bond = 0, option_stat = 0, option_stat_dataset = 0, option_merge = 0, verbose = 1):
    
    
    #format input
    max_distance = float (max_distance)
     
    # run one database
    pr_result = pathManage.result (name_database)
    
    # search ligand in PDB
    searchPDB.ligands(name_database, pr_result)
    
    # dataset with resolution
    l_p_dataset = datasetFinal.Builder(name_database, RX, RFree, option_on_complexes_by_ligand)
    
#     ########################
#     #   Parsing dataset   #
#     ########################
# # 
    if option_stat_dataset == 1 : 
        for p_dataset in l_p_dataset : 
            statistic.ParseDataSet(p_dataset)
        
     
#     ####################
#     # result directory #
#     ####################
#     
#
    # run for every dataset -> with diffrent resolution
    # short cut
#     l_p_dataset = ["/home/borrel/saltBridgesProject/result/PDB/3.0_0.25_uniquePDB/dataset_3.00.txt" ]
# # #     
    for p_dataset in l_p_dataset : 
        
        pr_result = pathManage.CreatePathDir(p_dataset[:-4] + "/")
        pr_hetion = pathManage.CreatePathDir(p_dataset[:-4] + "/HET/")
        
        if verbose == 1 :  
            print "== control path Main =="
            print pr_result
            print pr_hetion
            print "======================="
        
        
#         # stat -> build structure, not filter is !!!
        d_sub_neighbor = searchPDB.globalSearch(max_distance, p_dataset, pr_result)
    
        # remove iron close -> statistic before 
        # Becarful because the dictionnary change
        print "control-1", len(d_sub_neighbor["I"])
        d_close_het = hetCloseAnalysis.removeNeighborIron (d_sub_neighbor, pr_hetion + "ionSummarySubstruct.txt")
        print "control-2", len(d_sub_neighbor["I"])
        
        if option_superimpose == 1 : 
            # superimpose neighbors -> refaire a Helsinki car MAJ de de la PDB
            superimpose.globalNeighbor (d_sub_neighbor, "I", pr_result)
            superimpose.globalNeighbor (d_sub_neighbor, "II", pr_result)
            superimpose.globalNeighbor (d_sub_neighbor, "III", pr_result)
            superimpose.globalNeighbor (d_sub_neighbor, "IMD", pr_result)
            superimpose.globalNeighbor (d_sub_neighbor, "GAI", pr_result)
            superimpose.globalNeighbor (d_sub_neighbor, "COO", pr_result)
            
            # superimpose neighbors -> with het first stabilization 
#             superimpose.globalNeighbor (d_close_het, "I", pr_hetion)
#             superimpose.globalNeighbor (d_close_het, "II", pr_hetion)
#             superimpose.globalNeighbor (d_close_het, "III", pr_hetion)
#             superimpose.globalNeighbor (d_close_het, "IMD", pr_hetion)
#             superimpose.globalNeighbor (d_close_het, "GAI", pr_hetion)
        
        if option_bond == 1 : 
        
            # check planarity imidazole + guanidium
            statistic.planarityImidazole (d_sub_neighbor, pr_result)
            statistic.planarityGuanidium (d_sub_neighbor, pr_result)
            
            statistic.lenBondAnalysis(d_sub_neighbor, "I", pr_result)
            statistic.lenBondAnalysis(d_sub_neighbor, "II", pr_result)
            statistic.lenBondAnalysis(d_sub_neighbor, "III", pr_result)
            
        if option_stat == 1: 
            # statistic
            statistic.globalRunStatistic(d_sub_neighbor, max_distance, pr_result)
#             statistic.globalRunStatistic(d_close_het, max_distance, pr_hetion)

    if option_merge == 1: 
        if option_on_complexes_by_ligand == 1: 
            statistic.MergeDataSet(pathManage.result (name_database + "/" + str (RX) + "_" + str (RFree) + "_uniquePDB"), "dataset_1.50", "dataset_3.00")
            statistic.MergeDataSet(pathManage.result (name_database + "/" + str (RX) + "_" + str (RFree) + "_uniquePDB"), "dataset_1.50", "dataset_3.00", arom = 1)
        
        else : 
            statistic.MergeDataSet(pathManage.result (name_database + "/" + str (RX) + "_" + str (RFree)), "dataset_1.50", "dataset_3.00")