<jupyter_start><jupyter_text>Load libraries<jupyter_code>from rich import inspect
from socialgene.classes.findmybgc import FindMyBGC<jupyter_output><empty_output><jupyter_text>Initiate a `FindMyBGC` object<jupyter_code>findmybgc_object = FindMyBGC()<jupyter_output><empty_output><jupyter_text>Read a genbank file that represents *only* a single BGC<jupyter_code>findmybgc_object.parse(
    "/Users/chase/Documents/socialgene_data/mibig_gbk_2.0/BGC0001848.gbk"
)<jupyter_output><empty_output><jupyter_text>Run pyhmmer on all input proteins.If `use_neo4j_precalc=True` the Neo4j database will be queried and the HMM annotations for **exact sequence match** proteins will be pulled in, then pyhmmer will be run on the remaining proteins.`cpus=0` is a phmmer setting which means use all available CPUs<jupyter_code>findmybgc_object.annotate_with_pyhmmer(
    hmm_filepath="/Users/chase/Documents/socialgene_test_run/longy/HMM_HASH/socialgene_all_hmms.hmm",
    use_neo4j_precalc=False,
    cpus=0,
)<jupyter_output><empty_output><jupyter_text>Run and parse the result of the Neo4j query to find similar BGCs via protein HMM annotations<jupyter_code>findmybgc_object.query_neo4j()
findmybgc_object.parse_neo4j_results()
findmybgc_object.prioritize_loci_to_display()<jupyter_output><empty_output><jupyter_text>Generate data for clustermap<jupyter_code>findmybgc_object.create_clustermap_uuids()
findmybgc_object.add_cluster()
findmybgc_object.add_groups()
findmybgc_object.add_links()
findmybgc_object.write_clustermap(outpath="my_result_clustermap.json")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08359721342621912, 'fraction_numerical': 0.010766307789740342, 'mean_word_length': 9.89655172413793, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '444007', 'license': 'MIT', 'n_tokens_mistral': 611, 'n_tokens_neox': 585, 'n_words': 97, 'path': 'docs/jupyter/find_my_bgc_example.ipynb', 'repo_name': 'socialgene/socialgene.github.io', 'size': '1579'}