-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from informatics-isi-edu/Issue-229
Issue 229 - changes applied to production.
- Loading branch information
Showing
24 changed files
with
12,286 additions
and
2,068 deletions.
There are no files selected for viewing
4,942 changes: 3,534 additions & 1,408 deletions
4,942
config-scripts/annotations/annotation_config.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
2,537 changes: 2,407 additions & 130 deletions
2,537
config-scripts/annotations/dev_annotation_config.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,369 changes: 2,160 additions & 209 deletions
2,369
config-scripts/annotations/production_annotation_config.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,369 changes: 2,160 additions & 209 deletions
2,369
config-scripts/annotations/staging_annotation_config.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
config-scripts/schema-updates/ciff_extension/2024_16_update_vocab.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import sys | ||
import json | ||
from deriva.core import get_credential, DerivaServer, BaseCLI | ||
from deriva.core.ermrest_model import Key, Column, builtin_types | ||
import utils | ||
|
||
ihm_cross_link_list_linker_type_rows = [ | ||
{'Name': 'PDH', 'Description': 'PDH'}, | ||
{'Name': 'DMTMM', 'Description': 'DMTMM'} | ||
] | ||
|
||
ihm_dataset_list_data_type_rows = [ | ||
{'Name': 'Crosslinking-MS data', 'Description': 'Crosslinking-MS data'} | ||
] | ||
|
||
ihm_dataset_group_application_rows = [ | ||
{'Name': 'modeling', 'Description': 'modeling'} | ||
] | ||
|
||
ihm_dataset_related_db_reference_db_name_rows = [ | ||
{'Name': 'ProteomeXchange', 'Description': 'ProteomeXchange'} | ||
] | ||
|
||
struct_pdbx_structure_determination_methodology_rows = [ | ||
{'Name': 'computational', 'Description': 'computational'}, | ||
{'Name': 'experimental', 'Description': 'experimental'}, | ||
{'Name': 'integrative', 'Description': 'integrative'} | ||
] | ||
|
||
ihm_relaxation_time_unit_rows = [ | ||
{'Name': 'seconds', 'Description': 'seconds'}, | ||
{'Name': 'milliseconds', 'Description': 'milliseconds'}, | ||
{'Name': 'microseconds', 'Description': 'microseconds'} | ||
] | ||
|
||
ihm_equilibrium_constant_determination_method_rows = [ | ||
{'Name': 'from population', 'Description': 'from population'}, | ||
{'Name': 'from kinetic rates', 'Description': 'from kinetic rates'}, | ||
{'Name': 'other', 'Description': 'other'} | ||
] | ||
|
||
ihm_ensemble_info_model_group_superimposed_flag_rows = [ | ||
{'Name': 'YES', 'Description': 'YES'}, | ||
{'Name': 'NO', 'Description': 'NO'} | ||
] | ||
|
||
def main(server_name, catalog_id, credentials): | ||
server = DerivaServer('https', server_name, credentials) | ||
catalog = server.connect_ermrest(catalog_id) | ||
catalog.dcctx['cid'] = "oneoff/model" | ||
model = catalog.getCatalogModel() | ||
|
||
""" | ||
Create new Vocab tables | ||
""" | ||
utils.create_table_if_not_exist(model, 'Vocab', utils.define_Vocab_table('struct_pdbx_structure_determination_methodology', 'Structure determination methodology')) | ||
utils.create_table_if_not_exist(model, 'Vocab', utils.define_Vocab_table('ihm_relaxation_time_unit', 'Relaxation time unit')) | ||
utils.create_table_if_not_exist(model, 'Vocab', utils.define_Vocab_table('ihm_equilibrium_constant_determination_method', 'Method used to determine the equilibrium constant')) | ||
utils.create_table_if_not_exist(model, 'Vocab', utils.define_Vocab_table('ihm_ensemble_info_model_group_superimposed_flag', 'Model group superimposed flag')) | ||
|
||
""" | ||
Load data into new and existing vocabulary tables | ||
""" | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_cross_link_list_linker_type', ihm_cross_link_list_linker_type_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_dataset_list_data_type', ihm_dataset_list_data_type_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_dataset_group_application', ihm_dataset_group_application_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_dataset_related_db_reference_db_name', ihm_dataset_related_db_reference_db_name_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'struct_pdbx_structure_determination_methodology', struct_pdbx_structure_determination_methodology_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_relaxation_time_unit', ihm_relaxation_time_unit_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_equilibrium_constant_determination_method', ihm_equilibrium_constant_determination_method_rows) | ||
utils.add_rows_to_vocab_table(catalog, 'ihm_ensemble_info_model_group_superimposed_flag', ihm_ensemble_info_model_group_superimposed_flag_rows) | ||
|
||
if __name__ == '__main__': | ||
args = BaseCLI("ad-hoc table creation tool", None, 1).parse_cli() | ||
credentials = get_credential(args.host, args.credential_file) | ||
|
||
main(args.host, 1, credentials) | ||
|
Oops, something went wrong.