<jupyter_start><jupyter_text>Archive permats<jupyter_code>hetmech.hetmat.archive.create_archive_by_globs('hetionet-v1.0-permutations.zip', '.', include_globs=[
    'permutations/*.hetmat/edges/*.sparse.npz',
    'permutations/*.hetmat/nodes/*.tsv',
    'permutations/*.hetmat/metagraph.json'
])<jupyter_output><empty_output><jupyter_text>Archive degree-grouped permutations<jupyter_code>hetmech.hetmat.archive.create_archive_by_globs(
    'degree-grouped-permutations-0.5-len-3.zip', '.', 
    include_globs=['adjusted-path-counts/dwpc-0.5/degree-grouped-permutations/*'])<jupyter_output><empty_output><jupyter_text>Archive DWPC files<jupyter_code>all_paths_1 = hetmat.metagraph.extract_all_metapaths(1)
all_paths_2 = set(hetmat.metagraph.extract_all_metapaths(2)) - set(all_paths_1)
all_paths_3 = set(hetmat.metagraph.extract_all_metapaths(3)) - set(all_paths_2)
for damping in ('0.0', '0.5'):
    paths_1 = []
    paths_2 = []
    paths_3 = []

    for old, new in zip([all_paths_1, all_paths_2, all_paths_3], [paths_1, paths_2, paths_3]):
        for path in old:
            path = pathlib.Path(f'path-counts/dwpc-{damping}/{path}.sparse.npz')
            if path.exists():
                new.append(path)

    hetmech.hetmat.archive.create_archive_by_globs(
        f'dwpc-{damping}-len-1.zip', '.', include_paths=paths_1)

    hetmech.hetmat.archive.create_archive_by_globs(
        f'dwpc-{damping}-len-2.zip', '.', include_paths=paths_2)

    hetmech.hetmat.archive.create_archive_by_globs(
        f'dwpc-{damping}-len-3.zip', '.', include_paths=paths_3)
len(paths_1), len(paths_2), len(paths_3)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15535168195718654, 'fraction_numerical': 0.022629969418960245, 'mean_word_length': 4.680555555555555, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '605850', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 673, 'n_tokens_neox': 646, 'n_words': 59, 'path': 'data/hetionet-v1.0.hetmat/03.generate-archives.ipynb', 'repo_name': 'gwaygenomics/hetmech', 'size': '1635'}