<jupyter_start><jupyter_text>Part 1: Initialize<jupyter_code>hosts = ['a_tract_21mer', 'ctct_21mer', 'gcgc_21mer', 'g_tract_21mer', 'atat_21mer', 'tgtg_21mer']
group1 = ['a_tract_21mer', 'ctct_21mer', 'gcgc_21mer']
group2 = ['g_tract_21mer', 'atat_21mer', 'tgtg_21mer']
colors = ['b', 'g', 'r', 'c', 'm', 'y']
xticklabels = ['AA', 'CTCT', 'GCGC', 'GG', 'ATAT', 'TGTG']
d_df = dict()
for host in hosts:
    s_agent = shapefourier.ShapeAgent(workfolder, host)
    d_df[host] = s_agent.read_df_an(n_begin, n_end)<jupyter_output>/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/a_tract_21mer/an_folder exists
/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/ctct_21mer/an_folder exists
/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/gcgc_21mer/an_folder exists
/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/g_tract_21mer/an_folder exists
/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/atat_21mer/an_folder exists
/home/yizaochen/codes/dna_rna/length_effect/find_helical_axis/tgtg_21mer/an_folder exists<jupyter_text>Part 3: Read DataFrame of $a_n$<jupyter_code># read
n_begin = 0
n_end = 9
df_an = s_agent.read_df_an(n_begin, n_end)
df_an<jupyter_output><empty_output><jupyter_text>Part : Box Plot<jupyter_code>fig, axes = plt.subplots(ncols=5, nrows=2, figsize=(24,8))

n = 0
for row_id in range(2):
    for col_id in range(5):
        if (row_id == 1) and (col_id == 4):
            ax = axes[row_id, col_id]
            ax.set_axis_off()
            continue
        ax = axes[row_id, col_id]
        key = str(n)
        x = list()
        for host in hosts:
            x.append(d_df[host][key])
        ax.boxplot(x)
        ax.set_xticklabels(xticklabels)
        ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)
        ax.tick_params(axis='x', labelsize=12)
        n += 1
plt.tight_layout()
#plt.savefig("an_boxplot.png", dpi=200)
plt.show()
n = 0
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 1
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 2
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 3
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)b
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 4
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 5
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 6
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 7
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 8
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()
n = 9
key = str(n)
fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(8,4), sharex=True)
x = list()
for host in hosts:
    x.append(d_df[host][key])
ax.boxplot(x)
ax.set_xticklabels(hosts)
ax.set_ylabel(r'$a_{' + f'{n}' + r'}$', fontsize=14)

plt.show()<jupyter_output><empty_output><jupyter_text>Part 4: Histogram<jupyter_code>n = 0
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 1
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 2
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 3
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 4
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 5
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 6
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()
n = 7
key = str(n)

fig, axes = plt.subplots(ncols=2, nrows=1, figsize=(8,4), sharex=True)
colorid = 0
ax = axes[0]
for host in group1:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

ax = axes[1]
for host in group2:
    x = d_df[host][key]
    ax.hist(x, bins=50, alpha=0.5, label=host, color=colors[colorid])
    colorid += 1
ax.legend()

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18892508143322476, 'fraction_numerical': 0.03645702831370584, 'mean_word_length': 4.401217861975643, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '128562', 'license': 'MIT', 'n_tokens_mistral': 3814, 'n_tokens_neox': 3598, 'n_words': 722, 'path': 'notebooks/fourier_sequence_statistics.ipynb', 'repo_name': 'yizaochen/bentDNA', 'size': '7982'}