Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 authored Oct 15, 2024
1 parent f89b6d2 commit 3b27d50
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions wwpdb/utils/nmr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ NmrDpUtility accepts unified NMR data file as primary data source by default. Th
util.setLog(data_dir_path + entry_id + '-nef-consistency-log.json')
util.op('nmr-nef-consistency-check')
```
where *setSource()* and *setLog()* are methods to add unified NMR data file and log file. The last *op()* runs designated tasks. The other source files, such as coordinate file, chemical shift files, and restraint files, should be set through the following method. NmrDpUtility supports combining assigned chemical shifts and NMR restraints into single NMR data file.
where **setSource()** and **setLog()** are methods to add unified NMR data file and log file. The last **op()** runs designated tasks. The other source files, such as coordinate file, chemical shift files, and restraint files, should be set through the following method. NmrDpUtility supports combining assigned chemical shifts and NMR restraints into single NMR data file.

3. Add input file path and parameters

Expand All @@ -36,22 +36,22 @@ Any input file paths and parameters should be set through *addInput()* method:
def addInput(self, name=None, value=None, type='file')
```

'name' should be chosen from effective names shown in a table below, and 'type' should be chosen from ('param', 'file', 'file_list', and 'file_dict_list'). At first, 'param' is used to set a named parameter, Next, 'file' and 'file_list' are used to specify single file path and multiple file paths respectively, whereas their file types are automatically decided by the 'name'. For example, 'pdbx' for coordinate file and 'nmr-star' for chemical shift file(s). Finally, 'file_dict_list' indicates 'value' is a list of dictionary, {'file_name': ?, 'file_type': ?, 'original_file_name' (optional): ?}, and used to set multiple file paths with each file type and optionally the author provided original file name.
The 'name' argument should be chosen from effective names shown in a table below, and the 'type' argument should be chosen from ('param', 'file', 'file_list', and 'file_dict_list'). At first, 'param' is used to set a named parameter, Next, 'file' and 'file_list' are used to specify single file path and multiple file paths respectively, whereas their file types are automatically decided by the 'name'. For example, 'pdbx' for coordinate file and 'nmr-star' for chemical shift file(s). Finally, 'file_dict_list' indicates 'value' is a list of dictionary, {'file_name': ?, 'file_type': ?, 'original_file_name' (optional): ?}, and used to set multiple file paths with each file type and optionally the author provided original file name.

