def build_profile_variant(variant):
    """Returns a ProfileVariant object

    Args:
        variant (cyvcf2.Variant)

    Returns:
        variant (models.ProfileVariant)
    """

    chrom = variant.CHROM
    if chrom.startswith(('chr', 'CHR', 'Chr')):
        chrom = chrom[3:]

    pos = int(variant.POS)

    variant_id = get_variant_id(variant)

    ref = variant.REF
    alt = variant.ALT[0]

    maf = get_maf(variant)

    profile_variant = ProfileVariant(
        variant_id=variant_id,
        chrom=chrom,
        pos=pos,
        ref=ref,
        alt=alt,
        maf=maf,
        id_column = variant.ID
    )

    return profile_variant
def build_profile_variant ( variant ) : chrom = variant . CHROM if chrom . startswith ( ( 'chr' , 'CHR' , 'Chr' ) ) : chrom = chrom [ 3 : ] pos = int ( variant . POS ) variant_id = get_variant_id ( variant ) ref = variant . REF alt = variant . ALT [ 0 ] maf = get_maf ( variant ) profile_variant = ProfileVariant ( variant_id = variant_id , chrom = chrom , pos = pos , ref = ref , alt = alt , maf = maf , id_column = variant . ID ) return profile_variant
Returns a ProfileVariant object

    Args:
        variant (cyvcf2.Variant)

    Returns:
        variant (models.ProfileVariant)