Update app.py
Browse files
app.py
CHANGED
@@ -134,13 +134,13 @@ def process_sequence(sequence, domain_bounds, n):
|
|
134 |
# Plotting heatmap 2
|
135 |
domain_len = end - start
|
136 |
if 500 > domain_len > 100:
|
137 |
-
step_size =
|
138 |
elif 500 <= domain_len:
|
139 |
-
step_size =
|
140 |
elif domain_len < 10:
|
141 |
step_size = 1
|
142 |
else:
|
143 |
-
step_size =
|
144 |
x_tick_positions = np.arange(start_index, end_index, step_size)
|
145 |
x_tick_labels = [str(pos + 1) for pos in x_tick_positions]
|
146 |
|
@@ -153,6 +153,7 @@ def process_sequence(sequence, domain_bounds, n):
|
|
153 |
plt.figure(figsize=(15, 5))
|
154 |
plt.rcParams.update({'font.size': 16.5})
|
155 |
sns.heatmap(combined_array, cmap='viridis', xticklabels=x_tick_labels, yticklabels=['Residue \nLogits', 'Residue \nConservation'], cbar=True)
|
|
|
156 |
plt.title('Original Residue Probability and Conservation')
|
157 |
plt.xlabel('Residue Index')
|
158 |
plt.show()
|
|
|
134 |
# Plotting heatmap 2
|
135 |
domain_len = end - start
|
136 |
if 500 > domain_len > 100:
|
137 |
+
step_size = 50
|
138 |
elif 500 <= domain_len:
|
139 |
+
step_size = 100
|
140 |
elif domain_len < 10:
|
141 |
step_size = 1
|
142 |
else:
|
143 |
+
step_size = 10
|
144 |
x_tick_positions = np.arange(start_index, end_index, step_size)
|
145 |
x_tick_labels = [str(pos + 1) for pos in x_tick_positions]
|
146 |
|
|
|
153 |
plt.figure(figsize=(15, 5))
|
154 |
plt.rcParams.update({'font.size': 16.5})
|
155 |
sns.heatmap(combined_array, cmap='viridis', xticklabels=x_tick_labels, yticklabels=['Residue \nLogits', 'Residue \nConservation'], cbar=True)
|
156 |
+
plt.xticks(x_tick_positions - start_index + 0.5, x_tick_labels, rotation=0)
|
157 |
plt.title('Original Residue Probability and Conservation')
|
158 |
plt.xlabel('Residue Index')
|
159 |
plt.show()
|