Datasets:

File size: 9,102 Bytes
74ffd2a
 
 
8cea212
74ffd2a
9e71bdf
 
 
74ffd2a
 
 
8cea212
74ffd2a
8cea212
74ffd2a
8cea212
74ffd2a
 
 
8cea212
74ffd2a
8cea212
74ffd2a
8cea212
74ffd2a
 
 
8cea212
74ffd2a
8cea212
74ffd2a
8cea212
74ffd2a
 
195ac7c
74ffd2a
195ac7c
9e71bdf
 
195ac7c
9e71bdf
 
 
 
195ac7c
9e71bdf
 
74ffd2a
 
9e71bdf
74ffd2a
9e71bdf
195ac7c
 
9e71bdf
195ac7c
9e71bdf
195ac7c
9e71bdf
 
 
 
 
74ffd2a
9e71bdf
 
 
 
 
 
 
 
195ac7c
9e71bdf
 
195ac7c
9e71bdf
 
 
 
 
 
74ffd2a
 
9e71bdf
 
195ac7c
9e71bdf
 
1be2233
9e71bdf
1be2233
9e71bdf
 
195ac7c
 
 
 
1be2233
195ac7c
 
1be2233
195ac7c
 
1be2233
195ac7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1be2233
195ac7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e71bdf
195ac7c
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
configs:
- config_name: default
  data_files: default/data.parquet
- config_name: clusters
  data_dir: clusters
- config_name: clusters-all
  data_dir: clusters-all
- config_name: id05
  data_files:
  - split: train
    path: splits/id05/train.parquet
  - split: validation
    path: splits/id05/valid.parquet
  - split: test
    path: splits/id05/test.parquet
- config_name: id07
  data_files:
  - split: train
    path: splits/id07/train.parquet
  - split: validation
    path: splits/id07/valid.parquet
  - split: test
    path: splits/id07/test.parquet
- config_name: id09
  data_files:
  - split: train
    path: splits/id09/train.parquet
  - split: validation
    path: splits/id09/valid.parquet
  - split: test
    path: splits/id09/test.parquet
---

# SoftDis dataset

SoftDis is a dataset for the exploration of disordered regions in 
protein structures, and their relations with interacting sites. 

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), 
as a general term for regions in a protein identified as flexible 
(characterized by high B-factor) or intermittently missing across different 
X-ray crystal structures of the same sequence. The definition is derived from 
an extensive analysis of clusters of alternative structures for very similar 
protein sequences in the Protein Data Bank (PDB).  

The current version of the dataset is based on the structures in the PDB up to 15-10-2024.


## Dataset construction

