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

Constructor

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

Emulating a Container

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

Comparing Solutions

 __eq__ (self, other)
 eq

Printing

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

Loading Reference Contacts

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

Accessors / Modifiers

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

False Positive Count

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

Queries

 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).

Cost Management

 __get_cost_edge_size__ (self)
 get_cost_edge_size
 __get_cost_due_to_weights__ (self)
 get_cost_due_to_weights
 store_cost_components (self, nb_edges_cost, sum_weights_cost)
 store_cost_components

Protein Neighborhood

 __fill_up_protein_to_neighbors_map__ (self)
 fill_up_protein_to_neighbors_map
 get_protein_to_neighbors_map (self)
 get_protein_to_neighbors_map

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__()

__init__ ( self,
list_contacts )

init

Member Function Documentation

◆ __add__()

__add__ ( self,
contact )

add

◆ __compute_false_positive_count__()

__compute_false_positive_count__ ( self,
ref_set )

computing false positive count for a solution

◆ __contains__()

__contains__ ( self,
item )

contains

◆ __eq__()

__eq__ ( self,
other )

eq

◆ __fill_up_protein_to_neighbors_map__()

__fill_up_protein_to_neighbors_map__ ( self)

fill_up_protein_to_neighbors_map

◆ __get_cost_due_to_weights__()

__get_cost_due_to_weights__ ( self)

get_cost_due_to_weights

◆ __get_cost_edge_size__()

__get_cost_edge_size__ ( self)

get_cost_edge_size

◆ __hash__()

__hash__ ( self)

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

◆ __iter__()

__iter__ ( self)

iter

◆ __len__()

__len__ ( self)

len

◆ __list_to_set_of_MCIcontact_instances__()

__list_to_set_of_MCIcontact_instances__ ( self,
clist )

list_to_set_of_MCIcontact_instances

◆ __repr__()

__repr__ ( self)

functions for printing the object instance

◆ __store_false_positive_count__()

__store_false_positive_count__ ( self,
fpc )

store_false_positive_count

◆ __str__()

__str__ ( self)

str

◆ __tuple_to_instance__()

__tuple_to_instance__ ( self,
ctuple )

tuple_to_instance

◆ get_contacts()

get_contacts ( self)

get_contacts

◆ get_contacts_from_file()

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()

get_false_positive_count ( self)

get_false_positive_count

◆ get_protein_to_neighbors_map()

get_protein_to_neighbors_map ( self)

get_protein_to_neighbors_map

◆ get_solution_score()

get_solution_score ( self)

get_solution_score

◆ is_valid_solution()

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()

pretty_print ( self,
msg )

pretty_print

◆ pretty_print_one_sol()

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

xfc: fix this one

◆ store_cost_components()

store_cost_components ( self,
nb_edges_cost,
sum_weights_cost )

store_cost_components

◆ store_solution_score()

store_solution_score ( self,
score )

Score of a solution.