name|effective type|description
----|--------------|-----------
coordinate_file_path|file|Set a PDBx/mmCIF coordinate file. The file type is 'pdbx' by default.
proc_coord_file_path|file|Set spare coordinate file for the case 'coordinate_file_path' is not accessible. Otherwise, it is unnecessary,
proc_coord_file_path|file|Set spare coordinate file for the case 'coordinate_file_path' is not accessible. Otherwise, it is **unnecessary**,
chem_shift_path_list|file_list, file_dict_list|Set chemical shift file(s), formally we accepted multiple chemical shift files. The file type is 'nmr-star'.
restraint_file_path_list|file_list, file_dict_list|Set NMR restraint files in NMR-STAR format so that the file type is 'nmr-star'.
atypical_restraint_file_path_list|file_dict_list|Set software-native formatted NMR restraint files or spectral peak list files. The file types are set by the dictionary as described above.
report_file_path|file|Set input report file path of generated by the previous data checking task ('nmr-nef-consistency-check', 'nmr-str-consistency-check', 'nmr-cs-nef-consistency-check', 'nmr-cs-str-consistency-check').
nmr_cif_file_path|file|Set CIF formatted NMR unified data file path. NOTE: used for BMRB internal processing.
remediation|param|Boolean value. True for legacy separated data file deposition. False for native NMR unified data file deposition/
remediation|param|Boolean value. True for legacy separated data file deposition. False for native NMR unified data file deposition.
internal|param|Boolean value. Set internal mode. NOTE: used for internal only.
bmrb_only|param|Boolean value. Set BMRB only mode. NOTE: used for BMRB only.
bmrb_id|param|Set BMRB ID. NOTE: used for BMRB only.
merge_any_pk_as_is|param|Boolean value. Must be True until NMR data remediation (Phase 2),
merge_any_pk_as_is|param|Boolean value. Must be True until NMR data remediation (Phase 2).
nonblk_anomalous_cs|param|Boolean value. True for OneDep system because any anomalous chemical shift values should not be blocker.
nonblk_bad_nterm|param|Boolean value. True for OneDep system because biocurator can handle atom name inconsistency of N-terminus residue.
update_poly_seq|param|Boolean value. True for OneDep system.
Expand All @@ -63,57 +63,56 @@ transl_pseudo_name|param|Boolean value. False for OneDep system. Whether to conv
tolerant_seq_align|param|Boolean value. Set True for 'nmr-str-consistency-check', 'nmr-str2str-deposit', 'nmr-str2cif-deposit', 'nmr-str2nef-release', and 'nmr-str2cif-annotate' workflow operations. Whether to ignore sequence alignment error due to residue variant.
fix_format_issue|param|Boolean value. True for legacy separated file data file deposition or release mode.
excl_missing_data|param|Boolean value. True for legacy separated file data file deposition. Whether to exclude missing mandatory data.
cmpl_missing_data|param|Boolean value. True for legacy separated file data file deposition. Whether to complement missing data (add missing pseudo atoms in NMR restraints)
cmpl_missing_data|param|Boolean value. True for legacy separated file data file deposition. Whether to complement missing data. (add missing pseudo atoms in NMR restraints in actual)
trust_pdbx_nmr_ens|param|Boolean value. True for release mode. Whether to trust pdbx_nmr_ensemble to get total number of models.
rmsd_not_superimposed|param|Positive floating-point value. Criterion for detection of not superimposed model. (default value is 2.0 Å)
rmsd_overlaid_exactly|param|Positive floating-potnt value. Criterion for detection of exactly overlaid models. (default value is 0.01 Å)

4. Add primary output file path, other output file path and parameters

NmrDpUtility outputs processed data source file as primary output. The primary output file path /should be specified by *setDestination()* method. When you select NEF The other output file path and parameters should be set through *addOutput()* method:
NmrDpUtility outputs processed data source file as primary output. The primary output file path should be specified by **setDestination()** method. When you select NEF The other output file path and parameters should be set through **addOutput()** method:

```python
def addOutput(self, name=None, value=None, type='file')

```

'name' should be chosen from effective names shown in a table below, and 'type' should be chosen from ('param', 'file', and 'file_list'). At first, 'param' is used to set a named parameter, Next, 'file' and 'file_list' are used to specify single file path and multiple file paths respectively, whereas their file types are automatically decided by the 'name'. For example, 'pdbx' for coordinate file and 'nmr-star' for chemical shift file(s).
The argument 'name' should be chosen from effective names shown in a table below, and the 'type' argument should be chosen from ('param' and 'file'). At first, 'param' is used to set a named parameter, Next, 'file' is used to specify output file path.

name|effective type|description
----|--------------|-----------
nmr_cif_file_path|file|Set CIF formatted NMR-STAR unified data file. Effective in 'nmr-nef2cif-deposit', 'nmr-str2cif-deposit', and 'nmr-str2cif-annotate' workflow operations.
nmr-star_file_path|file|Set NMR-STAR unified data file. Effective in 'nmr-nef2str-deposit', and 'nmr-nef2cif-deposit' workflow operations.
report_file_path|file|Set auxiliary report file path when setLog() is occupied for the previous task.
report_file_path|file|Set auxiliary report file path when setLog() is occupied for the previous main task.
entry_id|param|Set entry ID. (default value is extracted from coordinate file if available, otherwise, 'UNNAMED')
retain_original|param|Boolean value. True by default. Whether to retain original content if possible.
leave_intl_note|param|Boolean value. True by default. Whether to leave internal commentary note in processed NMR-STAR file.
reduced_atom_notation|param|Boolean value. True by default. Whether to use reduced atom notation in warning/error message.

5. Invoke defined workflow operation

After the input and output resources are complete, calling **op()** for a particular workflow operation performs a series of data processing.

A series of data processing will executed When invoke *op()* for a given workflow operations.

