def _counts_to_amber(t_vals, n_vals):
    """Converts a line of CollectAllelicCounts into AMBER line.
    """
    t_depth = int(t_vals["REF_COUNT"]) + int(t_vals["ALT_COUNT"])
    n_depth = int(n_vals["REF_COUNT"]) + int(n_vals["ALT_COUNT"])
    if n_depth > 0 and t_depth > 0:
        t_baf = float(t_vals["ALT_COUNT"]) / float(t_depth)
        n_baf = float(n_vals["ALT_COUNT"]) / float(n_depth)
        return [t_vals["CONTIG"], t_vals["POSITION"], t_baf, _normalize_baf(t_baf), t_depth,
                n_baf, _normalize_baf(n_baf), n_depth]
def _counts_to_amber ( t_vals , n_vals ) : t_depth = int ( t_vals [ "REF_COUNT" ] ) + int ( t_vals [ "ALT_COUNT" ] ) n_depth = int ( n_vals [ "REF_COUNT" ] ) + int ( n_vals [ "ALT_COUNT" ] ) if n_depth > 0 and t_depth > 0 : t_baf = float ( t_vals [ "ALT_COUNT" ] ) / float ( t_depth ) n_baf = float ( n_vals [ "ALT_COUNT" ] ) / float ( n_depth ) return [ t_vals [ "CONTIG" ] , t_vals [ "POSITION" ] , t_baf , _normalize_baf ( t_baf ) , t_depth , n_baf , _normalize_baf ( n_baf ) , n_depth ]
Converts a line of CollectAllelicCounts into AMBER line.