def get_vaf(mutations):
    """
    Given the list of mutations in the form
        <TRANSCRIPT_1>_X123Y#0.56,<TRANSCRIPT_2>_X456Y#0.91,etc  -> for SNVS

        <5'TRANSCRIPT_1>-<3'TRANSCRIPT_1>_FUSION_Junction:X-Spanning:Y,\
        <5'TRANSCRIPT_2>-<3'TRANSCRIPT_2>_FUSION_Junction:A-Spanning:B,etc  -> for FUSIONS

    return it
    in the form 0.XX for an SNV or 0.0 for a FUSION

    :param str mutations: The mutations covered by the input IAR
    :return: The VAF
    :rtype: float

    >>> get_vaf('ENST1231.1_S123K#0.56')
    0.56
    >>> get_vaf('ENST1231.1_S123K#0.56,ENST1211.1_S143K#0.61')
    0.56
    >>> get_vaf('ENST1231.1_S123K#0.43_K124S#0.61,ENST1211.1_S143K#0.43_K144S#0.61')
    0.43
    >>> get_vaf('ENST1231.1-ENST4564.2_FUSION_Junction:5-Spanning:10')
    0.0
    """
    muts = mutations.split(',')
    vaf = 1.0
    for mutation in muts:
        if 'FUSION' in mutation:
            return 0.0
        mutation = mutation.split('_')[1:]

        for mut in mutation:
            vaf = min(vaf, float(mut.split('#')[1]))
    return vaf