Datasets:

Gianluca Lombardi commited on
Commit
195ac7c
·
1 Parent(s): 9e71bdf

Update README

Browse files
Files changed (1) hide show
  1. README.md +91 -19
README.md CHANGED
@@ -32,17 +32,17 @@ configs:
32
  path: splits/id09/test.parquet
33
  ---
34
 
35
- # *SoftDis* dataset
36
 
37
- *SoftDis* is a dataset for the exploration of disordered regions in
38
  protein structures, and their relations with interacting sites.
39
 
40
- The concept of soft disorder was introduced in [[Seoane and Carbone, 2021]](https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://journals.plos.org/ploscompbiol/article%3Fid%3D10.1371/journal.pcbi.1008546&ved=2ahUKEwj43OOAmISLAxW4UKQEHRszOaIQFnoECBQQAQ&usg=AOvVaw1YXiijzojYENeuv-rxtzLD),
41
  as a general term for regions in a protein identified as flexible
42
  (characterized by high B-factor) or intermittently missing across different
43
  X-ray crystal structures of the same sequence. The definition is derived from
44
  an extensive analysis of clusters of alternative structures for very similar
45
- protein sequences in the Protein Data Bankh (PDB).
46
 
47
  The current version of the dataset is based on the structures in the PDB up to 15-10-2024.
48
 
@@ -50,14 +50,12 @@ The current version of the dataset is based on the structures in the PDB up to 1
50
  ## Dataset construction
51
 
52
  To construct the SoftDis database, we retrieved protein
53
- structures from the PDB archive (snapshot as of 15-10-2024)
54
- and clustered sequences using MMSeqs2 [(Steinegger and Söding,
55
- 2017)](https://www.nature.com/articles/nbt.3988) at 90% sequence identity and 90%
56
- coverage.
57
  This process yielded 64,285 clusters encompassing a total
58
- of 484,044 chains belonging to 229,376 structures. The average
59
  number of structures per cluster is 7.53, with a median of 3.
60
- Nearly half of the clusters (31,412) contains only 1 or 2 sequences,
61
  while the largest cluster includes 1,727 homologs.
62
  The representative chain for each cluster was selected from the
63
  experimental structure with the highest resolution or best R-value.
@@ -72,11 +70,10 @@ factor of the Cα atom, and $B$ and $σ_B$ are the mean and standard
72
  deviation of $B_i$ values within the chain. Additionally, residues
73
  were labeled as interface if they participated in protein-protein
74
  or protein-DNA/RNA interactions. Protein-protein binding sites
75
- were identified using the INTerface Builder tool [(Dequeker et al.,
76
- 2017)](https://pubs.acs.org/doi/full/10.1021/acs.jcim.7b00360),
77
  where residue contacts are defined by Cα atoms within
78
  5 Å. Protein-DNA/RNA binding sites were determined as residues
79
- showing decreased accessible surface area, measured using Naccess
80
  (Hubbard and Thornton, 1993) with a 1.4 Å probe, upon binding.
81
  For each site in the representative sequence of a cluster, we
82
  recorded the number of times it was labeled as soft disordered
@@ -85,12 +82,9 @@ as missing. Similarly, we noted the number of times each site was
85
  labeled as interface.
86
 
87
 
88
- ## Dataset Structure
89
-
90
-
91
  ## Usage
92
 
93
- Data for different configurations can be loaded with the following script:
94
 
95
  ```python
96
  from datasets import load_data
@@ -98,6 +92,84 @@ from datasets import load_data
98
  dataset = load_data("CQSB/SoftDis", name=config_name)
99
  ```
100
 
101
- Available configurations are specified in the dataset metadata.
102
- If `config_name` is not specified, the default data will be loaded, containing summary information about the 64,285 clusters.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
 
 
 
 
 
 
 
 
 
 
 
32
  path: splits/id09/test.parquet
33
  ---
34
 
35
+ # SoftDis dataset
36
 
37
+ SoftDis is a dataset for the exploration of disordered regions in
38
  protein structures, and their relations with interacting sites.
39
 
40
+ The concept of soft disorder was introduced in [(Seoane and Carbone, 2021)](https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://journals.plos.org/ploscompbiol/article%3Fid%3D10.1371/journal.pcbi.1008546&ved=2ahUKEwj43OOAmISLAxW4UKQEHRszOaIQFnoECBQQAQ&usg=AOvVaw1YXiijzojYENeuv-rxtzLD),
41
  as a general term for regions in a protein identified as flexible
42
  (characterized by high B-factor) or intermittently missing across different
43
  X-ray crystal structures of the same sequence. The definition is derived from
44
  an extensive analysis of clusters of alternative structures for very similar
45
+ protein sequences in the Protein Data Bank (PDB).
46
 
47
  The current version of the dataset is based on the structures in the PDB up to 15-10-2024.
48
 
 
50
  ## Dataset construction
51
 
52
  To construct the SoftDis database, we retrieved protein
53
+ structures from the PDB archive
54
+ and clustered sequences using MMSeqs2 [(Steinegger and Söding,2017)](https://www.nature.com/articles/nbt.3988) at 90% sequence identity and 90% coverage.
 
 
55
  This process yielded 64,285 clusters encompassing a total
56
+ of 484,044 chains, belonging to 229,376 structures. The average
57
  number of structures per cluster is 7.53, with a median of 3.
58
+ Nearly half of the clusters (31,412) contain only 1 or 2 sequences,
59
  while the largest cluster includes 1,727 homologs.
60
  The representative chain for each cluster was selected from the
61
  experimental structure with the highest resolution or best R-value.
 
70
  deviation of $B_i$ values within the chain. Additionally, residues
71
  were labeled as interface if they participated in protein-protein
72
  or protein-DNA/RNA interactions. Protein-protein binding sites
73
+ were identified using the INTerface Builder tool [(Dequeker et al.,2017)](https://pubs.acs.org/doi/full/10.1021/acs.jcim.7b00360),
 
74
  where residue contacts are defined by Cα atoms within
75
  5 Å. Protein-DNA/RNA binding sites were determined as residues
76
+ showing decreased accessible surface area, measured using [Naccess](http://www.bioinf.manchester.ac.uk/naccess/)
77
  (Hubbard and Thornton, 1993) with a 1.4 Å probe, upon binding.
78
  For each site in the representative sequence of a cluster, we
79
  recorded the number of times it was labeled as soft disordered
 
82
  labeled as interface.
83
 
84
 
 
 
 
85
  ## Usage
86
 
87
+ Data for different configurations can be loaded using HuggingFace `datasets` library with the following script:
88
 
89
  ```python
90
  from datasets import load_data
 
92
  dataset = load_data("CQSB/SoftDis", name=config_name)
93
  ```
94
 
95
+ The function returns a `datasets.DatasetDict` object, whose items can be accessed by specifying the corresponding split, as in the following
96
+
97
+ ```python
98
+ # Assign splits to different datasets.Dataset objects
99
+ train_data, val_data, test_data = load_data("CQSB/SoftDis", "id05")
100
+
101
+ # Load default `train` split
102
+ train_data = load_data("CQSB/SoftDis", split="train")
103
+
104
+ # Access `train` split after loading
105
+ data = load_data("CQSB/SoftDis", "id05")
106
+ train_data = data['train']
107
+ ```
108
+
109
+ ### Available configurations
110
+
111
+ Available configurations are specified in the dataset metadata. We report details about each of them in the following table:
112
+
113
+ | Name | Splits | Num. samples | Description |
114
+ |------|--------|--------------|-------------|
115
+ | default | `train` | 64,285 | Summary data for all clusters |
116
+ | id05 | `train`, `validation`, `test` | 26,752 \| 1,155 \| 2,523 | Clusters data filtered at 50% identity |
117
+ | id07 | `train`, `validation`, `test` | 32,287 \| 1,146 \| 2,250 | Clusters data filtered at 70% identity |
118
+ | id09 | `train`, `validation`, `test` | 38,253 \| 1,068 \| 2,282 | Clusters data filtered at 90% identity |
119
+ | clusters-all | `train` | 484,044 | Detailed info for all chains in each cluster (archive) |
120
+ | clusters | `train` | 484,044 | Detailed info for all chains in each cluster (single files) |
121
+
122
+ If `config_name` is not specified, default data are loaded.
123
+
124
+ To load data for all chains, `clusters-all` configuration is recommended, since it only downloads and decompresses a single file (2.66 GB compressed). After the first download and loading, that might take some minutes, the dataset is cached locally on disk using [Arrow](https://arrow.apache.org/) framework. When needed, the cached dataset is memory-mapped directly from the disk (which offers fast lookup) instead of being loaded in memory. For more information, visit this [link](https://huggingface.co/docs/datasets/about_arrow).
125
+
126
+ `cluster` configuration can instead be useful to inpect information about one or few clusters, without the need to download the full database. Necessary files can be loaded with the following syntax:
127
+
128
+ ```python
129
+ dataset = load_data(
130
+ "CQSB/SoftDis", "clusters", data_files="clusters/train/*/4zne_E.parquet"
131
+ )
132
+ ```
133
+
134
+ Each cluster is stored as `<cluster_id>.parquet` file in a subdirectory of `clusters/train` directory. The name of the subirectory corresponds to the first 2 symbols of `<cluster_id>` (in the example, `4z`), but `*` wildcard can be also used.
135
+
136
+
137
+ ## Dataset Structure
138
+
139
+ ### Data instances
140
+
141
+ A sample item for configurations `default`, `id05`, `id07`, `id09` has the following features:
142
+ - 'id': Value(dtype='string'): cluster identifier
143
+ - 'sequence': Value(dtype='string'): protein sequence for cluster representative
144
+ - 'homologs': Sequence(feature=Value(dtype='string')): chain IDs contained in the cluster
145
+ - 'num_homologs': Value(dtype='int64'): number of chains in the cluster
146
+ - 'missing_frequency': Sequence(feature=Value(dtype='float32')): fraction of missing residues in the cluster for each position
147
+ - 'soft_disorder_frequency': Sequence(feature=Value(dtype='float32')): fraction of soft-disordered residues in the cluster for each position
148
+ - 'protein_interface_frequency': Sequence(feature=Value(dtype='float32')): fraction of residues in the cluster in a protein-protein interface for each position
149
+ - 'nucleic_acid_interface_frequency': Sequence(feature=Value(dtype='float32')): fraction of residues in the cluster in a protein-DNA/RNA interface for each position
150
+ - 'interface_frequency': Sequence(feature=Value(dtype='float32')): union of protein-protein and protein-DNA/RNA interfaces
151
+
152
+ To convert frequencies to binary labels for classification tasks, the best option is to process data with `map()` method (see documentation [here](https://huggingface.co/docs/datasets/process#map)):
153
+
154
+ ```python
155
+ # Assign positive label to soft-disordered residues
156
+ def binarize(sample):
157
+ sample["soft_disorder_class"] = (
158
+ sample["soft_disorder_frequency"] > 0
159
+ ).astype(np.int64)
160
+ return sample
161
+
162
+ dataset.set_format(type="numpy") # convert items to numpy objects
163
+ dataset = dataset.map(binarize) # apply function to all entries
164
+ ```
165
 
166
+ A sample for configurations `clusters` or `clusters-all` has instead the following features:
167
+ - 'id': Value(dtype='string'): chain identifier
168
+ - 'sequence': Value(dtype='string'): chain sequence
169
+ - 'missing': Sequence(feature=Value(dtype='bool')): boolean list of missing residues
170
+ - 'soft_disorder': Sequence(feature=Value(dtype='bool')): boolean list of soft-disordered residues
171
+ - 'protein_interface': Sequence(feature=Value(dtype='bool')): boolean list of residues at protein-protein interface
172
+ - 'nucleic_acid_interface': Sequence(feature=Value(dtype='bool')): boolean list of residues at protein-DNA/RNA interface
173
+ - 'bfactors': Sequence(feature=Value(dtype='float64')): list of B-factor for each residue (Cα atom)
174
+ - 'residue_ids': Sequence(feature=Value(dtype='string')): list of residue identifiers, as reported in PDB file
175
+ - 'coords': Sequence(feature=Sequence(feature=Value(dtype='float64', id=None))): L x 3 array with Cα coordinates. Coordinates of missing residues are set to NaN.