scout/parse/variant/coordinates.py
def get_sub_category(alt_len, ref_len, category, svtype=None):
    """Get the subcategory for a VCF variant

    The sub categories are:
        'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv'

    Args:
        alt_len(int)
        ref_len(int)
        category(str)
        svtype(str)

    Returns:
        subcategory(str)
    """
    subcategory = ''

    if category in ('snv', 'indel', 'cancer'):
        if ref_len == alt_len:
            subcategory = 'snv'
        else:
            subcategory = 'indel'
    elif category == 'sv':
        subcategory = svtype

    return subcategory
def get_sub_category(alt_len, ref_len, category, svtype=None):
    subcategory = ''

    if category in ('snv', 'indel', 'cancer'):
        if ref_len == alt_len:
            subcategory = 'snv'
        else:
            subcategory = 'indel'
    elif category == 'sv':
        subcategory = svtype

    return subcategory
def get_sub_category ( alt_len , ref_len , category , svtype = None ) : subcategory = '' if category in ( 'snv' , 'indel' , 'cancer' ) : if ref_len == alt_len : subcategory = 'snv' else : subcategory = 'indel' elif category == 'sv' : subcategory = svtype return subcategory
Get the subcategory for a VCF variant

    The sub categories are:
        'snv', 'indel', 'del', 'ins', 'dup', 'bnd', 'inv'

    Args:
        alt_len(int)
        ref_len(int)
        category(str)
        svtype(str)

    Returns:
        subcategory(str)
Get the subcategory for a VCF variant