def _format_variant(self, case_id, gemini_variant, individual_objs,
                        index=0, add_all_info=False):
        chrom = gemini_variant['chrom']
        if chrom.startswith('chr') or chrom.startswith('CHR'):
            chrom = chrom[3:]
        variant_dict = {
            'CHROM':chrom,
            'POS':str(gemini_variant['start']),
            'ID':gemini_variant['rs_ids'],
            'REF':gemini_variant['ref'],
            'ALT':gemini_variant['alt'],
            'QUAL':gemini_variant['qual'],
            'FILTER':gemini_variant['filter']
        }
        variant = Variant(**variant_dict)
        variant.update_variant_id(gemini_variant['variant_id'])
        logger.debug("Creating a variant object of variant {0}".format(
            variant.variant_id))
        variant['index'] = index
        self._add_most_severe_consequence(variant, gemini_variant)
        self._add_impact_severity(variant, gemini_variant)
        variant.start = int(gemini_variant['start'])
        variant.stop = int(gemini_variant['end'])
        if self.variant_type == 'sv':
            variant.sv_type = gemini_variant['sub_type']
            variant.stop = int(gemini_variant['end'])
            self._add_sv_coordinates(variant)
        else:
            self._add_transcripts(variant, gemini_variant)
            self._add_thousand_g(variant, gemini_variant)
            self._add_exac(variant, gemini_variant)
            self._add_gmaf(variant, gemini_variant)
            if gemini_variant['cadd_scaled']:
                variant.cadd_score = gemini_variant['cadd_scaled']
            polyphen = gemini_variant['polyphen_pred']
            if polyphen:
                variant.add_severity('Polyphen', polyphen)
            sift = gemini_variant['sift_pred']
            if sift:
                variant.add_severity('SIFT', sift)
        self._add_hgnc_symbols(variant)
        if self.variant_type == 'snv':
            self._add_genes(variant)
        self._add_consequences(variant)
        if add_all_info:
            self._add_genotypes(variant, gemini_variant, case_id, individual_objs)
            if self.variant_type == 'sv':
                self._add_genes(variant)
        return variant