from pathlib import Path
from typing import Tuple
from typing import List


def txt_of_ids_to_list(path: Path) -> Tuple[List[str], List[str]]:
    """Reads a .txt file with a slide_id,case_id per row and returns two lists of slide ids and case ids"""
    content_slide: List = []
    content_patient: List = []
    with open(path, "r") as f:
        while line := f.readline().rstrip():
            patient, slide = line.split(',')
            content_slide.append(slide)
            content_patient.append(patient)
    return content_patient, content_slide