Takes a list of deltas matches (a dictionary) and a string (the expected delta list name), and processes its elements to compose a tuple of integers representing the deltas
(deltas, deltas_name)
| 366 | |
| 367 | |
| 368 | def _compose_deltas(deltas, deltas_name): |
| 369 | """Takes a list of deltas matches (a dictionary) and a string (the expected delta list name), |
| 370 | and processes its elements to compose a tuple of integers representing the deltas""" |
| 371 | if deltas_name not in deltas: |
| 372 | return None |
| 373 | out_deltas = deltas.get(deltas_name) |
| 374 | if out_deltas is not None and out_deltas.strip(): |
| 375 | elems = out_deltas.split(',') |
| 376 | # Convert each element in the list elems to an integer |
| 377 | # after stripping whitespace and create a tuple from these integers. |
| 378 | out_deltas_tuple = tuple(int(x.strip()) for x in elems) |
| 379 | return out_deltas_tuple |
| 380 | |
| 381 | |
| 382 | def _group_for_sample(sample, name, typ): |