IMP  2.1.0
The Integrative Modeling Platform
IMP.em2d.solutions_io.ResultsDB Class Reference

Class for managing the results of the experiments. More...

+ Inheritance diagram for IMP.em2d.solutions_io.ResultsDB:

Public Member Functions

def add_ccc_table
 Add a table to the database for store the values of the cross correlation coefficient between a model and the native configuration.
 
def add_cluster_record
 Add a record to the cluster database. More...
 
def add_clusters_table
 Add a table to store information about the clusters of structures. More...
 
def add_native_record
 Add a record for the native structure to the database see add_record() for the meaning of the parameters.
 
def add_placement_scores_table
 Creates a table to store the values of the placement scores for the models. More...
 
def add_record
 Add a recorde to the database. More...
 
def add_results_table
 Build the table of results. More...
 
def format_ccc_record
 Format for the record to store in the ccc table.
 
def format_placement_record
 both distances and angles are expected to be a list of floats
 
def get_ccc
 Recover the cross-correlation coefficient for a solution. More...
 
def get_individual_placement_statistics
 Recovers from the database the placement scores for a set of solutions, and returns the mean and standard deviation of the placement score for each of the components of the complex being scored. More...
 
def get_left_join_command
 Format a left join SQL command that recovers all fileds from the tables given. More...
 
def get_native_rank
 Get the position of the native configuration. More...
 
def get_native_solution
 Recover data for the native solution. More...
 
def get_nth_largest_cluster
 Recover the the information about the n-th largest cluster. More...
 
def get_placement_fields
 Return the names of the placement score fields in the database.
 
def get_placement_statistics
 Calculate the placement score and its standard deviation for the complexes in a set of solutions. More...
 
def get_solutions
 Get solutions from the database. More...
 
def get_solutions_from_list
 Recover solutions for a specific list of results. More...
 
def get_solutions_results_table
 Recovers solutions. More...
 
def store_cluster_data
 Store the data for the clusters.
 
- Public Member Functions inherited from IMP.em2d.Database.Database2
def add_column
 Add a column to a table column - the name of the column. More...
 
def add_columns
 Add columns to the database. More...
 
def check_if_is_connected
 Checks if the class is connected to the database filename.
 
def close
 Closes the database.
 
def connect
 Connects to the database in filename.
 
def create
 Creates a database by simply connecting to the file.
 
def create_table
 Creates a table. More...
 
def create_view
 creates a view of the given table where the values are selected using the condition values. More...
 
def drop_table
 Delete a table if it exists.
 
def drop_view
 Removes a view from the database.
 
def get_condition_string
 creates a condition applying each value to each field
 
def get_table
 Returns th fields requested from the table.
 
def get_table_column_names
 Get the names of the columns for a given table.
 
def get_table_types
 Gets info about a table and retuns all the types in it.
 
def retrieve_data
 Retrieves data from the database using the sql_command returns the records as a list of tuples.
 
def select_table
 Prompt for tables so the user can choose one.
 
def store_data
 Inserts information in a given table of the database. More...
 
def store_dataV1
 Inserts information in a given table of the database. More...
 
def update_data
 updates the register in the table identified by the condition values for the condition fields
 

Detailed Description

Note
This class is only available in Python.

Definition at line 257 of file solutions_io.py.

Member Function Documentation

def IMP.em2d.solutions_io.ResultsDB.add_cluster_record (   self,
  cluster_id,
  n_elements,
  representative,
  elements,
  solutions_ids 
)

Actually, only stores it in a list (that will be added later)

Parameters
cluster_idNumber with the id of the cluster
n_elementsNumber of elements in the cluster
representativeNumber with the id of the representative element
elementsList with the number of the elements of the cluster
solutions_idsThe numbers above are provided by the clustering algorithm. The solutions_ids are the ids of the models in "elements".

Definition at line 542 of file solutions_io.py.

def IMP.em2d.solutions_io.ResultsDB.add_clusters_table (   self,
  name 
)
Parameters
nameName of the table

Definition at line 529 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.add_placement_scores_table (   self,
  names 
)
Parameters
namesNames of the components of the assembly

