def consensus2block(record, level=0, name=None):
    """Convert a Biopython SeqRecord to a esbglib.cma block.

    Ungapping is handled here.
    """
    cons_ungap = str(record.seq).replace('-', '').replace('.', '').upper()
    record.seq = cons_ungap
    return dict(
            level=level, #record.annotations.get('level', 0),
            one=1,
            name=name or record.id,
            params='go=10000,gx=2000,pn=1000.0,lf=0,rf=0',
            query_length=len(cons_ungap),
            query_chars='*'*len(cons_ungap),
            sequences=[seqrecord2sequence(record, len(cons_ungap), 1)]
            )