Ejemplo n.º 1
0
 def _for_display(self):
     """processes statistics tables for display"""
     title = self.name if self.name else "Likelihood function statistics"
     result = []
     result += self.get_statistics(with_motif_probs=True, with_titles=True)
     for i, table in enumerate(result):
         if ("motif" in table.title and table.shape[1] == 2
                 and table.shape[0] >=
                 60):  # just sort codon motif probs, then truncate
             table = table.sorted(columns="motif")
             table.set_repr_policy(head=5, tail=5, show_shape=False)
             result[i] = table
     return title, result
Ejemplo n.º 2
0
 def _for_display(self):
     """processes statistics tables for display"""
     title = self._name if self._name else "Likelihood function statistics"
     result = []
     result += self.get_statistics(with_motif_probs=True, with_titles=True)
     for i, table in enumerate(result):
         if ("motif" in table.title and table.shape[1] == 2
                 and table.shape[0] >=
                 60):  # just sort codon motif probs, then truncate
             table = table.sorted(columns="motif")
             data = table.tolist()
             data = data[:5] + [["...", "..."]] + data[-5:]
             table = table.__class__(
                 header=table.header,
                 rows=data,
                 digits=table._digits,
                 title=table.title,
             )
             result[i] = table
     return title, result