You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getstarted.md
+65Lines changed: 65 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -412,3 +412,68 @@ fig.update_layout(
412
412
title='Loss vs epochs'
413
413
)
414
414
```
415
+
416
+
## Testing new data
417
+
418
+
If new PDB files need to be tested with a pre-trained model, the first step would be to process and save them into HDF5 files. Let's suppose that the model has been trained with `ProteinProteinInterfaceResidueQuery` queries mapped to graphs:
419
+
420
+
```python
421
+
from deeprank2.query import QueryCollection, ProteinProteinInterfaceResidueQuery
422
+
423
+
queries = QueryCollection()
424
+
425
+
# Append data points
426
+
queries.add(ProteinProteinInterfaceResidueQuery(
427
+
pdb_path="<new_pdb_file1.pdb>",
428
+
chain_id1="A",
429
+
chain_id2="B"
430
+
))
431
+
queries.add(ProteinProteinInterfaceResidueQuery(
432
+
pdb_path="<new_pdb_file2.pdb>",
433
+
chain_id1="A",
434
+
chain_id2="B"
435
+
))
436
+
437
+
hdf5_paths = queries.process(
438
+
"<output_folder>/<prefix_for_outputs>",
439
+
feature_modules='all')
440
+
```
441
+
442
+
Then, the GraphDataset instance representing the testing set can be defined. Note that there is no need of setting the dataset's parameters, since they are inherited from the information saved in the pre-trained model.
443
+
444
+
```python
445
+
from deeprank2.dataset import GraphDataset
446
+
447
+
dataset_test = GraphDataset(
448
+
hdf5_path="<output_folder>/<prefix_for_outputs>",
449
+
train=False,
450
+
train_data="<pretrained_model_path>"
451
+
)
452
+
```
453
+
454
+
Finally, the Trainer instance can be defined and the new data can be tested:
455
+
456
+
```python
457
+
from deeprank2.trainer import Trainer
458
+
from deeprank2.neuralnets.gnn.naive_gnn import NaiveNetwork
459
+
from deeprank2.utils.exporters import HDF5OutputExporter
0 commit comments