<jupyter_start><jupyter_text>Part 1: Initialize s-agent<jupyter_code>host = 'gcgc_21mer'
interval_time = 500
s_agent = StackMeanModeAgent(host, rootfolder, interval_time)<jupyter_output>/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/mean_mode_npy exists
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/0_500/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/250_750/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/500_1000/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/750_1250/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/1000_1500/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/1250_1750/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/1500_2000/pd_dfs exists
Read Dataframe of stacking: df_st
/home/ytcdata/bigtraj_fluctmatch/500ns/gcgc_21mer/bdna+bdna/1750_2250/pd_dfs exists
Read Dataframe of stacking:[...]<jupyter_text>Part 2: Initialize K-Matrix<jupyter_code>kmat_agent = KMat(s_agent)<jupyter_output>Load laplacian_mat from /home/ytcdata/bigtraj_fluctmatch/500ns/atat_21mer/mean_mode_npy/laplacian.npy
Thare are 399 nodes.
Total number of nodes: 399
There are 200 eigenvectors belonging to STRAND1.
There are 199 eigenvectors belonging to STRAND2.
Sum of two strands: 399<jupyter_text>Part 3: Initialize Strand Plot<jupyter_code># For a_tract_21mer, g_tract_21mer
strand_id = 'STRAND2'
ks_agent = KappaStrand(host, strand_id, s_agent, kmat_agent)
m_agent = MeanKappaStrand(host, strand_id, s_agent, kmat_agent)
# For atat_21mer, gcgc_21mer
basetype_i = 'A' # 'A', 'T', 'G', 'C'
m_agent = MeanKappaStrandHetreo(host, basetype_i, s_agent, kmat_agent)<jupyter_output><empty_output><jupyter_text>Part 4: Set $m$ and $n$<jupyter_code>m = 1
n = s_agent.n_node # s_agent.n_node<jupyter_output><empty_output><jupyter_text>Part 5: Observe Min and Max<jupyter_code>minimum, maximum = ks_agent.get_kmin_kmax(m, n)
minimum = 0<jupyter_output>Min: -0.000  Max: 3.246<jupyter_text>Min: -0.283  Max: 5.001<jupyter_code>minimum = 1.0 # 1.0 or 1.5
maximum = 3.246<jupyter_output><empty_output><jupyter_text>Part 6-1: Plot<jupyter_code>figsize = (4, 7.5)
fig, im_k, im_j, axes = m_agent.plot_mean_heatmap(figsize, m, n, minimum, maximum)
#plt.tight_layout()
if host in ['a_tract_21mer', 'g_tract_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{strand_id}_{m}_{n}.png', dpi=200, transparent=False)
elif host in ['atat_21mer', 'gcgc_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{basetype_i}_{m}_{n}.png', dpi=200, transparent=False)
plt.show()<jupyter_output><empty_output><jupyter_text>Part 6-2: Plot(Reverse)<jupyter_code>figsize = (4, 7.5)
fig, im_k, im_j, axes = m_agent.plot_mean_heatmap_reverse(figsize, m, n, minimum, maximum)
#plt.tight_layout()
if host in ['a_tract_21mer', 'g_tract_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{strand_id}_{m}_{n}.png', dpi=200, transparent=False)
elif host in ['atat_21mer', 'gcgc_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{basetype_i}_{m}_{n}.png', dpi=200, transparent=False)
plt.show()<jupyter_output><empty_output><jupyter_text>Part 6-3: Single Plot<jupyter_code>d_dot_criteria = {'a_tract_21mer': {'STRAND1': 2.0, 'STRAND2': 2.0}, 
                  'g_tract_21mer': {'STRAND1': 1.5, 'STRAND2': 1.5},
                  'atat_21mer': 2.2, 'gcgc_21mer': 1.5}
figsize = (1.75, 1.75)
if host in ['a_tract_21mer', 'g_tract_21mer']:
    dot_criteria = d_dot_criteria[host][strand_id]
elif host in ['atat_21mer', 'gcgc_21mer']:
    dot_criteria = d_dot_criteria[host]

fig, im_j, axes = m_agent.plot_mean_heatmap_single(figsize, m, n, minimum, maximum, dot_criteria)
plt.tight_layout()

if host in ['a_tract_21mer', 'g_tract_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{strand_id}_{m}_{n}.svg', dpi=300, transparent=False)
elif host in ['atat_21mer', 'gcgc_21mer']:
    plt.savefig(f'/home/yizaochen/Desktop/drawzone_temp/{host}_{basetype_i}_{m}_{n}.svg', dpi=300, transparent=False)
plt.show()<jupyter_output><empty_output><jupyter_text>Part 7: Color Bar<jupyter_code>figsize = (6, 2)
cb1 = ks_agent.plot_colorbar(figsize, minimum, maximum)
plt.savefig('/home/yizaochen/Desktop/drawzone_temp/colorbar.svg', dpi=300, transparent=False)
plt.show()
CMAP = LinearSegmentedColormap.from_list('mycmap', ['white','red'])
figsize = (0.8, 0.258)
fig = plt.figure(figsize=figsize)
ax1 = fig.add_axes([0.05, 0.80, 0.9, 0.15])
norm = Normalize(vmin=minimum, vmax=maximum)
cmap = cm.get_cmap(CMAP)
cb1 = ColorbarBase(ax1, cmap=cmap, norm=norm, orientation='horizontal')
cb1.ax.tick_params(labelsize=4, length=1, pad=1.0, width=0.4)
cb1.set_ticks([1, 1.5, 2.0, 2.5, 3.0])
cb1.outline.set_linewidth(0.4)
plt.savefig('/home/yizaochen/Desktop/drawzone_temp/colorbar.svg', dpi=300, transparent=True)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14274661508704062, 'fraction_numerical': 0.06034816247582205, 'mean_word_length': 6.943164362519202, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, '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': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '297127', 'license': 'MIT', 'n_tokens_mistral': 2444, 'n_tokens_neox': 2171, 'n_words': 339, 'path': 'notebooks/.ipynb_checkpoints/sum_rigidity_graph_3-checkpoint.ipynb', 'repo_name': 'yizaochen/enmspring', 'size': '5170'}