<jupyter_start><jupyter_text>SSSOM Files<jupyter_code>import pandas as pd
from pathlib import Path
from argparse import ArgumentParser

curiemap = {
    'OMIM': 'http://omim.org/entry/',                    
    'OMIMPS': 'http://www.omim.org/phenotypicSeries/', 
    'ORPHA': 'http://www.orpha.net/ORDO/Orphanet_',
    'MONDO': 'http://purl.obolibrary.org/obo/MONDO_'
}

def get_dataframe(tsv):
    try:
        df = pd.read_csv(tsv,sep="\t", comment="#")
        df["source"]=Path(tsv).stem
        return df
    except pd.errors.EmptyDataError:
        print("WARNING! ", tsv, " is empty and has been skipped.")

sssom_tsv_path = "/Users/matentzn/ws/mondo/src/ontology/mappings/ordo-omim.sssom.tsv"
df = get_dataframe(sssom_tsv_path)

sssom_files = {}

for index, row in df.iterrows():
    object_id = row["object_id"]
    prefix = object_id.split(":")[0]
    if prefix not in sssom_files:
        sssom_files[prefix] = []
    sssom_files[prefix].append(row)

for prefix in sssom_files:
    if
    print(prefix)

print(df.head())

ps = "https://omim.org/phenotypicSeriesTitles/all?format=tsv"
mim2gene = "https://omim.org/static/omim/data/mim2gene.txt"
mimTitles = "https://data.omim.org/downloads/Wi95pIjsRfqt4ioi9rEJNQ/mimTitles.txt"
genemap2 = "https://data.omim.org/downloads/Wi95pIjsRfqt4ioi9rEJNQ/genemap2.txt"
morbidmap = "https://data.omim.org/downloads/Wi95pIjsRfqt4ioi9rEJNQ/morbidmap.txt"
import pandas as pd
df_ps = pd.read_csv(ps,sep="\t")
df_ps.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15430861723446893, 'fraction_numerical': 0.011356045424181697, 'mean_word_length': 3.8794788273615635, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '124781', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 645, 'n_tokens_neox': 620, 'n_words': 86, 'path': 'src/scripts/mondo_scratch_notebook.ipynb', 'repo_name': 'shawntanzk/mondo', 'size': '1497'}