-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import pandas as pd |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pandas as pd | ||
import seaborn as sns | ||
import numpy as np | ||
|
||
matrix = pd.read_csv(r"C:\Users\nilsh\OneDrive\Desktop\protein_modelling\energies.csv") | ||
sns_matrix = matrix.iloc[:, 3:] | ||
aa_wild = matrix.iloc[:, 0].tolist() | ||
residues_var = list(sns_matrix.columns) | ||
residues_wild = list((np.array(matrix.iloc[:, 2].tolist()) +318)) # 318 because from homology modelling the residue positions were set to 0. | ||
merged_wild = list(zip(aa_wild, residues_wild)) | ||
sns_matrix = sns_matrix.drop(5, axis=0) | ||
residue_aa_heat = sns.heatmap(sns_matrix, | ||
cmap = "seismic", | ||
center = 0, | ||
xticklabels = residues_var, | ||
yticklabels=merged_wild) | ||
residue_aa_heat.set_xlabel('Amino Acid', fontsize = 16) | ||
residue_aa_heat.set_ylabel('Residues', fontsize = 16) | ||
colorbar = residue_aa_heat.collections[0].colorbar | ||
colorbar.set_label('Free Energy in kcal/mol', fontsize=16) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
417 A | ||
417 C | ||
417 D | ||
417 E | ||
417 F | ||
417 G | ||
417 H | ||
417 I | ||
417 K | ||
417 L | ||
417 M | ||
417 N | ||
417 P | ||
417 Q | ||
417 R | ||
417 S | ||
417 T | ||
417 V | ||
417 W | ||
417 Y | ||
486 A | ||
486 C | ||
486 D | ||
486 E | ||
486 F | ||
486 G | ||
486 H | ||
486 I | ||
486 K | ||
486 L | ||
486 M | ||
486 N | ||
486 P | ||
486 Q | ||
486 R | ||
486 S | ||
486 T | ||
486 V | ||
486 W | ||
486 Y | ||
501 A | ||
501 C | ||
501 D | ||
501 E | ||
501 F | ||
501 G | ||
501 H | ||
501 I | ||
501 K | ||
501 L | ||
501 M | ||
501 N | ||
501 P | ||
501 Q | ||
501 R | ||
501 S | ||
501 T | ||
501 V | ||
501 W | ||
501 Y | ||
505 A | ||
505 C | ||
505 D | ||
505 E | ||
505 F | ||
505 G | ||
505 H | ||
505 I | ||
505 K | ||
505 L | ||
505 M | ||
505 N | ||
505 P | ||
505 Q | ||
505 R | ||
505 S | ||
505 T | ||
505 V | ||
505 W | ||
505 Y | ||
497 A | ||
497 C | ||
497 D | ||
497 E | ||
497 F | ||
497 G | ||
497 H | ||
497 I | ||
497 K | ||
497 L | ||
497 M | ||
497 N | ||
497 P | ||
497 Q | ||
497 R | ||
497 S | ||
497 T | ||
497 V | ||
497 W | ||
497 Y | ||
445 A | ||
445 C | ||
445 D | ||
445 E | ||
445 F | ||
445 G | ||
445 H | ||
445 I | ||
445 K | ||
445 L | ||
445 M | ||
445 N | ||
445 P | ||
445 Q | ||
445 R | ||
445 S | ||
445 T | ||
445 V | ||
445 W | ||
445 Y | ||
498 A | ||
498 C | ||
498 D | ||
498 E | ||
498 F | ||
498 G | ||
498 H | ||
498 I | ||
498 K | ||
498 L | ||
498 M | ||
498 N | ||
498 P | ||
498 Q | ||
498 R | ||
498 S | ||
498 T | ||
498 V | ||
498 W | ||
498 Y | ||
493 A | ||
493 C | ||
493 D | ||
493 E | ||
493 F | ||
493 G | ||
493 H | ||
493 I | ||
493 K | ||
493 L | ||
493 M | ||
493 N | ||
493 P | ||
493 Q | ||
493 R | ||
493 S | ||
493 T | ||
493 V | ||
493 W | ||
493 Y | ||
449 A | ||
449 C | ||
449 D | ||
449 E | ||
449 F | ||
449 G | ||
449 H | ||
449 I | ||
449 K | ||
449 L | ||
449 M | ||
449 N | ||
449 P | ||
449 Q | ||
449 R | ||
449 S | ||
449 T | ||
449 V | ||
449 W | ||
449 Y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import itertools | ||
|
||
def generate_mutatex_input(residues, output_file, chain = False): | ||
amino_acids = "ACDEFGHIKLMNPQRSTVWY" | ||
mutations = [] | ||
|
||
for residue in residues: | ||
for aa in amino_acids: | ||
if residue[1] != aa: | ||
if chain==True: | ||
mutations.append(f"{residue[1]}{residue[2]}{residue[0]}"+";") | ||
else: | ||
mutations.append(f"{residue[1]}{residue[0]}"+";") | ||
|
||
with open(output_file, "w") as f: | ||
for mutation in mutations: | ||
f.write(f"{mutation}\n") | ||
|
||
# Example usage | ||
def generate_mutatex_input(residues, output_file, chain = False): | ||
amino_acids = "ACDEFGHIKLMNPQRSTVWY" | ||
mutations = [] | ||
|
||
for residue in residues: | ||
if chain==True: | ||
mutations.append(f"{residue[1]}{residue[2]}{residue[0]}"+";") | ||
else: | ||
mutations.append(f"{residue[1]}{residue[0]}"+";") | ||
|
||
with open(output_file, "w") as f: | ||
for mutation in mutations: | ||
f.write(f"{mutation}\n") | ||
|
||
|
||
# Example usage | ||
residues = [("417", "N", "X"), ("486", "P", "X"), ("501", "Y", "X"), ("505", "H", "X"), ("497", "F", "X"), ("445", "P", "X"), ("498", "R", "X"), ("493", "Q", "X"), ("449", "Y", "X")] | ||
output_file = "../mutatex/individual_list.txt" | ||
|
||
generate_mutatex_input(residues, output_file) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from Bio import pairwise2 | ||
|
||
# Define your three sequences | ||
seq1 = "CPFGEVFNATKFPSVYAWERKKISNCVADYSVLYNSTFFSTFKCYGVSATKLNDLCFSNVYADSFVVKGDDVRQIAPGQTGVIADYNYKLPDDFMGCVLAWNTRNIDATSTGNYNYKYRLFRKSNLKPFERDISTEIYQAGSTPCNGVAGFNCYFPLRSYSFRPTYGVGHQPYRVVVLSFELT-----VCG" | ||
seq2 = "CPFHEVFNATTFASVYAWNRKRISNCVADYSVIYNFAPFFAFKCYGVSPTKLNDLCFTNVYADSFVIRGNEVSQIAPGQTGNIADYNYKLPDDFTGCVIAWNSNKLDSKPSGNYNYLYRLFRKSKLKPFERDISTEIYQAGNRPCNGVAGPNCYSPLQSYGFRPTYGVGHQPYRVVVLSFELLHAPATVCG" | ||
seq3 = "CPFGEVFNATRFASVYAWNRKRISNCVADYSVLYNSASFSTFKCYGVSPTKLNDLCFTNVYADSFVIRGDEVRQIAPGQTGKIADYNYKLPDDFTGCVIAWNSNNLDSKVGGNYNYLYRLFRKSNLKPFERDISTEIYQAGSTPCNGVEGFNCYFPLQSYGFQPTNGVGYQPYRVVVLSFELLHAPATVCG" | ||
|
||
|
||
|
||
# Perform pairwise sequence alignments | ||
alignments12 = pairwise2.align.globalxx(seq1, seq2) | ||
alignments13 = pairwise2.align.globalxx(seq1, seq3) | ||
alignments23 = pairwise2.align.globalxx(seq2, seq3) | ||
|
||
# Print the alignment scores and aligned sequences | ||
print("Alignment 1-2 score:", alignments12[0][2]) | ||
print(pairwise2.format_alignment(*alignments12[0])) | ||
|
||
print("Alignment 1-3 score:", alignments13[0][2]) | ||
print(pairwise2.format_alignment(*alignments13[0])) | ||
|
||
print("Alignment 2-3 score:", alignments23[0][2]) | ||
print(pairwise2.format_alignment(*alignments23[0])) | ||
|