<jupyter_start><jupyter_text>Phylogenetics Quickstart Guide<jupyter_code>import phylogenetics as phy
import phylogenetics.tools as tools
import phylopandas as ph
import pandas as pd
# initialize project, create data folder
project = phy.PhylogeneticsProject(project_dir='project1', overwrite=True)

# read in initial seed sequence(s) for BLASTing
project.read_data(path="md2_seed_sequence.txt", schema="fasta")

# Run NCBI blast (default protein, 100 hits, e-value cutoff = 0.01)
project.compute_blast(hitlist_size=100)

# Cluster redundant sequences w/ cdhit
project.compute_clusters()

# Align sequences w/ muscle
project.compute_alignment()

# Curate alignment w/ Gblocks
project.compute_gblocks()

# Compute tree using PhyML
project.compute_tree()

# Reconstruct ancestral proteins using PAML
project.compute_reconstruction()
# View data in phylopandas dataframe object
project.data.head()
# Visualize tree and ancestors using phylovega

from phylovega import TreeChart

# Construct Vega Specification
chart = TreeChart.from_phylopandas(
    project.data,
    height_scale=300,

    # Node attributes
    node_size=300,
    node_color="#ccc",

    # Leaf attributes
    leaf_labels="id",

    # Edge attributes
    edge_width=2,
    edge_color="#000",
)

chart<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08268933539412673, 'fraction_numerical': 0.01622874806800618, 'mean_word_length': 5.507537688442211, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '63773', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 439, 'n_tokens_neox': 392, 'n_words': 109, 'path': 'examples/quickstart_guide.ipynb', 'repo_name': 'jharman25/phylogenetics', 'size': '1294'}