def delete_variants(adapter, vcf_obj, case_obj, case_id=None):
    """Delete variants for a case in the database
    
    Args:
        adapter(loqusdb.plugins.Adapter)
        vcf_obj(iterable(dict))
        ind_positions(dict)
        case_id(str)
    
    Returns:
        nr_deleted (int): Number of deleted variants
    """
    case_id = case_id or case_obj['case_id']
    nr_deleted = 0
    start_deleting = datetime.now()
    chrom_time = datetime.now()
    current_chrom = None
    new_chrom = None
    
    for variant in vcf_obj:
        formated_variant = build_variant(
            variant=variant,
            case_obj=case_obj,
            case_id=case_id,
        )
        
        if not formated_variant:
            continue
        
        new_chrom = formated_variant.get('chrom')
        adapter.delete_variant(formated_variant)
        nr_deleted += 1
        
        if not current_chrom:
            LOG.info("Start deleting chromosome {}".format(new_chrom))
            current_chrom = new_chrom
            chrom_time = datetime.now()
            continue
        
        if new_chrom != current_chrom:
            LOG.info("Chromosome {0} done".format(current_chrom))
            LOG.info("Time to delete chromosome {0}: {1}".format(
                current_chrom, datetime.now()-chrom_time))
            LOG.info("Start deleting chromosome {0}".format(new_chrom))
            current_chrom = new_chrom


    return nr_deleted