def convert_allele_origins(orig_allele_origins):
    """Splits the original list of allele origins from ClinVar into up to two groups: one for 'somatic' (if present),
    and another one for all other types, which are considered 'germline' (if present)."""
    orig_allele_origins = {item.lower() for item in orig_allele_origins}
    converted_allele_origins = []
    if 'somatic' in orig_allele_origins:
        converted_allele_origins.append(['somatic'])
        orig_allele_origins.remove('somatic')
    if orig_allele_origins:  # Is there something remaining for the second (non-somatic) group?
        converted_allele_origins.append(sorted(orig_allele_origins))
    return converted_allele_origins