def parse_orgs(org_file):
    """Parse csv table for organisms selection
    input: csv file with organisms
    return: set of organisms to exclude, set of organisms
    for which we want to select paralogs"""
    to_exlude = set()
    paralogs = set()
    with open(org_file) as lines:
        header = next(lines)
        if header.count(',') == 10:
            sgt_idx = 9
        else:
            sgt_idx = 6
        for line in lines:
            org = line.split(',')[0]
            sgt = line.split(',')[sgt_idx].strip()
            if sgt.lower() != 'yes':
                to_exlude.add(org)
            if header.count(',') == 10:
                if line.split(',')[sgt_idx + 1].strip().lower() == 'yes':
                    if org not in to_exlude:
                        paralogs.add(org)
    return to_exlude, paralogs
