import os
import sys
sys.path.append(os.path.abspath("/users/amtseng/tfmodisco/src/"))
from util import figure_to_vdom_image, create_motif_similarity_matrix, aggregate_motifs, aggregate_motifs_from_inds, purine_rich_motif
import plot.viz_sequence as viz_sequence
import numpy as np
import h5py
import matplotlib.pyplot as plt
import vdom.helpers as vdomh
from IPython.display import display
# Define parameters/fetch arguments
in_motif_file = os.environ["TFM_IN_MOTIF_FILE"]
out_motif_file = os.environ["TFM_OUT_MOTIF_FILE"]
print("Input motif file: %s" % in_motif_file)
print("Output motif file: %s" % out_motif_file)
Input motif file: /users/amtseng/tfmodisco/results/motifs/tfmodisco//E2F6_tfmodisco_motifs.h5 Output motif file: /users/amtseng/tfmodisco/results/motifs/tfmodisco//E2F6_tfmodisco_cpmerged_motifs.h5
min_match_sim = 0.9
os.makedirs(os.path.dirname(out_motif_file), exist_ok=True)
def import_motifs_from_hdf5_group(h5_group):
"""
Imports a set of motifs from an open HDF5 group.
The HDF5 group must be structured as follows:
count:
0_0:
cwm_trimmed
...
profile:
0_0:
cwm_trimmed
...
Returns a dictionary of the trimmed CWMs matching the
structure of the group.
Motifs are flipped to the purine-rich version.
"""
motifs = {}
for key in ("count", "profile"):
motifs[key] = {}
for motif_key in h5_group[key]:
cwm = h5_group[key][motif_key]["cwm_trimmed"][:]
motifs[key][motif_key] = purine_rich_motif(cwm)
return motifs
def write_merged_motifs_to_hdf5_group(in_h5_group, out_h5_group, matched_keys):
"""
Writes a set of motifs from an open HDF5 group.
The input HDF5 group must be structured as follows:
count:
0_0:
cwm_trimmed
...
profile:
0_0:
cwm_trimmed
...
The output HDF5 group will be stuctured as follows:
C0_0:P0_1:
cwm_trimmed
...
`matched_keys` is a list of pairs of keys, denoting count
and profile keys that are matched together, respectively.
Motifs are flipped to the purine-rich version.
"""
count_keys = list(in_h5_group["count"].keys())
profile_keys = list(in_h5_group["profile"].keys())
matched_count, matched_profile = (list(zip(*matched_keys))) if matched_keys else ([], [])
unmatched_count = [key for key in count_keys if key not in matched_count]
unmatched_profile = [key for key in profile_keys if key not in matched_profile]
for count_key, profile_key in matched_keys:
group = out_h5_group.create_group("C%s:P%s" % (count_key, profile_key))
# First aggregate the CWMs to get the indices
for length in ("full", "trimmed"):
_, (const_inds, agg_inds) = aggregate_motifs([
purine_rich_motif(in_h5_group["count"][count_key]["cwm_%s" % length][:]),
purine_rich_motif(in_h5_group["profile"][profile_key]["cwm_%s" % length][:])
], return_inds=True)
for motif_prefix in ["pfm", "cwm", "hcwm"]:
motif_type = "%s_%s" % (motif_prefix, length)
agg = aggregate_motifs_from_inds([
purine_rich_motif(in_h5_group["count"][count_key][motif_type][:]),
purine_rich_motif(in_h5_group["profile"][profile_key][motif_type][:])
], const_inds, agg_inds)
group.create_dataset(motif_type, data=agg, compression="gzip")
for count_key in unmatched_count:
group = out_h5_group.create_group("C%s" % count_key)
for motif_type in ["pfm_full", "cwm_full", "hcwm_full", "pfm_trimmed", "cwm_trimmed", "hcwm_trimmed"]:
motif = purine_rich_motif(in_h5_group["count"][count_key][motif_type][:])
group.create_dataset(motif_type, data=motif, compression="gzip")
for profile_key in unmatched_profile:
group = out_h5_group.create_group("P%s" % profile_key)
for motif_type in ["pfm_full", "cwm_full", "hcwm_full", "pfm_trimmed", "cwm_trimmed", "hcwm_trimmed"]:
motif = purine_rich_motif(in_h5_group["profile"][profile_key][motif_type][:])
group.create_dataset(motif_type, data=motif, compression="gzip")
def compute_motif_pairs(motifs_a, motifs_b):
"""
For a list of motifs `motifs_a` and another list of motifs `motifs_b`,
computes the similarity between all pairs and pairs up the closest
motifs between A and B.
This is done greedily, where the two motifs with the biggest similarity
in the matrix are paired up, and then removed from the matrix.
Returns a list of triplets (A_i, B_i, s_i), where A_i and B_i are the
indices of motifs in `motifs_a` and `motifs_b` that have been matched
up, and `s_i` is the similarity between them. The triplets are ordered
by decreasing `s_i`. Note that if the lengths of the lists are not the
same, then some motifs will not be matched up.
"""
num_a, num_b = len(motifs_a), len(motifs_b)
# Compute the similarity matrix
sim_matrix = create_motif_similarity_matrix(motifs_a, motifs_2=motifs_b, show_progress=False)
a_inds, b_inds = np.arange(num_a), np.arange(num_b)
matches = []
for _ in range(min(num_a, num_b)):
a_i, b_i = np.unravel_index(np.argmax(sim_matrix), sim_matrix.shape)
sim = sim_matrix[a_i, b_i]
matches.append((a_inds[a_i], b_inds[b_i], sim))
a_inds = np.delete(a_inds, a_i)
b_inds = np.delete(b_inds, b_i)
sim_matrix = np.delete(np.delete(sim_matrix, a_i, axis=0), b_i, axis=1)
return matches
def plot_matches(count_keys, count_motifs, profile_keys, profile_motifs, matches):
"""
Show matched and leftover motifs.
"""
display(vdomh.h4("Matched motifs"))
colgroup = vdomh.colgroup(
vdomh.col(style={"width": "5"}),
vdomh.col(style={"width": "5"}),
vdomh.col(style={"width": "45%"}),
vdomh.col(style={"width": "45%"}),
)
header = vdomh.thead(
vdomh.tr(
vdomh.th("Merged ID", style={"text-align": "center"}),
vdomh.th("Similarity", style={"text-align": "center"}),
vdomh.th("Aggregate motif", style={"text-align": "center"}),
vdomh.th("Constituent motifs", style={"text-align": "center"})
)
)
rows = []
for count_i, profile_i, sim in matches:
constituents = [count_motifs[count_i], profile_motifs[profile_i]]
consensus = aggregate_motifs([count_motifs[count_i], profile_motifs[profile_i]])
merged_id = "C%s:P%s" % (count_keys[count_i], profile_keys[profile_i])
agg_fig = viz_sequence.plot_weights(consensus, figsize=(20, 4), return_fig=True)
agg_fig.tight_layout()
const_figs = []
for motif in constituents:
fig = viz_sequence.plot_weights(motif, figsize=(20, 4), return_fig=True)
fig.tight_layout()
const_figs.append(figure_to_vdom_image(fig))
rows.append(vdomh.tr(
vdomh.td(merged_id),
vdomh.td("%.4f" % sim),
vdomh.td(figure_to_vdom_image(agg_fig)),
vdomh.td(*const_figs)
))
display(vdomh.table(colgroup, header, vdomh.tbody(*rows)))
plt.close("all")
display(vdomh.h4("Unmatched motifs"))
colgroup = vdomh.colgroup(
vdomh.col(style={"width": "5%"}),
vdomh.col(style={"width": "45%"}),
vdomh.col(style={"width": "5%"}),
vdomh.col(style={"width": "45%"}),
)
header = vdomh.thead(
vdomh.tr(
vdomh.th("Count ID", style={"text-align": "center"}),
vdomh.th("Count motif", style={"text-align": "center"}),
vdomh.th("Profile ID", style={"text-align": "center"}),
vdomh.th("Profile motif", style={"text-align": "center"})
)
)
matched_count = [trip[0] for trip in matches]
unmatched_count = [i for i in range(len(count_motifs)) if i not in matched_count]
matched_profile = [trip[1] for trip in matches]
unmatched_profile = [i for i in range(len(profile_motifs)) if i not in matched_profile]
rows = []
for i in range(max(len(unmatched_count), len(unmatched_profile))):
row = []
if i < len(unmatched_count):
fig = viz_sequence.plot_weights(
count_motifs[unmatched_count[i]], figsize=(20, 4), return_fig=True
)
fig.tight_layout()
row.extend([
vdomh.td("C%s" % count_keys[unmatched_count[i]]),
vdomh.td(figure_to_vdom_image(fig))
])
else:
row.extend([vdomh.td(), vdomh.td()])
if i < len(unmatched_profile):
fig = viz_sequence.plot_weights(
profile_motifs[unmatched_profile[i]], figsize=(20, 4), return_fig=True
)
fig.tight_layout()
row.extend([
vdomh.td("P%s" % profile_keys[unmatched_profile[i]]),
vdomh.td(figure_to_vdom_image(fig))
])
else:
row.extend([vdomh.td(), vdomh.td()])
rows.append(vdomh.tr(*row))
display(vdomh.table(colgroup, header, vdomh.tbody(*rows)))
plt.close("all")
motif_key_sorter = lambda k: (int(k.split("_")[0]), int(k.split("_")[1]))
def consolidate(in_h5_group, out_h5_group):
"""
Performs consolidation, reading motifs from the in group and
writing to the out group.
"""
# Import CWMs
motifs = import_motifs_from_hdf5_group(in_h5_group)
count_keys = sorted(motifs["count"].keys(), key=motif_key_sorter)
profile_keys = sorted(motifs["profile"].keys(), key=motif_key_sorter)
count_motifs = [motifs["count"][k] for k in count_keys]
profile_motifs = [motifs["profile"][k] for k in profile_keys]
matches = compute_motif_pairs(
count_motifs, profile_motifs
)
# Plot distribution of match similarities
fig, ax = plt.subplots(figsize=(10, 4))
ax.hist([trip[2] for trip in matches], bins=10)
ax.set_title("Histogram of match distances")
ax.set_xlabel("Similarity")
plt.show()
# Restrict to matches of sufficient similarity
matches = [match for match in matches if match[2] >= min_match_sim]
# Plot matches themselves
plot_matches(count_keys, count_motifs, profile_keys, profile_motifs, matches)
# Write the consolidated motifs and unconsolidated motifs
matched_keys = [(count_keys[trip[0]], profile_keys[trip[1]]) for trip in matches]
write_merged_motifs_to_hdf5_group(in_h5_group, out_h5_group, matched_keys)
with h5py.File(in_motif_file, "r") as f, h5py.File(out_motif_file, "w") as g:
# Multi-task, all 10 folds
f_mt = f["multitask"]
g_mt = g.create_group("multitask")
for fold in f_mt.keys():
display(vdomh.h3("Multi-task %s" % fold))
f_mt_fold = f_mt[fold]
g_mt_fold = g_mt.create_group(fold)
consolidate(f_mt_fold, g_mt_fold)
f_st = f["singletask"]
g_st = g.create_group("singletask")
# Single-task, all 10 folds for all tasks
for task in f_st.keys():
f_st_task = f_st[task]
g_st_task = g_st.create_group(task)
for fold in f_st_task.keys():
display(vdomh.h3("Single-task %s %s" % (task, fold)))
f_st_task_fold = f_st_task[fold]
g_st_task_fold = g_st_task.create_group(fold)
consolidate(f_st_task_fold, g_st_task_fold)
# Multi-task fine-tuned, all tasks
f_mtft = f["multitask_finetune"]
g_mtft = g.create_group("multitask_finetune")
for task in f_mtft.keys():
display(vdomh.h3("Multi-task fine-tune %s" % task))
f_mtft_task = f_mtft[task]
g_mtft_task = g_mtft.create_group(task)
consolidate(f_mtft_task, g_mtft_task)
# Single-task fine-tuned, all tasks
f_stft = f["singletask_finetune"]
g_stft = g.create_group("singletask_finetune")
for task in f_stft.keys():
display(vdomh.h3("Single-task fine-tune %s" % task))
f_stft_task = f_stft[task]
g_stft_task = g_stft.create_group(task)
consolidate(f_stft_task, g_stft_task)
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9913 | ||
| C0_1:P0_1 | 0.9907 | ||
| C0_3:P0_4 | 0.9677 | ||
| C0_2:P0_5 | 0.9090 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_4 | P0_2 | ||
| C0_5 | P0_3 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9973 | ||
| C0_1:P0_1 | 0.9934 | ||
| C0_3:P0_3 | 0.9662 | ||
| C0_2:P0_6 | 0.9434 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_4 | P0_2 | ||
| C0_5 | P0_4 | ||
| C0_6 | P0_5 | ||
| C0_7 | P0_7 | ||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P0_11 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9908 | ||
| C0_5:P0_6 | 0.9856 | ||
| C0_1:P0_1 | 0.9684 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_2 | ||
| C0_3 | P0_3 | ||
| C0_4 | P0_4 | ||
| P0_5 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P1_0 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9938 | ||
| C0_2:P0_2 | 0.9917 | ||
| C0_3:P0_4 | 0.9850 | ||
| C0_4:P0_3 | 0.9520 | ||
| C0_1:P0_1 | 0.9309 | ||
| C0_5:P0_8 | 0.9250 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_6 | P0_5 | ||
| C0_7 | P0_6 | ||
| C0_8 | P0_7 | ||
| P0_9 | |||
| P0_10 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9972 | ||
| C0_2:P0_3 | 0.9295 | ||
| C0_1:P0_1 | 0.9210 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_2 | ||
| C0_4 | P0_4 | ||
| C0_5 | P0_5 | ||
| P1_0 | |||
| P1_1 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9973 | ||
| C0_1:P0_1 | 0.9835 | ||
| C0_3:P0_3 | 0.9398 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_2 | ||
| C0_4 | P0_4 | ||
| C0_5 | P0_5 | ||
| C0_6 | P0_6 | ||
| P0_7 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_5:P0_4 | 0.9898 | ||
| C0_4:P0_5 | 0.9800 | ||
| C0_1:P0_1 | 0.9790 | ||
| C0_3:P0_11 | 0.9534 | ||
| C0_0:P0_0 | 0.9488 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_2 | ||
| P0_3 | |||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P0_12 | |||
| P0_13 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9728 | ||
| C0_2:P0_5 | 0.9630 | ||
| C0_3:P0_4 | 0.9516 | ||
| C0_1:P0_1 | 0.9029 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_2 | |||
| P0_3 | |||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P1_0 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9912 | ||
| C0_3:P0_3 | 0.9832 | ||
| C0_4:P0_4 | 0.9739 | ||
| C0_6:P0_10 | 0.9698 | ||
| C0_1:P0_1 | 0.9564 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_2 | ||
| C0_5 | P0_5 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_11 | |||
| P0_12 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9971 | ||
| C0_2:P0_2 | 0.9872 | ||
| C0_3:P0_3 | 0.9558 | ||
| C0_1:P0_1 | 0.9306 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_4 | P0_4 | ||
| P0_5 | |||
| P1_0 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_1:P0_1 | 0.9973 | ||
| C0_2:P0_2 | 0.9851 | ||
| C0_0:P0_0 | 0.9843 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_3 | ||
| P0_4 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9883 | ||
| C0_5:P0_9 | 0.9809 | ||
| C0_3:P0_2 | 0.9696 | ||
| C0_1:P0_1 | 0.9421 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_3 | ||
| C0_4 | P0_4 | ||
| C0_6 | P0_5 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_10 | |||
| P0_11 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_3:P0_3 | 0.9928 | ||
| C0_2:P0_2 | 0.9794 | ||
| C0_0:P0_0 | 0.9757 | ||
| C0_4:P0_4 | 0.9740 | ||
| C0_1:P0_1 | 0.9702 | ||
| C0_7:P0_6 | 0.9191 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_5 | P0_5 | ||
| C0_6 | P0_7 | ||
| P0_8 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_1:P0_1 | 0.9913 | ||
| C0_0:P0_0 | 0.9885 | ||
| C0_2:P0_2 | 0.9635 | ||
| C0_3:P0_3 | 0.9631 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_4 | |||
| P0_5 | |||
| P1_0 | |||
| P1_1 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9947 | ||
| C0_1:P0_1 | 0.9942 | ||
| C0_2:P0_2 | 0.9604 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_3 | ||
| C0_4 | P0_4 | ||
| P0_5 | |||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P0_11 | |||
| P0_12 | |||
| P0_13 | |||
| P0_14 | |||
| P0_15 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_1:P0_1 | 0.9943 | ||
| C0_2:P0_2 | 0.9645 | ||
| C0_0:P0_0 | 0.9270 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_3 | |||
| P0_4 | |||
| P0_5 | |||
| P0_6 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_1:P0_1 | 0.9980 | ||
| C0_0:P0_0 | 0.9968 | ||
| C0_2:P0_6 | 0.9400 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_2 | ||
| C0_4 | P0_3 | ||
| C0_5 | P0_4 | ||
| P0_5 | |||
| P0_7 | |||
| P0_8 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9962 | ||
| C0_3:P0_4 | 0.9923 | ||
| C0_1:P0_2 | 0.9914 | ||
| C0_4:P0_3 | 0.9888 | ||
| C0_2:P0_1 | 0.9108 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_5 | P0_5 | ||
| C0_6 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9969 | ||
| C0_1:P0_1 | 0.9947 | ||
| C0_4:P0_4 | 0.9800 | ||
| C0_3:P0_3 | 0.9691 | ||
| C0_2:P0_5 | 0.9347 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_5 | P0_2 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9955 | ||
| C0_1:P0_2 | 0.9841 | ||
| C0_2:P0_1 | 0.9772 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_3 | |||
| P1_0 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9964 | ||
| C0_1:P0_2 | 0.9947 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_1 | ||
| C0_3 | P0_3 | ||
| P0_4 | |||
| P0_5 | |||
| P0_6 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9951 | ||
| C0_1:P0_1 | 0.9922 | ||
| C0_2:P0_2 | 0.9377 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_3 | ||
| P0_4 | |||
| P0_5 | |||
| P0_6 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9903 | ||
| C0_3:P0_1 | 0.9781 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_1 | P0_2 | ||
| C0_2 | P0_3 | ||
| P0_4 | |||
| P0_5 | |||
| P0_6 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9927 | ||
| C0_2:P0_1 | 0.9796 | ||
| C0_1:P0_5 | 0.9714 | ||
| C0_5:P0_3 | 0.9423 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_2 | ||
| C0_4 | P0_4 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9918 | ||
| C0_1:P0_2 | 0.9831 | ||
| C0_3:P0_3 | 0.9708 | ||
| C0_2:P0_1 | 0.9044 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_4 | |||
| P0_5 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_2:P0_1 | 0.9907 | ||
| C0_3:P0_2 | 0.9904 | ||
| C0_1:P0_3 | 0.9792 | ||
| C0_0:P0_0 | 0.9766 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_4 | |||
| P0_5 | |||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_1 | 0.9955 | ||
| C0_2:P0_2 | 0.9942 | ||
| C0_1:P0_4 | 0.9403 | ||
| C0_4:P0_0 | 0.9243 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_3 | P0_3 | ||
| C0_5 | P0_5 | ||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P1_0 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9941 | ||
| C0_3:P0_3 | 0.9895 | ||
| C0_1:P0_1 | 0.9879 | ||
| C0_2:P0_5 | 0.9443 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_4 | P0_2 | ||
| P0_4 | |||
| P0_6 | |||
| P0_7 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9838 | ||
| C0_4:P0_2 | 0.9740 | ||
| C0_3:P0_1 | 0.9551 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_1 | P0_3 | ||
| C0_2 | P0_4 | ||
| C0_5 | P0_5 | ||
| C0_6 | P0_6 | ||
| P0_7 | |||
| P0_8 | |||
| P0_9 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9992 | ||
| C0_2:P0_1 | 0.9899 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_1 | P0_2 | ||
| C0_3 | P0_3 | ||
| C0_4 | P0_4 | ||
| P0_5 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9977 | ||
| C0_2:P0_2 | 0.9945 | ||
| C0_1:P0_1 | 0.9825 | ||
| C0_3:P0_3 | 0.9671 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_4 | P0_4 | ||
| C0_5 | P0_5 | ||
| C0_6 | P0_6 | ||
| P0_7 | |||
| P0_8 | |||
| P0_9 |
/users/amtseng/tfmodisco/src/plot/viz_sequence.py:152: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). fig = plt.figure(figsize=figsize)
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9866 | ||
| C0_3:P0_3 | 0.9764 | ||
| C0_1:P0_1 | 0.9729 | ||
| C0_2:P0_7 | 0.9437 | ||
| C0_6:P0_2 | 0.9433 | ||
| C0_4:P0_5 | 0.9096 | ||
| C0_7:P0_11 | 0.9027 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_5 | P0_4 | ||
| P0_6 | |||
| P0_8 | |||
| P0_9 | |||
| P0_10 | |||
| P0_12 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9928 | ||
| C0_1:P0_1 | 0.9863 | ||
| C0_3:P0_5 | 0.9570 | ||
| C0_2:P0_2 | 0.9499 | ||
| C0_5:P0_8 | 0.9076 | ||
| C0_4:P0_3 | 0.9011 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| P0_4 | |||
| P0_6 | |||
| P0_7 | |||
| P0_9 | |||
| P0_10 | |||
| P0_11 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9872 | ||
| C0_4:P0_9 | 0.9676 | ||
| C0_3:P0_2 | 0.9515 | ||
| C0_1:P0_1 | 0.9165 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_2 | P0_3 | ||
| P0_4 | |||
| P0_5 | |||
| P0_6 | |||
| P0_7 | |||
| P0_8 | |||
| P0_10 | |||
| P0_11 |
| Merged ID | Similarity | Aggregate motif | Constituent motifs |
|---|---|---|---|
| C0_0:P0_0 | 0.9981 | ||
| C0_2:P0_2 | 0.9943 |
| Count ID | Count motif | Profile ID | Profile motif |
|---|---|---|---|
| C0_1 | P0_1 | ||
| P0_3 | |||
| P0_4 | |||
| P0_5 |