def get_vcf_entry(variant_obj, case_id=None):
    """
    Get vcf entry from variant object

    Args:
        variant_obj(dict)
    Returns:
        variant_string(str): string representing variant in vcf format
    """
    if variant_obj["category"] == "snv":
        var_type = "TYPE"
    else:
        var_type = "SVTYPE"

    info_field = ";".join(
        [
            "END=" + str(variant_obj["end"]),
            var_type + "=" + variant_obj["sub_category"].upper(),
        ]
    )

    variant_string = "{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}".format(
        variant_obj["chromosome"],
        variant_obj["position"],
        variant_obj["dbsnp_id"],
        variant_obj["reference"],
        variant_obj["alternative"],
        variant_obj["quality"],
        ";".join(variant_obj["filters"]),
        info_field,
    )

    if case_id:
        variant_string += "\tGT"
        for sample in variant_obj["samples"]:
            variant_string += "\t" + sample["genotype_call"]

    return variant_string