Closed jyaacoub closed 2 months ago
Example image:
```python from src.utils.residue import ResInfo, Chain import numpy as np import matplotlib.pyplot as plt import matplotlib.patheffects as PathEffects def plot_sequence(muta, pep_opts, pro_seq): for i in range(len(pro_seq)): muta[(i%len(pep_opts)), i] = i-len(pro_seq) if i < len(pro_seq)/2 else i # Create the plot plt.figure(figsize=(len(pro_seq), 20)) # Adjust the figure size as needed plt.imshow(muta, aspect='auto', cmap='coolwarm', interpolation='none') # Set the x-ticks to correspond to positions in the protein sequence plt.xticks(ticks=np.arange(len(pro_seq)), labels=[ResInfo.code_to_pep[p] for p in pro_seq], rotation=45, fontsize=16) plt.yticks(ticks=np.arange(len(pep_opts)), labels=pep_opts, fontsize=16) plt.xlabel('Protein Sequence Position', fontsize=75) plt.ylabel('Peptide Options', fontsize=75) # Add text labels to each square for i in range(len(pep_opts)): for j in range(len(pro_seq)): text = plt.text(j, i, f'{ResInfo.pep_to_code[pep_opts[i]]}', ha='center', va='center', color='black', fontsize=8) # Add a white outline to the text text.set_path_effects([ PathEffects.Stroke(linewidth=1, foreground='white'), PathEffects.Normal() ]) break # Adjust gridlines to be off-center, forming cell boundaries plt.gca().set_xticks(np.arange(-0.5, len(pro_seq), 1), minor=True) plt.gca().set_yticks(np.arange(-0.5, len(pep_opts), 1), minor=True) plt.grid(which='minor', color='gray', linestyle='-', linewidth=0.5) # Remove the major gridlines (optional, for clarity) plt.grid(which='major', color='none') # Add a colorbar to show the scale of mutation values plt.colorbar(label='Mutation Values') plt.title('Mutation Array Visualization', fontsize=100) plt.show() ```
x86_64
for #h4h):
glibc >= 2.3
is requiredMODELIRANJE
Added the following to .bashrc
for modeller
module support:
export PYTHONPATH="${PYTHONPATH}:/cluster/home/t122995uhn/bin/modeller10.5/lib/x86_64-intel8/python3.3:/cluster/home/t122995uhn/bin/modeller10.5/lib/x86_64-intel8:/cluster/home/t122995uhn/bin/modeller10.5/modlib"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/cluster/home/t122995uhn/bin/modeller10.5/lib/x86_64-intel8"
- **Unable to use with Juypter** I tried solutions mentioned [here](https://stackoverflow.com/questions/58735256/set-pythonpath-for-local-jupyter-notebook-in-vs-code) to no avail
- Built `src/utils/mutate_model.py` for calling with `run_modeller`
Integrate https://salilab.org/modeller/wiki/Mutate_model for mutagensis modeling later on.