lhallee commited on
Commit
4269e38
·
verified ·
1 Parent(s): 28c09e5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -0
README.md CHANGED
@@ -41,3 +41,104 @@ configs:
41
  - split: test
42
  path: data/test-*
43
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  - split: test
42
  path: data/test-*
43
  ---
44
+
45
+
46
+ # PINDER PPI dataset
47
+
48
+ The [PINDER: The Protein INteraction Dataset and Evaluation Resource](https://github.com/pinder-org/pinder) is a high quality compilation of positive protein protein interactions.
49
+ Of particular note, the train, valid, and test splits are deduplicated and heavily trimmed based on sequence and structure similarity.
50
+
51
+ For more information on the original dataset compilation, please read their [paper](https://github.com/pinder-org/pinder), [GitHub](https://github.com/pinder-org/pinder), or [docs](https://pinder-org.github.io/pinder/readme.html).
52
+
53
+ ## Differences between this version and the official version
54
+ We further process the dataset into a sequence only version via the script below.
55
+ Importantly, any entry with a sequence involved in a [NEGATOME](https://huggingface.co/datasets/Synthyra/NEGATOME) pair is removed.
56
+ This removed a few thousand from the training and one entry from the valid split.
57
+ `invalid` split entries are removed and info based on holo (bound), apo (unbound), as well as if an entry is computationally predicted is included.
58
+ We also limit the pair length to 2044 (2048 with special tokens), remove entries with sequences less than 20 amino acids, and remove entries with `X` amino acid characters.
59
+
60
+ ```python
61
+ import pandas as pd
62
+ from datasets import Dataset, DatasetDict, load_dataset
63
+ from pinder.core import get_index
64
+ from pinder.core.index.utils import get_sequence_database
65
+
66
+ # --- Load the index and sequence database ---
67
+ index = get_index()
68
+ seq_db = get_sequence_database()
69
+
70
+ # --- Merge the index and sequence database ---
71
+ df = (
72
+ pd.merge(
73
+ index[["id", "split", "holo_R_pdb", "holo_L_pdb", "predicted_R", "predicted_L", "apo_R", "apo_L", "holo_R", "holo_L"]],
74
+ seq_db[["pdb", "sequence"]].rename(
75
+ columns={"pdb": "holo_R_pdb", "sequence": "receptor_sequence"}
76
+ ),
77
+ how="left"
78
+ )
79
+ .merge(
80
+ seq_db[["pdb", "sequence"]].rename(
81
+ columns={"pdb": "holo_L_pdb", "sequence": "ligand_sequence"}
82
+ ),
83
+ how="left"
84
+ )
85
+ .drop(columns=["holo_R_pdb", "holo_L_pdb"])
86
+ )
87
+
88
+ # --- Load and process the negatome sequences ---
89
+ negatome = load_dataset('Synthyra/NEGATOME')
90
+ negatome_seqs = set()
91
+ for name, split in negatome.items():
92
+ for sample in split:
93
+ negatome_seqs.add(sample['SeqA'])
94
+ negatome_seqs.add(sample['SeqB'])
95
+
96
+ # --- Filter for valid split entries (only 'test', 'val', and 'train') ---
97
+ allowed_splits = ['test', 'val', 'train']
98
+ df = df[df['split'].isin(allowed_splits)].copy()
99
+
100
+ # --- Rename the splits: 'val' -> 'valid' ---
101
+ df['split'] = df['split'].replace({'val': 'valid'})
102
+
103
+ # --- Remove entries with sequences found in the negatome ---
104
+ df = df[~(df['receptor_sequence'].isin(negatome_seqs) | df['ligand_sequence'].isin(negatome_seqs))].copy()
105
+
106
+ # --- Create the Huggingface DatasetDict with the desired splits ---
107
+ split_datasets = {}
108
+ for split in ['train', 'valid', 'test']:
109
+ # Select the subset for the current split and reset the index.
110
+ split_df = df[df['split'] == split].reset_index(drop=True)
111
+ split_df = split_df.drop(columns='split')
112
+ split_datasets[split] = Dataset.from_pandas(split_df)
113
+
114
+ hf_dataset = DatasetDict(split_datasets)
115
+
116
+ hf_dataset = hf_dataset.filter(lambda x: (len(x['receptor_sequence']) + len(x['ligand_sequence']) <= 2044)
117
+ and len(x['receptor_sequence']) >= 20
118
+ and len(x['ligand_sequence']) >= 20
119
+ and 'X' not in x['receptor_sequence']
120
+ and 'X' not in x['ligand_sequence'])
121
+
122
+ # --- Push the dataset to the hub ---
123
+ hf_dataset.push_to_hub('Synthyra/PINDER')
124
+ ```
125
+
126
+ ## Please cite
127
+
128
+ If you use this dataset in your work, please cite their paper.
129
+
130
+ ```
131
+ @article {Kovtun2024.07.17.603980,
132
+ author = {Kovtun, Daniel and Akdel, Mehmet and Goncearenco, Alexander and Zhou, Guoqing and Holt, Graham and Baugher, David and Lin, Dejun and Adeshina, Yusuf and Castiglione, Thomas and Wang, Xiaoyun and Marquet, C{\'e}line and McPartlon, Matt and Geffner, Tomas and Rossi, Emanuele and Corso, Gabriele and St{\"a}rk, Hannes and Carpenter, Zachary and Kucukbenli, Emine and Bronstein, Michael and Naef, Luca},
133
+ title = {PINDER: The protein interaction dataset and evaluation resource},
134
+ elocation-id = {2024.07.17.603980},
135
+ year = {2024},
136
+ doi = {10.1101/2024.07.17.603980},
137
+ publisher = {Cold Spring Harbor Laboratory},
138
+ abstract = {Protein-protein interactions (PPIs) are fundamental to understanding biological processes and play a key role in therapeutic advancements. As deep-learning docking methods for PPIs gain traction, benchmarking protocols and datasets tailored for effective training and evaluation of their generalization capabilities and performance across real-world scenarios become imperative. Aiming to overcome limitations of existing approaches, we introduce PINDER, a comprehensive annotated dataset that uses structural clustering to derive non-redundant interface-based data splits and includes holo (bound), apo (unbound), and computationally predicted structures. PINDER consists of 2,319,564 dimeric PPI systems (and up to 25 million augmented PPIs) and 1,955 high-quality test PPIs with interface data leakage removed. Additionally, PINDER provides a test subset with 180 dimers for comparison to AlphaFold-Multimer without any interface leakage with respect to its training set. Unsurprisingly, the PINDER benchmark reveals that the performance of existing docking models is highly overestimated when evaluated on leaky test sets. Most importantly, by retraining DiffDock-PP on PINDER interface-clustered splits, we show that interface cluster-based sampling of the training split, along with the diverse and less leaky validation split, leads to strong generalization improvements.Competing Interest StatementThe authors have declared no competing interest.},
139
+ URL = {https://www.biorxiv.org/content/early/2024/08/13/2024.07.17.603980},
140
+ eprint = {https://www.biorxiv.org/content/early/2024/08/13/2024.07.17.603980.full.pdf},
141
+ journal = {bioRxiv}
142
+ }
143
+ ```
144
+