From 2171cb587b09fc8edc3b620959ff7297610ea454 Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 14:55:12 +0200
Subject: [PATCH 1/8] Revise README for clarity and consistency
Updated README.md for clarity and consistency, including improved phrasing and grammatical corrections.
---
README.md | 47 ++++++++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 21 deletions(-)
diff --git a/README.md b/README.md
index 982f9a6..76f4f58 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
#
# HInt
-HInt accelerates AlphaFold by optimizing computations and parallelizing structure predictions. It is a scalable pipeline for high-throughput identification of homologous proteins and interologues—proteins that maintain functional interactions. This enables the systematic discovery of conserved interaction networks that remain undetectable through sequence or structural similarity alone.
+HInt accelerates AlphaFold by optimizing computations and parallelizing structure predictions. It is a scalable pipeline for high-throughput identification of homologous proteins and interologues—proteins that maintain functional interactions. HInt enables the discovery of conserved interaction networks that may remain undetected using sequence or structural similarity alone.
# 1. Installation
@@ -14,13 +14,15 @@ bash Install_HInt.sh
AlphaFold 3 (optional)
⚠️ **Warning**
-You need to have AlphaFold 3 model parameters in Path_AlphaFold_Data (https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
-
+AlphaFold 3 model parameters must be downloaded and provided through `Path_AlphaFold_Data`. (https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
+
+Access to AlphaFold 3 parameters is subject to the DeepMind terms of use.
## 1.2. DeepLoc2 (Eukaryote)
-Download deeploc2 package here : https://services.healthtech.dtu.dk/services/DeepLoc-2.0/
+Download the DeepLoc 2.0 package from: https://services.healthtech.dtu.dk/services/DeepLoc-2.0/
+
```bash
conda activate HInt
cd deeploc2_package
@@ -30,7 +32,7 @@ pip install triton==3.1.0
## 1.3. SignalP5
-Download SignalP5 here : [https://services.healthtech.dtu.dk/services/SignalP-5.0/9-Downloads.php](https://services.healthtech.dtu.dk/cgi-bin/sw_request?software=signalp&version=5.0&packageversion=5.0b&platform=Linux)
+Download the SignalP5 package from: [https://services.healthtech.dtu.dk/services/SignalP-5.0/9-Downloads.php](https://services.healthtech.dtu.dk/cgi-bin/sw_request?software=signalp&version=5.0&packageversion=5.0b&platform=Linux)
```bash
tar -xvzf signalp-5.0b.Linux.tar.gz
@@ -41,7 +43,8 @@ sudo cp -r lib/* /usr/local/lib
## 1.4. CCP4
-Download ccp4 package here : https://www.ccp4.ac.uk/download/#os=linux
+Download the ccp4 package from: https://www.ccp4.ac.uk/download/#os=linux
+
```bash
tar xvzf ccp4-9-setup.tar.gz
./ccp4-9-setup
@@ -49,15 +52,17 @@ tar xvzf ccp4-9-setup.tar.gz
# 2. Download databases
-## 2.1. Download the GPU-indexed MMseqs2 database (1.9T)
-To accelerate MSA generation, it is strongly recommended to store the databases on NVMe or SSD drives rather than on HDD storage.
+## 2.1. Download the GPU-indexed MMseqs2 database (~1.9 TB)
+For optimal performance, store MMseqs2 databases on NVMe or SSD storage rather than HDDs.
+
```bash
wget https://raw.githubusercontent.com/sokrypton/ColabFold/main/setup_databases.sh
chmod +x setup_databases.sh
GPU=1 ./setup_databases.sh ./MMseqs2_GPU_database
```
-## 2.2. Download AlphaFold2 database (2.2T)
+## 2.2. Download AlphaFold 2 database (~2.2 TB)
+
```bash
git clone https://github.com/deepmind/alphafold.git
cd ./alphafold
@@ -75,17 +80,17 @@ cd alphafold3
# 3. Input parameters
## 3.1. Setup HInt.txt
You need to download or copy HInt.txt file example.
-### *A priori* informations
+### *A priori* information
-- **Signal_peptide** : Filter proteins based on the presence of a predicted signal peptide (Options : Yes,No or None).
+- **Signal_peptide** : Filter proteins based on the presence of a predicted signal peptide (Options : Yes, No or None).
- **DeepLoc** : Cellular localisation(s) of the protein. Multiple localizations can be specified, separated by commas. All proteins predicted to be in one of these compartments will be used.
- - Eukaryotes : Cytoplasm, Nucleus, Extracellular, Cell membrane, Mitochondrion, Plastid, Endoplasmic reticulum, Lysosome/Vacuole, Golgo apparatus, Peroxisome.
+ - Eukaryotes : Cytoplasm, Nucleus, Extracellular, Cell membrane, Mitochondrion, Plastid, Endoplasmic reticulum, Lysosome/Vacuole, Golgi apparatus, Peroxisome.
- Prokaryotes : Cell wall & surface, Extracellular, Cytoplasmic, Cytoplasmic Membrane, Outer Membrane, Periplasmic.
-- **Max_protein_lenght** : Maximum lenght of the protein you search (integer).
+- **Max_protein_length** : Maximum length of the protein you search (integer).
-- **Min_protein_lenght** : Minimum lenght of the protein you search (integer), default set on 20aa.
+- **Min_protein_length** : Minimum length of the protein you search (integer), default set on 20aa.
- **AlphaFold** : AlphaFold version (Options : 2 or 3).
@@ -106,7 +111,7 @@ Region of a bait :
Interact_with : UniprotID1(20-200)
```
-Multiple baits : # First has to be the principal. For now you can put a maximum of 3 differents bait
+Multiple baits : # The first protein must correspond to the primary bait. For now you can put a maximum of 3 differents bait
```
Interact_with : UniprotID1, UniprotID2
```
@@ -119,7 +124,7 @@ Interact_with : [Uniprot1, Uniprot2]
And you can mixed up all of theses examples !
⚠️ **Warning**
-HInt don't support multiple regions for baits proteins
+HInt currently does not support multiple regions for bait proteins.
- **Organism** : Organism of interest for SignalP5 and DeepLoc (arch, gram+, gram-, euk or None). Enables signal peptide prediction and cleavage.
@@ -149,7 +154,7 @@ HInt don't support multiple regions for baits proteins
## 3.2. Setup protein file
The protein file must contain all UniProt IDs or all sequences in FASTA format for both preys and baits.
-This can be protein ncbi fasta file, classic fasta file, uniprotID's or a combination of all.
+This can be an NCBI protein FASTA file, a standard FASTA file, UniProt identifiers, or a combination of these formats.
>[!TIP]
>The use of UniprotIDs is recommended for pipeline speed.
@@ -202,10 +207,10 @@ HInt --cpu --gpu --multi_job_per_gpu
# Number of CPUs available for computation. Enables CPU parallelization. By default, set to half of the available CPUs.
--cpu : Integer
-# Index(es) of GPU(s) you want to uses. Declare multiple GPU allows GPU parallelisation. By default set on GPU 0.
+# Index(es) of GPU(s) you want to use. Declare multiple GPU allows GPU parallelisation. By default set on GPU 0.
--gpu : Integer(s)
-# Allows multiple jobs to run on a single GPU, reducing time of modelisation. By default set on True.
+# Allows multiple jobs to run on a single GPU, reducing time of modeling. By default set on True.
--multi_job_per_gpu : Boolean
```
@@ -287,7 +292,7 @@ Includes:
`_rest_int.csv`
Table of interface residues identified at the protein-protein interface.
-Includes residues selected based on PAE and distance criteria (< 10 Å).
+Includes interface residues identified using PAE and inter-chain distance criteria (<10 Å).
`_ranked_0.pdb`
Structural model of the predicted complex.
@@ -295,7 +300,7 @@ Interface residues can be visualized by coloring the structure using the B-facto
# Standalone iQ-score Calculation
-Compute **iQ-score** independently from the full HInt workflow.
+Compute **iQ-score** independently of the full HInt workflow..
[](https://github.com/Qrouger/iQ-score)
From f2d3fd968108987592895f2e87cb4060074f4416 Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:10:37 +0200
Subject: [PATCH 2/8] Fix spelling
---
HInt.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/HInt.txt b/HInt.txt
index 4e9a160..fccd7f9 100644
--- a/HInt.txt
+++ b/HInt.txt
@@ -1,8 +1,8 @@
###Informations #All arguments are optional
Signal_peptide : Yes #Yes, No or None.
DeepLoc : Periplasmic, Extracellular
-Max_protein_lenght :
-Min_protein_lenght :
+Max_protein_length :
+Min_protein_length :
Homo-oligomer : #Integer between 2-20
Interact_with : P33790 #UniprotID/Protein Name
Organism : gram- #gram-, gram+, euk, arch or None
From c4452d1a266179aa9eb17eef46916d938e79711e Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:11:37 +0200
Subject: [PATCH 3/8] Fix variable name typos in HInt.py
---
HInt/HInt.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/HInt/HInt.py b/HInt/HInt.py
index 3041881..2b69de0 100644
--- a/HInt/HInt.py
+++ b/HInt/HInt.py
@@ -88,7 +88,7 @@ def main() :
HInt_object = File_proteins(Informations_dict["Path_Uniprot_ID"], Informations_dict["Interact_with"], Informations_dict["AlphaFold"])
time_dict = HInt_object.get_time_dict()
- time_dict["Summarize_info"] = [Informations_dict["Interact_with"], Informations_dict["DeepLoc"], Informations_dict["Signal_peptide"], Informations_dict["Min_protein_lenght"], Informations_dict["Max_protein_lenght"], Informations_dict["Homo-oligomer"],str(len(HInt_object.get_possible_prey())),Informations_dict["Organism"]]
+ time_dict["Summarize_info"] = [Informations_dict["Interact_with"], Informations_dict["DeepLoc"], Informations_dict["Signal_peptide"], Informations_dict["Min_protein_length"], Informations_dict["Max_protein_length"], Informations_dict["Homo-oligomer"],str(len(HInt_object.get_possible_prey())),Informations_dict["Organism"]]
logger.info("GPUs set to: %s", GPU)
logger.info("Number of CPUs set to: %s", CPU)
@@ -116,7 +116,7 @@ def main() :
# Filter proteins based on sequence length
# (default: remove proteins shorter than 20 AA)
- need_msa, need_pkl, need_DeepLoc = filter_lenght(HInt_object, Informations_dict, need_msa, need_pkl, need_DeepLoc)
+ need_msa, need_pkl, need_DeepLoc = filter_length(HInt_object, Informations_dict, need_msa, need_pkl, need_DeepLoc)
# --------------------------------------------------------------
# DeepLoc filtering
@@ -159,11 +159,11 @@ def main() :
for bait in Informations_dict["Interact_with"] : # Adjust bait protein lengths if specific regions are defined
if Informations_dict["Regions"][bait] != "0-0" :
- dict_lenght = HInt_object.get_lenght_prot()
+ dict_length = HInt_object.get_length_prot()
start = int(Informations_dict["Regions"][bait].split("-")[0])
end = int(Informations_dict["Regions"][bait].split("-")[1])
- dict_lenght[bait] = end - start + 1
- HInt_object.set_lenght_prot(dict_lenght)
+ dict_length[bait] = end - start + 1
+ HInt_object.set_length_prot(dict_length)
# Filter proteins based on signal peptide criteria
From 594b9d29b70621517518fe9a8cbc819756977022 Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:13:10 +0200
Subject: [PATCH 4/8] Fix spelling in methods and comments
---
HInt/File_proteins.py | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/HInt/File_proteins.py b/HInt/File_proteins.py
index e8e57f1..bc21cb5 100644
--- a/HInt/File_proteins.py
+++ b/HInt/File_proteins.py
@@ -43,7 +43,7 @@ def set_proteins_sequence_SP (self, new_protein_sequence) :
def set_proteins_sequence_no_SP (self, new_protein_sequence) :
"""
- Sets a dict of all sequences without Signal peptide and set a lenght dict.
+ Sets a dict of all sequences without Signal peptide and set a length dict.
Parameters:
----------
@@ -53,7 +53,7 @@ def set_proteins_sequence_no_SP (self, new_protein_sequence) :
----------
"""
self.protein_sequence_no_SP = new_protein_sequence
- self.find_prot_lenght(new_protein_sequence)
+ self.find_prot_length(new_protein_sequence)
def set_proteins (self, new_protein) :
"""
@@ -81,18 +81,18 @@ def set_file_name (self, filename) :
"""
self.file_name = filename
- def set_lenght_prot (self, lenght_prot) :
+ def set_length_prot (self, length_prot) :
"""
- Sets lenght of all proteins.
+ Sets length of all proteins.
Parameters:
----------
- lenght_prot = dictionary
+ length_prot = dictionary
Returns:
----------
"""
- self.lenght_prot = lenght_prot
+ self.length_prot = length_prot
def set_result_dict (self, result_dict) :
"""
@@ -264,18 +264,18 @@ def get_file_name (self) :
"""
return self.file_name
- def get_lenght_prot (self) :
+ def get_length_prot (self) :
"""
- Return the lenght of proteins.
+ Return the length of proteins.
Parameters:
----------
Returns:
----------
- lenght_prot : dictionary
+ length_prot : dictionary
"""
- return self.lenght_prot
+ return self.length_prot
def get_result_dict (self) :
"""
@@ -724,7 +724,7 @@ def Make_save_dict (self) :
with open('log_file/save_dict.pkl', 'wb') as out_file :
pickle.dump(pkl_dict, out_file)
- def find_prot_lenght (self, prot_dict = None) :
+ def find_prot_length (self, prot_dict = None) :
"""
Compute and store the length (number of amino acids) of each protein based on sequences without signal peptides.
@@ -737,10 +737,10 @@ def find_prot_lenght (self, prot_dict = None) :
else :
proteins = prot_dict
sequences = self.get_proteins_sequence_no_SP()
- lenght_prot = dict()
+ length_prot = dict()
for protein in proteins :
- lenght_prot[protein] = len(sequences[protein])
- self.set_lenght_prot(lenght_prot)
+ length_prot[protein] = len(sequences[protein])
+ self.set_length_prot(length_prot)
def create_fasta_file (self, with_SP, need_msa=[], need_pkl=[]) :
From cc2f77f6fa80f5b19c8be239547827db91d5e0e7 Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:14:05 +0200
Subject: [PATCH 5/8] Fix variable name typos for length consistency
---
HInt/Scoring_HInt.py | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/HInt/Scoring_HInt.py b/HInt/Scoring_HInt.py
index 8d8b992..9a4a2d9 100644
--- a/HInt/Scoring_HInt.py
+++ b/HInt/Scoring_HInt.py
@@ -413,13 +413,13 @@ def Create_figures (file, Informations_dict, AF_version, sorted_proteins, CPU) :
regions = Informations_dict["Regions"]
possible_prey = file.get_possible_prey()
result_dict = file.get_result_dict()
- complete_lenght_prot = file.get_lenght_prot()
+ complete_length_prot = file.get_length_prot()
complete_seq_prot = file.get_proteins_sequence_no_SP()
interface_dict = dict()
tasks = []
baits_seq = {}
- baits_lenght = {}
+ baits_length = {}
for baits in Informations_dict["Multimer_bait"] :
bait_file = baits
for bait in baits.split(",") :
@@ -428,15 +428,15 @@ def Create_figures (file, Informations_dict, AF_version, sorted_proteins, CPU) :
end = int(regions[bait].split("-")[1])
bait_file = bait_file.replace(bait,f"{bait}_{start}-{end}")
baits_seq [bait] = complete_seq_prot[bait]
- baits_lenght [bait] = complete_lenght_prot[bait]
+ baits_length [bait] = complete_length_prot[bait]
bait_file = bait_file.replace(",","_and_")
for prey in possible_prey :
- lenght_prot = copy.deepcopy(baits_lenght)
- lenght_prot [prey] = complete_lenght_prot[prey]
+ length_prot = copy.deepcopy(baits_length)
+ length_prot [prey] = complete_length_prot[prey]
seq_prot = copy.deepcopy(baits_seq)
seq_prot [prey] = complete_seq_prot[prey]
if "Reason_for_filtering" not in result_dict[prey].keys() : #only for validate preys
- tasks.append((AF_version, bait_file, prey, lenght_prot, seq_prot, baits, regions))
+ tasks.append((AF_version, bait_file, prey, length_prot, seq_prot, baits, regions))
if tasks : #if there is interaction to process
with Pool(processes=CPU) as pool :
results_res_int = pool.map(postprocess_interaction, tasks)
@@ -466,7 +466,7 @@ def postprocess_interaction (args) : #maybe split first and second part of funct
----------
interface_dict : dict
"""
- (AF_version, bait_file, prey, lenght_prot, seq_prot, baits, region) = args
+ (AF_version, bait_file, prey, length_prot, seq_prot, baits, region) = args
if os.path.isdir (f"./result_PPI_int/{bait_file}_and_{prey}") == True :
outdir = f"./result_PPI_int/{bait_file}_and_{prey}"
if os.path.isdir (f"./result_PPI_int/{prey}_and_{bait_file}") == True :
@@ -475,7 +475,7 @@ def postprocess_interaction (args) : #maybe split first and second part of funct
if AF_version == "2" :
plot_Distogram(outdir)
- residues_at_interface, proteins, path_int, color_res = make_table_res_int(lenght_prot, seq_prot, outdir, baits, prey, AF_version, region)
+ residues_at_interface, proteins, path_int, color_res = make_table_res_int(length_prot, seq_prot, outdir, baits, prey, AF_version, region)
if residues_at_interface is not None :
color_int_residues(path_int, color_res, proteins)
@@ -549,7 +549,7 @@ def plot_Distogram (job) :
logger.info(f"Distogram created for {job}")
-def make_table_res_int (lenght_prot, seq_prot, path_int, baits, prey, AF_version, regions) :
+def make_table_res_int (length_prot, seq_prot, path_int, baits, prey, AF_version, regions) :
"""
Generate a detailed table of residue-residue interactions for a protein-protein complex.
@@ -559,7 +559,7 @@ def make_table_res_int (lenght_prot, seq_prot, path_int, baits, prey, AF_version
Parameters :
----------
- lenght_prot : dict
+ length_prot : dict
seq_prot : dict
path_int : str
baits : str
@@ -612,16 +612,16 @@ def make_table_res_int (lenght_prot, seq_prot, path_int, baits, prey, AF_version
del logits
del bin_edges
gc.collect()
- complete_lenght = 0
+ complete_length = 0
max_hori_index = 0
for bait in baits.split(",") :
- complete_lenght += lenght_prot[bait]
+ complete_length += length_prot[bait]
for bait in baits.split(",") :
min_hori_index = max_hori_index
- max_hori_index += lenght_prot[bait]
+ max_hori_index += length_prot[bait]
bait_prey = bait +"_and_" + proteins[-1]
dict_int[bait_prey] = [[bait," "+proteins[-1]," Distance_Ä"," PAE_score"]]
- for line in range(complete_lenght,complete_lenght+lenght_prot[proteins[-1]]) :
+ for line in range(complete_length,complete_length+length_prot[proteins[-1]]) :
hori_index = -1
for distance in dist[line] :
hori_index += 1
@@ -633,10 +633,10 @@ def make_table_res_int (lenght_prot, seq_prot, path_int, baits, prey, AF_version
if regions[bait] != "0-0" : #if region selected, need to ajust index
res_in_tot_seq = hori_index - min_hori_index + int(regions[bait].split("-")[0]) - 1
residue1 = seq_prot[bait][res_in_tot_seq]
- residue2 = seq_prot[proteins[-1]][line-complete_lenght]
- dict_int[bait_prey].append([residue1+":"+str(res_in_tot_seq+1)," "+residue2+":"+str(line-complete_lenght+1)," "+str(distance), " "+str(pae_mtx[line][real_hori_index])])
+ residue2 = seq_prot[proteins[-1]][line-complete_length]
+ dict_int[bait_prey].append([residue1+":"+str(res_in_tot_seq+1)," "+residue2+":"+str(line-complete_length+1)," "+str(distance), " "+str(pae_mtx[line][real_hori_index])])
color_res[bait].add(str(res_in_tot_seq+1))
- color_res[proteins[-1]].add(str(line-complete_lenght+1))
+ color_res[proteins[-1]].add(str(line-complete_length+1))
del dist
del pae_mtx
gc.collect()
@@ -651,7 +651,7 @@ def make_table_res_int (lenght_prot, seq_prot, path_int, baits, prey, AF_version
PAE_CUTOFF = 10.0 #Observation: PAE value for residue at the interaciotn of AF3 model is generally lower than AF2 model
ATOM_CONTACT = ["C","CA","CB"]
- len_chain_last = lenght_prot[proteins[-1]]
+ len_chain_last = length_prot[proteins[-1]]
total_len = pae_mtx.shape[0]
int_already_know = {}
structure = parser.get_structure('protein',os.path.join(path_int, f"{names_int}_ranked_0.pdb"))
From 1e4e3081b5833629f93c003898c65acdf79491e6 Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:14:31 +0200
Subject: [PATCH 6/8] Fix spelling errors in variable names and comments
---
HInt/Utils_HInt.py | 56 +++++++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/HInt/Utils_HInt.py b/HInt/Utils_HInt.py
index 3552faf..1713849 100644
--- a/HInt/Utils_HInt.py
+++ b/HInt/Utils_HInt.py
@@ -53,7 +53,7 @@ def Define_informations() :
"""
logger.info("Defining informations")
Informations_dict = dict()
- list_inf = ["Signal_peptide", "Homo-oligomer", "Interact_with", "Organism", "DeepLoc", "Regions", "Multimer_bait", "AlphaFold", "Max_protein_lenght", "Min_protein_lenght", "Path_Uniprot_ID", "Path_AlphaFold_Data", "Path_Pickle_Feature", "Path_Singularity_Image", "Path_MMseqs2_Data"]
+ list_inf = ["Signal_peptide", "Homo-oligomer", "Interact_with", "Organism", "DeepLoc", "Regions", "Multimer_bait", "AlphaFold", "Max_protein_length", "Min_protein_length", "Path_Uniprot_ID", "Path_AlphaFold_Data", "Path_Pickle_Feature", "Path_Singularity_Image", "Path_MMseqs2_Data"]
with open("HInt.txt", "r") as file :
for lines in file :
if ":" in lines :
@@ -65,7 +65,7 @@ def Define_informations() :
if info not in Informations_dict.keys() : #if settings file is not authentic
if info in ["Interact_with","Path_Uniprot_ID", "Path_AlphaFold_Data", "Path_Pickle_Feature"] :
raise ValueError(f"HInt.txt file is compromised, verify the file. {info} is missing")
- elif info in ["Signal_peptide","Homo-oligomer","Path_MMseqs2_Data","Regions","Multimer_bait","DeepLoc","AlphaFold","Max_protein_lenght","Min_protein_lenght","Organism"] :
+ elif info in ["Signal_peptide","Homo-oligomer","Path_MMseqs2_Data","Regions","Multimer_bait","DeepLoc","AlphaFold","Max_protein_length","Min_protein_length","Organism"] :
Informations_dict[info] = ""
### Normalize all configuration values
@@ -100,10 +100,10 @@ def Define_informations() :
elif informations_key == "AlphaFold" :
Informations_dict[informations_key] = "2"
logger.info("Set AlphaFold version by default on AlphaFold2")
- elif informations_key == "Min_protein_lenght" :
+ elif informations_key == "Min_protein_length" :
Informations_dict[informations_key] = "20"
- logger.info("Minimum lenght for prey protein set by default 20 to AA")
- elif informations_key == "Max_protein_lenght" :
+ logger.info("Minimum length for prey protein set by default 20 to AA")
+ elif informations_key == "Max_protein_length" :
Informations_dict[informations_key] = ""
elif informations_key == "Organism" :
Informations_dict[informations_key] = "None"
@@ -710,7 +710,7 @@ def Make_all_MSA_coverage(file, Path_Pickle_Feature, baits) :
-def filter_lenght(file, Informations_dict, need_msa, need_pkl, need_DeepLoc) :
+def filter_length(file, Informations_dict, need_msa, need_pkl, need_DeepLoc) :
"""
Filter proteins based on their sequence length and update the list of possible preys.
@@ -735,26 +735,26 @@ def filter_lenght(file, Informations_dict, need_msa, need_pkl, need_DeepLoc) :
need_DeepLoc : list
"""
result_dict = file.get_result_dict()
- sequence_dict = file.get_proteins_sequence_SP() #use sequence with SP for lenght filtering
+ sequence_dict = file.get_proteins_sequence_SP() #use sequence with SP for length filtering
possible_prey = file.get_possible_prey()
- if Informations_dict["Max_protein_lenght"] == "" : #not set by default, depend of GPU memory
- max_lenght = 100000
+ if Informations_dict["Max_protein_length"] == "" : #not set by default, depend of GPU memory
+ max_length = 100000
else :
- max_lenght = int(Informations_dict["Max_protein_lenght"])
- min_lenght = int(Informations_dict["Min_protein_lenght"]) #set by default to 20
+ max_length = int(Informations_dict["Max_protein_length"])
+ min_length = int(Informations_dict["Min_protein_length"]) #set by default to 20
new_possible_prey = list()
for protein in possible_prey :
- if len(sequence_dict[protein]) < max_lenght and len(sequence_dict[protein]) > min_lenght :
+ if len(sequence_dict[protein]) < max_length and len(sequence_dict[protein]) > min_length :
new_possible_prey.append(protein)
else :
- result_dict[protein]["Reason_for_filtering"] = "Lenght filtering"
+ result_dict[protein]["Reason_for_filtering"] = "length filtering"
if protein in need_msa :
need_msa.remove(protein)
if protein in need_pkl :
need_pkl.remove(protein)
if protein in need_DeepLoc :
need_DeepLoc.remove(protein)
- logger.info("Protein preys remaining after lenght filtering : " + str(len(new_possible_prey)))
+ logger.info("Protein preys remaining after length filtering : " + str(len(new_possible_prey)))
file.set_possible_prey(new_possible_prey)
file.set_result_dict(result_dict)
return(need_msa, need_pkl, need_DeepLoc)
@@ -834,7 +834,7 @@ def Generate_scripts(file, Informations_dict, Interaction_file, bait) :
result_dict = file.get_result_dict()
AF_version = Informations_dict["AlphaFold"]
possible_prey = file.get_possible_prey()
- lenght_prot = file.get_lenght_prot()
+ length_prot = file.get_length_prot()
regions = Informations_dict["Regions"]
# Estimate max amino acids based on GPU VRAM (choose first GPU as reference)
@@ -852,14 +852,14 @@ def Generate_scripts(file, Informations_dict, Interaction_file, bait) :
save_multimer = bait
bait_file = save_multimer.replace(",", "_and_")
bait_for_job = save_multimer.replace(",", ";")
- lenght = sum(lenght_prot[prot] for prot in save_multimer.split(","))
+ length = sum(length_prot[prot] for prot in save_multimer.split(","))
for prot in save_multimer.split(",") :
if regions[prot] != "0-0":
start, end = int(regions[prot].split("-")[0]), int(regions[prot].split("-")[1])
bait_file = bait_file.replace(prot, f"{prot}_{start}-{end}")
bait_for_job = bait_for_job.replace(prot, f"{prot},{start}-{end}")
else :
- lenght = lenght_prot[bait]
+ length = length_prot[bait]
if regions[bait] != "0-0" :
start, end = int(regions[bait].split("-")[0]), int(regions[bait].split("-")[1])
bait_file = f"{bait}_{start}-{end}"
@@ -872,7 +872,7 @@ def Generate_scripts(file, Informations_dict, Interaction_file, bait) :
if Interaction_file == "PPI_int" :
copy_possible_prey = copy.deepcopy(possible_prey) # To avoid modifying the list while iterating
for prey in copy_possible_prey :
- int_lenght = lenght + lenght_prot[prey]
+ int_length = length + length_prot[prey]
# Check if model already exists
if AF_version == "3" :
@@ -883,48 +883,48 @@ def Generate_scripts(file, Informations_dict, Interaction_file, bait) :
path2 = glob.glob(f"./result_PPI_int/{prey}_and_{bait_file}/ranked_0.pdb")
if len(path1) == 0 and len(path2) == 0 :
- if int_lenght <= max_aa :
+ if int_length <= max_aa :
job_str = f"{bait_for_job};{prey}\n"
- vram_lenght = 3.8 + (-0.0000627) * int_lenght + 0.00000332 * int_lenght**2
- job_with_vram_length.append((job_str, vram_lenght))
+ vram_length = 3.8 + (-0.0000627) * int_length + 0.00000332 * int_length**2
+ job_with_vram_length.append((job_str, vram_length))
else :
OOM_int += f"{bait_for_job};{prey}\n"
result_dict[prey][f"Reason_for_filtering"] = "Interaction too large for your GPU, possible prey"
possible_prey.remove(prey)
if Interaction_file == "Compounds" :
Compounds = file.get_compounds()
- vram_lenght = 1.9 + (-0.0000627) * lenght + 0.00000332 * lenght**2
+ vram_length = 1.9 + (-0.0000627) * length + 0.00000332 * length**2
for compound in Compounds.keys() :
job_str = f"{bait_for_job};{compound}\n"
path = glob.glob(f"./result_Compounds/{bait_file}_and_{compound}/*_model.cif")
if len(path) == 0 :
if os.path.isdir(f"./result_Compounds/{bait_file}_and_{compound}") : #if dir exist and model not exist, rm dir
os.system(f"rm -r ./result_Compounds/{bait_file}_and_{compound}")
- job_with_vram_length.append((f"{job_str}", vram_lenght)) #consider no vram for compound, only for protein bait
+ job_with_vram_length.append((f"{job_str}", vram_length)) #consider no vram for compound, only for protein bait
if Interaction_file == "homo_int" :
nbr_oligo = Informations_dict.get("Homo-oligomer", 2)
for prey in possible_prey :
- int_lenght = lenght_prot[prey] * int(nbr_oligo)
+ int_length = length_prot[prey] * int(nbr_oligo)
if AF_version == "3" :
path = glob.glob(f"./result_homo_int/{prey}_homo_{nbr_oligo}er/*_model.cif")
else :
path = glob.glob(f"./result_homo_int/{prey}_homo_{nbr_oligo}er/ranked_0.pdb")
if len(path) == 0 :
- if int_lenght <= max_aa :
+ if int_length <= max_aa :
if AF_version == "3" :
job_str = f"{prey}_af3_input.json:{nbr_oligo}\n"
if AF_version == "2" :
job_str = f"{prey}:{nbr_oligo}\n"
- vram_lenght = 3.8 + (-0.0000627) * int_lenght + 0.00000332 * int_lenght**2
- job_with_vram_length.append((job_str, vram_lenght))
+ vram_length = 3.8 + (-0.0000627) * int_length + 0.00000332 * int_length**2
+ job_with_vram_length.append((job_str, vram_length))
else :
OOM_int += f"{prey}:{nbr_oligo}\n"
result_dict[prey]["Reason_for_filtering"] = "Homo-oligomer too large for your GPU"
possible_prey.remove(prey)
- # Classify job_list in function of int lenght
+ # Classify job_list in function of int length
job_with_vram_length.sort(key=lambda x: x[1], reverse=True)
From 60d29e99f1ae19af1d442e29199fd4e087787fde Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:15:27 +0200
Subject: [PATCH 7/8] Fix variable name
---
HInt/get_good_inter_pae.py | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/HInt/get_good_inter_pae.py b/HInt/get_good_inter_pae.py
index b8da399..9c00266 100644
--- a/HInt/get_good_inter_pae.py
+++ b/HInt/get_good_inter_pae.py
@@ -17,11 +17,11 @@
from calculate_mpdockq import *
-def examine_inter_pae(pae_mtx, lenght, cutoff, type_int) :
+def examine_inter_pae(pae_mtx, length, cutoff, type_int) :
"""Check inter-chain PAE only between the last chain and the others"""
pae = pae_mtx.copy()
if type_int == "PPI" or type_int == "Compounds" :
- start_last = sum(lenght[:-1])
+ start_last = sum(length[:-1])
# mask all
pae[:] = 50
@@ -32,7 +32,7 @@ def examine_inter_pae(pae_mtx, lenght, cutoff, type_int) :
if type_int == "homo" :
start = 0
- for l in lenght:
+ for l in length:
end = start + l
pae[start:end, start:end] = 50 # masque intra-chaîne
start = end
@@ -207,7 +207,7 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
multi_scoring : bool
"""
seq_no_SP = save_file.get_proteins_sequence_no_SP()
- prot_lenght = save_file.get_lenght_prot()
+ prot_length = save_file.get_length_prot()
good_jobs = []
iptm_ptm = list()
iptm = list()
@@ -216,13 +216,13 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
logging.info(f"Scoring {job}")
result_subdir = os.path.join(job)
interaction = job.split("/")[-1]
- lenght = list()
+ length = list()
if "_and_" in interaction and "PPI" in job :
type_int = "PPI"
for prot in interaction.split("_and_") :
if "-" in prot and prot.split("_")[0] in seq_no_SP.keys() :
prot = prot.split("_")[0]
- lenght.append(prot_lenght[prot])
+ length.append(prot_length[prot])
if "_homo_" in interaction :
type_int = "homo"
prot = interaction.split("_homo_")[0]
@@ -230,7 +230,7 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
for i in range(0,nbr) :
if "-" in prot and prot.split("_")[0] in seq_no_SP.keys() :
prot = prot.split("_")[0]
- lenght.append(prot_lenght[prot])
+ length.append(prot_length[prot])
if "Compounds" in job :
type_int = "Compounds"
for prot in interaction.split("_and_") :
@@ -239,8 +239,8 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
if prot == interaction.split("_and_")[-1] :
l = 1
else :
- l = prot_lenght[prot]
- lenght.append(l)
+ l = prot_length[prot]
+ length.append(l)
@@ -266,7 +266,7 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
json_data = json.load(json_f)
pae_mtx = np.array(json_data['pae'])
chain_coords,chain_CB_inds,plddt_per_chain,best_plddt,pdb_path = obtain_chain_coord(os.path.join(job))
- check = examine_inter_pae(pae_mtx,lenght,cutoff=cutoff,type_int=type_int)
+ check = examine_inter_pae(pae_mtx,length,cutoff=cutoff,type_int=type_int)
mpDockq_score = obtain_mpdockq2(chain_coords,chain_CB_inds,plddt_per_chain,best_plddt,pdb_path)
if check:
good_jobs.append(str(job)+"/"+f"{job.split('/')[-1]}_ranked_0.pdb")
@@ -308,7 +308,7 @@ def main(job, cutoff, surface_thres, save_file, AF_version, ccp4_setup, multi_sc
pae_mtx = np.array(check_dict['predicted_aligned_error'])
chain_coords,chain_CB_inds,plddt_per_chain,best_plddt,pdb_path = obtain_chain_coord(os.path.join(job),check_dict)
if pdb == "ranked_0.pdb" :
- check = examine_inter_pae(pae_mtx,lenght,cutoff=cutoff,type_int=type_int) #only check PAE for best model
+ check = examine_inter_pae(pae_mtx,length,cutoff=cutoff,type_int=type_int) #only check PAE for best model
mpDockq_score = obtain_mpdockq2(chain_coords,chain_CB_inds,plddt_per_chain,best_plddt,pdb_path)
if check :
good_jobs.append(str(f"{job}/{job.split('/')[-1]}_{pdb}"))
From 25198bf9a3acf004227878cf7a68f6e6fc64305a Mon Sep 17 00:00:00 2001
From: Quentin Rouger <144003341+Qrouger@users.noreply.github.com>
Date: Fri, 31 Jul 2026 15:17:37 +0200
Subject: [PATCH 8/8] Bump version to 0.7.2
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 5ec3bd7..061aad2 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@
setup(
name='HInt-ppi',
- version='0.7.1',
+ version='0.7.2',
description=(
'A tool to find homologous interactions and speed up AlphaFold-based structural modeling.'
),