def seqlib_type(cfg):
    """
    Get the type of :py:class:`~enrich2.seqlib.SeqLib` derived object 
    specified by the configuration object.

    Args:
        cfg (dict): decoded JSON object

    Returns:
        str: The class name of the :py:class:`~seqlib.seqlib.SeqLib` derived 
        object specified by `cfg`.

    Raises:
        ValueError: If the class name cannot be determined.

    """
    if "barcodes" in cfg:
        if "map file" in cfg["barcodes"]:
            if "variants" in cfg and "identifiers" in cfg:
                raise ValueError("Unable to determine SeqLib type.")
            elif "variants" in cfg:
                return "BcvSeqLib"
            elif "identifiers" in cfg:
                return "BcidSeqLib"
            else:
                raise ValueError("Unable to determine SeqLib type.")
        else:
            return "BarcodeSeqLib"
    elif "overlap" in cfg and "variants" in cfg:
        return "OverlapSeqLib"
    elif "variants" in cfg:
        return "BasicSeqLib"
    elif "identifiers" in cfg:
        return "IdOnlySeqLib"
    else:
        raise ValueError("Unable to determine SeqLib type for configuration " "object.")