def format_histograms(raw_hist, pre_hist, post_hist, bin_edges):
 lines = []
 lines.append('# bins raw sequence lengths, length of sequences that pass quality filters before processing, and lengths of sequences that pass quality filters post processing.')
 lines.append('Length DCTB Raw DCTB Before DCTB After')
 for (edge, raw, pre, post) in zip(bin_edges, raw_hist, pre_hist, post_hist):
  lines.append(' DCTB '.join(map(str, [edge, raw, pre, post])))
 return '\n'.join(lines)

def format_histograms ( raw_hist , pre_hist , post_hist , bin_edges ) : lines = [ ] lines . append ( '# bins raw sequence lengths, length of sequences that pass quality filters before processing, and lengths of sequences that pass quality filters post processing.' ) lines . append ( 'Length DCTB Raw DCTB Before DCTB After' ) for ( edge , raw , pre , post ) in zip ( bin_edges , raw_hist , pre_hist , post_hist ) : lines . append ( ' DCTB ' . join ( map ( str , [ edge , raw , pre , post ] ) ) ) return '\n' . join ( lines )
returns text-formatted histogram .