To construct the SoftDis database, we retrieved protein
structures from the PDB archive
and clustered sequences using MMSeqs2 [(Steinegger and Söding,2017)](https://www.nature.com/articles/nbt.3988) at 90% sequence identity and 90% coverage.  
This process yielded 64,285 clusters encompassing a total
of 484,044 chains, belonging to 229,376 structures. The average
number of structures per cluster is 7.53, with a median of 3.
Nearly half of the clusters (31,412) contain only 1 or 2 sequences,
while the largest cluster includes 1,727 homologs.  
The representative chain for each cluster was selected from the
experimental structure with the highest resolution or best R-value.
For protein complexes, individual chains were analyzed separately
and assigned to their respective clusters.

Residues in each chain were labeled as missing if annotated
under REMARK 465 in the PDB file. A residue was classified
as soft disordered if it was either missing or had a normalized
B-factor $b_i = (B_i − B)/σ_B > 3$, where $B_i$ represents the B-
factor of the Cα atom, and $B$ and $σ_B$ are the mean and standard
deviation of $B_i$ values within the chain. Additionally, residues
were labeled as interface if they participated in protein-protein
or protein-DNA/RNA interactions. Protein-protein binding sites
were identified using the INTerface Builder tool [(Dequeker et al.,2017)](https://pubs.acs.org/doi/full/10.1021/acs.jcim.7b00360), 
where residue contacts are defined by Cα atoms within
5 Å. Protein-DNA/RNA binding sites were determined as residues
showing decreased accessible surface area, measured using [Naccess](http://www.bioinf.manchester.ac.uk/naccess/)
(Hubbard and Thornton, 1993) with a 1.4 Å probe, upon binding.
For each site in the representative sequence of a cluster, we
recorded the number of times it was labeled as soft disordered
across all chains in the cluster, excluding sites consistently labeled
as missing. Similarly, we noted the number of times each site was
labeled as interface. 


## Usage

Data for different configurations can be loaded using HuggingFace `datasets` library with the following script:

```python
from datasets import load_dataset

dataset = load_dataset("CQSB/SoftDis", name=config_name)
```

The function returns a `datasets.DatasetDict` object, whose items can be accessed by specifying the corresponding split, as in the following

```python
# Assign splits to different datasets.Dataset objects
train_data, val_data, test_data = load_dataset("CQSB/SoftDis", "id05")

# Load default `train` split
train_data = load_dataset("CQSB/SoftDis", split="train")

# Access `train` split after loading
data = load_dataset("CQSB/SoftDis", "id05")
train_data = data['train']
```

### Available configurations

Available configurations are specified in the dataset metadata. We report details about each of them in the following table:

| Name | Splits | Num. samples | Description |
|------|--------|--------------|-------------|
| default | `train` | 64,285 | Summary data for all clusters |
| id05 | `train`, `validation`, `test` | 26,752 \| 1,155 \| 2,523 | Clusters data filtered at 50% identity |
| id07 | `train`, `validation`, `test` | 32,287 \| 1,146 \| 2,250 | Clusters data filtered at 70% identity |
| id09 | `train`, `validation`, `test` | 38,253 \| 1,068 \| 2,282 | Clusters data filtered at 90% identity |
| clusters-all | `train` | 484,044 | Detailed info for all chains in each cluster (archive) |
| clusters | `train` | 484,044 | Detailed info for all chains in each cluster (single files) |

If `config_name` is not specified, default data are loaded. 

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).

`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:

```python
dataset = load_dataset(
    "CQSB/SoftDis", "clusters", data_files="clusters/train/*/4zne_E.parquet"
)
```

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.


## Dataset Structure

### Data instances

A sample item for configurations `default`, `id05`, `id07`, `id09` has the following features:
- 'id': Value(dtype='string'): cluster identifier
- 'sequence': Value(dtype='string'): protein sequence for cluster representative
- 'homologs': Sequence(feature=Value(dtype='string')): chain IDs contained in the cluster
- 'num_homologs': Value(dtype='int64'): number of chains in the cluster
- 'missing_frequency': Sequence(feature=Value(dtype='float32')): fraction of missing residues in the cluster for each position
- 'soft_disorder_frequency': Sequence(feature=Value(dtype='float32')): fraction of soft-disordered residues in the cluster for each position
- 'protein_interface_frequency': Sequence(feature=Value(dtype='float32')): fraction of residues in the cluster in a protein-protein interface for each position
- 'nucleic_acid_interface_frequency': Sequence(feature=Value(dtype='float32')): fraction of residues in the cluster in a protein-DNA/RNA interface for each position
- 'interface_frequency': Sequence(feature=Value(dtype='float32')): union of protein-protein and protein-DNA/RNA interfaces

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)):

```python
# Assign positive label to soft-disordered residues
def binarize(sample):
    sample["soft_disorder_class"] = (
        sample["soft_disorder_frequency"] > 0
    ).astype(np.int64)
    return sample

dataset.set_format(type="numpy")  # convert items to numpy objects
dataset = dataset.map(binarize)   # apply function to all entries
```

A sample for configurations `clusters` or `clusters-all` has instead the following features:
- 'id': Value(dtype='string'): chain identifier
- 'sequence': Value(dtype='string'): chain sequence
- 'missing': Sequence(feature=Value(dtype='bool')): boolean list of missing residues
- 'soft_disorder': Sequence(feature=Value(dtype='bool')): boolean list of soft-disordered residues
- 'protein_interface': Sequence(feature=Value(dtype='bool')): boolean list of residues at protein-protein interface
- 'nucleic_acid_interface': Sequence(feature=Value(dtype='bool')): boolean list of residues at protein-DNA/RNA interface
- 'bfactors': Sequence(feature=Value(dtype='float64')): list of B-factor for each residue (Cα atom)
- 'residue_ids': Sequence(feature=Value(dtype='string')): list of residue identifiers, as reported in PDB file
- '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.