Definition at line 421 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.add_record (   self,
  solution_id,
  assignment,
  RFs,
  total_score,
  restraints_scores,
  measures 
)
Parameters
solution_idThe key for the solution
assignmentThe assigment for the solution provided by domino
RFsReference frames of the rigid bodies of the components of the assembly in the solution
total_scoreTotal value of the scoring function
restraints_scoresA list with all the values for the restraints
measuresA list with the values of all the measures for benchmark

Definition at line 377 of file solutions_io.py.

def IMP.em2d.solutions_io.ResultsDB.add_results_table (   self,
  restraints_names,
  add_measures = False 
)
Parameters
restraints_namesThe names given to the columns of the table
add_measuresIf True, add fields for comparing models and native conformation

Definition at line 277 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_ccc (   self,
  solution_id 
)
Parameters
solution_id

Definition at line 474 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_individual_placement_statistics (   self,
  solutions_ids 
)

This function will be typical used to compute the variation of the placement of each component within a cluster of solutions

Parameters
solutions_idsThe ids of the solutions used to compute the statistics
Returns
The output are 4 numpy vectors: placement_distances_mean - The mean placement distance for each component placement_distances_stddev - The standardd deviation of the placement distance for each component placement_angles_mean - The mean placement angle for each component placement_angles_stddev - The standard deviation of the placement angle for each component,

Definition at line 615 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_left_join_command (   self,
  pairs_table_field,
  tables_names 
)
Parameters
pairs_table_fieldPairs of (table,field)
tables_namesNames of the tables

E.g. If pairs_table_filed = ((table1,a), (table2,b), (table3,c), (table2,d)) and tables_names = (table1, table2, table3)

The SQL command is: SELECT table1.a, table2.b, table3.c, table2.d FROM table1 LEFT JOIN table2 ON table1.solution_id = table2.solution_id LEFT JOIN table3 ON table1.solution_id = table3.solution_id WHERE table1.solution_id IS NOT NULL AND table2.solution_id IS NOT NULL AND table3.solution_id IS NOT NULL

Definition at line 492 of file solutions_io.py.

def IMP.em2d.solutions_io.ResultsDB.get_native_rank (   self,
  orderby 
)
Parameters
orderbyCriterium used to sort the solutions

Definition at line 582 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_native_solution (   self,
  fields = False 
)
Parameters
fieldsFields to recover

Definition at line 364 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_nth_largest_cluster (   self,
  position,
  table_name = 'clusters' 
)
Parameters
positionCluster position (by size) requested (1 is the largest cluster)
table_nameTable where the information about the clusters is stored

Definition at line 597 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_placement_statistics (   self,
  solutions_ids 
)

The values returned are averages, as the placement score for a complex is the average of the placement scores of the components. This function is used to obtain global placement for a cluster of solutions.

Parameters
solutions_idsThe ids of the solutions used to compute the statistics
Returns
The output are 4 values: plcd_mean - Average of the placement distance for the entire complex over all the solutions. plcd_std - Standard deviation of the placement distance for the entire complex over all the solutions. plca_mean - Average of the placement angle for the entire complex over all the solutions. plca_std - Standard deviation of the placement angle for the entire complex over all the solutions.

Definition at line 654 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_solutions (   self,
  fields = False,
  max_number = None,
  orderby = False 
)
Parameters
fieldsFields requested. If the fields are in different tables, a left join is done. Otherwise get_solutions_results_table() is called. See get_solutions_results_table() for the meaning of the parameters.
max_number
orderby

Definition at line 318 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_solutions_from_list (   self,
  fields = False,
  solutions_ids = [] 
)
Parameters
fieldsFields to recover fro the database
solutions_idsA list with the desired solutions. E.g. [0,3,6]

Definition at line 570 of file solutions_io.py.

+ Here is the call graph for this function:

def IMP.em2d.solutions_io.ResultsDB.get_solutions_results_table (   self,
  fields = False,
  max_number = None,
  orderby = False 
)
Parameters
fieldsFields to recover from the table
max_numberMaximum number of solutions to recover
orderbyName of the restraint used for sorting the states

Definition at line 298 of file solutions_io.py.

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: