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

Public Member Functions

def get_the_list_with_signed_scores (self, ref_contacts, sorted_contacts_counts_map)
 Returns a list of contact signed scores in the order of decreasing contact score (by magnitude) For instance, L = [100, -75, 50] ;sign is ignored while rearranging. More...
 
def plot_contacts_counts (self, fstring_prefix, sorted_contacts_counts_map, list_contacts_signed_scores, verbose)
 Plots Contact scores (barchart) with contacts placed on x-axis If reference contacts are known, Score is replaced by a signed score when positive score signifies a true contact and negative score signifies a false contact (w.r.t to the reference contacts) More...
 
def get_coverage_score_tuple (self, protein_neighbor_detection_triple_map)
 Takes a map and return number of false, true and missed contacts and the normalized coverage score. More...
 
def compute_and_get_contacts_stats (self, set_of_solutions, ofname, verbose)
 This function computes the stats for a set of solutions - either union of solutions or consensus solutions A function that returns sensitivity, specificity and coverage of solutions w.r.t to the reference contacts ref contacts positives, P = ref \cap possible_contacts missed, M = ref \ P negatives, N = possible_contacts \ P for each solution: More...
 
def plot_and_dump_contact_stats (self, mci_solution_object, fout_prefix, verbose)
 separate solution is given to be able to plot contact counts separately for all solutions, consensus solutions and post-bootstrap solutions More...
 

Detailed Description

A class to analyze the solutions of a connectivity inference problem.

This class performs analysis and plots statistics. Gnuplot is used for plotting.

To use Gnuplot with SAGE , download gnuplotpy-<version>.spkg from http://sagemath.org/packages/optional/ and install.

Here is an example to set the preamble of any gnuplot plot: setting the labels (x-axis, y-axis), the tics (x and y), and name of the output file
opts='[gnuplot_preamble, "set xtics 1"],[gnuplot_term, ps],[gnuplot_out_file, "%s"],[style,points],[xlabel, "Contacts"],[ylabel,"Counts"]'%(of_name)

Plot using the previous preamble:
maxima.plot_list(xlist, ylist,opts)

Member Function Documentation

◆ compute_and_get_contacts_stats()

def compute_and_get_contacts_stats (   self,
  set_of_solutions,
  ofname,
  verbose 
)

This function computes the stats for a set of solutions - either union of solutions or consensus solutions A function that returns sensitivity, specificity and coverage of solutions w.r.t to the reference contacts ref contacts positives, P = ref \cap possible_contacts missed, M = ref \ P negatives, N = possible_contacts \ P for each solution:

tp = ref \cap solution_contacts fp = solution_contacts \ tp for loop ends

TP = union of all tps; FN = P - TP FP = union of all fps; TN = N - FP

sensitivity = TP/P specificity = TN/N = (N-FP)/N coverage = (TP - (FP+FN))/((TP+FN)*1.0)

◆ get_coverage_score_tuple()

def get_coverage_score_tuple (   self,
  protein_neighbor_detection_triple_map 
)

Takes a map and return number of false, true and missed contacts and the normalized coverage score.

◆ get_the_list_with_signed_scores()

def get_the_list_with_signed_scores (   self,
  ref_contacts,
  sorted_contacts_counts_map 
)

Returns a list of contact signed scores in the order of decreasing contact score (by magnitude) For instance, L = [100, -75, 50] ;sign is ignored while rearranging.

◆ plot_and_dump_contact_stats()

def plot_and_dump_contact_stats (   self,
  mci_solution_object,
  fout_prefix,
  verbose 
)

separate solution is given to be able to plot contact counts separately for all solutions, consensus solutions and post-bootstrap solutions

◆ plot_contacts_counts()

def plot_contacts_counts (   self,
  fstring_prefix,
  sorted_contacts_counts_map,
  list_contacts_signed_scores,
  verbose 
)

Plots Contact scores (barchart) with contacts placed on x-axis If reference contacts are known, Score is replaced by a signed score when positive score signifies a true contact and negative score signifies a false contact (w.r.t to the reference contacts)