op() 's argument|role
----------------|-----------
workflow operation|role
------------------|----
nmr-nef-consistency-check|Validate NEF data file
nmr-str-consistency-check|Validate NMR-STAR data file
nmr-nef2str-deposit|Convert NEF to NMR-STAR file
nmr-nef2cif-deposit|Convert NEF to NMR-STAR and CIF formatted NMR-STAR file for OneDep system
nmr-str2str-deposit|Convert NMR-STAR file
nmr-str2cif-deposit|Convert NMR-STAR file and generate CIF formatted NMR-STAR file for OneDep system
nmr-str2nef-release|Convert NMR-STAR file to NEF for OneDep release module.
nmr-cs-nef-consistency-check|Deprecated.
nmr-cs-str-consistency-check|Deprecated.
nmr-cs-mr-merge|Combine assigned chemical shifts and NMR restraints into NMR unified data file.
nmr-cs-nef-consistency-check|**Deprecated.**
nmr-cs-str-consistency-check|**Deprecated.**
nmr-cs-mr-merge|Combine assigned chemical shifts and NMR restraints into an NMR unified data file.
nmr-str2cif-annotate|OneDep system only, Update NMR-STAR file based on annotated model file.

## Typical workflow operations

As of now, OneDep supports single NMR data file deposition using NMR unified data file in NEF or NMR-STAR and conventional separated NMR data file deposition requires assigned chemical shift file and set of NMR restraint files.
As of now, OneDep supports (i) single NMR data file deposition using NMR unified data file in NEF or NMR-STAR and (ii) conventional separated NMR data file deposition requiring assigned chemical shift file and set of NMR restraint files.

### Single NMR data file deposition
### (i) Single NMR data file deposition

At first, NMR unified data file must be validated and cross-checked by given coordinate file. Then, file conversion workflow will follow where report file is required as input source.
At first, NMR unified data file must be validated and cross-checked by given coordinate file. Then, file conversion workflow will follow where report file generated by data checking workflow is required as input source.

For example, NEF to CIF formatted NMR-STAR file conversion

Expand Down Expand Up @@ -180,9 +179,9 @@ As for NMR-STAR (NMR unified data) to CIF formatted NMR-STAR file conversion
util.op('nmr-str2cif-deposit')
```

### Separated NMR data file deposition
### (ii) Separated NMR data file deposition

Conventional NMR deposition to OneDep system accepts assigned chemical shift file and software native restraint files and combined contents into NMR unified data file.
Conventional NMR deposition requires assigned chemical shift file and software native restraint files. The OneDep system can combine these NMR data into an NMR unified data file that is achived by running 'nmr-cs-mr-merge' workflow operation.

```python
model_file_path = 'D_1000259961_model-upload_P1.cif.V1'
Expand All @@ -206,14 +205,13 @@ Conventional NMR deposition to OneDep system accepts assigned chemical shift fil
util.setVerbose(False)

util.op('nmr-cs-mr-merge')

```

The result combined NMR-STAR file will be validated as NMR unified data file using 'nmr-str-consistency-check' and 'nmr-str2cif-deposit' workflow operations in OneDep system.
The result combined NMR-STAR file will be validated as if NMR unified data file deposition by following 'nmr-str-consistency-check' and 'nmr-str2cif-deposit' workflow operations.

## Structure of JSON report file
## Reference of report file

Structure of NmrDpUtility’s report file is declared in [JSON Schema file](../tests-nmr/json-schema/nmr-restraints-report-schema.json). [NmrDpReport class](NmrDpReport.py) handles writing and reading the report file.
Structure of NmrDpUtility’s report file is defined in [JSON Schema file](../tests-nmr/json-schema/nmr-restraints-report-schema.json). [NmrDpReport class](NmrDpReport.py) handles writing and reading the report file.

## Appendix

Expand All @@ -240,4 +238,3 @@ nm-res-syb|nm-res-syb|Restraint file in SYBYL format
nm-res-xpl|nm-res-xpl|Restraint file in XPLOR-NIH format
nm-res-oth|nm-res-oth|Restraint file in other format
nm-pea-any|nm-pea-any|Any spectral peak list file

0 comments on commit 3b27d50

Please sign in to comment.