Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
MCI_set_of_contacts Class Reference

Constructor

def __init__ (self, list_contacts)
 init More...
 
def __tuple_to_instance__ (self, ctuple)
 tuple_to_instance More...
 
def __list_to_set_of_MCIcontact_instances__ (self, clist)
 list_to_set_of_MCIcontact_instances More...
 

Emulating a Container

def __iter__ (self)
 iter More...
 
def __len__ (self)
 len More...
 
def __contains__ (self, item)
 contains More...
 
def __add__ (self, contact)
 add More...
 
def __hash__ (self)
 This function enables the object instance to be used as a key. More...
 

Comparing Solutions

def __eq__ (self, other)
 eq More...
 

Printing

def __repr__ (self)
 functions for printing the object instance More...
 
def __str__ (self)
 str More...
 
def pretty_print_one_sol (self, cost, sol_number=None, trees=True)
 xfc: fix this one More...
 
def pretty_print (self, msg)
 pretty_print More...
 

Loading Reference Contacts

def get_contacts_from_file (self, afile)
 This function could, for instance, read reference contacts. More...
 

Accessors / Modifiers

def get_contacts (self)
 get_contacts More...
 
def get_solution_score (self)
 get_solution_score More...
 
def store_solution_score (self, score)
 Score of a solution. More...
 

False Positive Count

def __compute_false_positive_count__ (self, ref_set)
 computing false positive count for a solution More...
 
def __store_false_positive_count__ (self, fpc)
 store_false_positive_count More...
 
def get_false_positive_count (self)
 get_false_positive_count More...
 

Queries

def is_valid_solution (self, oligomers, V=None)
 function that returns true if the solution is valid wrt oligomers A solution is a pair (cost, list of contacts) or a triple (cost, list of contacts, time). More...
 

Cost Management

def __get_cost_edge_size__ (self)
 get_cost_edge_size More...
 
def __get_cost_due_to_weights__ (self)
 get_cost_due_to_weights More...
 
def store_cost_components (self, nb_edges_cost, sum_weights_cost)
 store_cost_components More...
 

Protein Neighborhood

def __fill_up_protein_to_neighbors_map__ (self)
 fill_up_protein_to_neighbors_map More...
 
def get_protein_to_neighbors_map (self)
 get_protein_to_neighbors_map More...
 

Detailed Description

A class to specify a set of contacts.

A class to specify a set of contacts, either from a solution of a Connectivity inference problem, or from a reference set of contacts.
A set of contacts has a canonical representation which is merely the lexico ordering of its contacts.
For a set of contacts from a solution, this class can also store the two more attributes:
** score of a solution – sum over scores of all the contacts in the solution (requires whole solution set)
** false positive count – number of contacts in the solution not matching the reference set.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  list_contacts 
)

init

Member Function Documentation

◆ __add__()

def __add__ (   self,
  contact 
)

add

◆ __compute_false_positive_count__()

def __compute_false_positive_count__ (   self,
  ref_set 
)

computing false positive count for a solution

◆ __contains__()

def __contains__ (   self,
  item 
)

contains

◆ __eq__()

def __eq__ (   self,
  other 
)

eq

◆ __fill_up_protein_to_neighbors_map__()

def __fill_up_protein_to_neighbors_map__ (   self)

fill_up_protein_to_neighbors_map

◆ __get_cost_due_to_weights__()

def __get_cost_due_to_weights__ (   self)

get_cost_due_to_weights

◆ __get_cost_edge_size__()

def __get_cost_edge_size__ (   self)

get_cost_edge_size

◆ __hash__()

def __hash__ (   self)

This function enables the object instance to be used as a key.

◆ __iter__()

def __iter__ (   self)

iter

◆ __len__()

def __len__ (   self)

len

◆ __list_to_set_of_MCIcontact_instances__()

def __list_to_set_of_MCIcontact_instances__ (   self,
  clist 
)

list_to_set_of_MCIcontact_instances

◆ __repr__()

def __repr__ (   self)

functions for printing the object instance

◆ __store_false_positive_count__()

def __store_false_positive_count__ (   self,
  fpc 
)

store_false_positive_count

◆ __str__()

def __str__ (   self)

str

◆ __tuple_to_instance__()

def __tuple_to_instance__ (   self,
  ctuple 
)

tuple_to_instance

◆ get_contacts()

def get_contacts (   self)

get_contacts

◆ get_contacts_from_file()

def get_contacts_from_file (   self,
  afile 
)

This function could, for instance, read reference contacts.

Note that reference contacts are not always at disposal.

◆ get_false_positive_count()

def get_false_positive_count (   self)

get_false_positive_count

◆ get_protein_to_neighbors_map()

def get_protein_to_neighbors_map (   self)

get_protein_to_neighbors_map

◆ get_solution_score()

def get_solution_score (   self)

get_solution_score

◆ is_valid_solution()

def is_valid_solution (   self,
  oligomers,
  V = None 
)

function that returns true if the solution is valid wrt oligomers A solution is a pair (cost, list of contacts) or a triple (cost, list of contacts, time).

A solution is valid if for each oligomer, the subgraph induced by that oligomer over the list of contacts is connected.

◆ pretty_print()

def pretty_print (   self,
  msg 
)

pretty_print

◆ pretty_print_one_sol()

def pretty_print_one_sol (   self,
  cost,
  sol_number = None,
  trees = True 
)

xfc: fix this one

◆ store_cost_components()

def store_cost_components (   self,
  nb_edges_cost,
  sum_weights_cost 
)

store_cost_components

◆ store_solution_score()

def store_solution_score (   self,
  score 
)

Score of a solution.