diff --git a/convert_to_modelcif.py b/convert_to_modelcif.py index 97a3f0e0bff8a295bb0e9b27bcc5c27067241ab3..3a01fc9d72dbec15ffb147f063f0e782713fca5b 100755 --- a/convert_to_modelcif.py +++ b/convert_to_modelcif.py @@ -318,10 +318,9 @@ def _get_modelcif_ref_dbs(meta_json): db_name = db_name.lower() # if DB already exists, check URL and version if db_name in sdb_dct: - print("ALREADY THERE", sdb_dct[db_name]) # ToDo: switch URL to the actual URL read from JSON if ( - sdb_dct[db_name].version == vdct["version"] + sdb_dct[db_name].version != vdct["version"] or sdb_dct[db_name].url != db_info[db_name]["url"] ): raise RuntimeError( @@ -376,6 +375,7 @@ def _store_as_modelcif( ) # create software list from feature metadata + # ToDo: store_as_modelcif should not use __meta__ sw_dct = _get_software_data(data_json["__meta__"]) # process scores @@ -730,25 +730,20 @@ def _get_protocol_steps(modelcif_json): """Create the list of protocol steps with software and parameters used.""" protocol = [] # MSA/ monomer feature generation step - # ToDo: get software from modelcif_json step = { "method_type": "coevolution MSA", "step_name": "MSA generation", "details": "Create sequence features for corresponding monomers.", "input_data_group": "target_sequences", "output_data_group": "monomer_pickle_files", - "software_group": [ - "AlphaPulldown", - "AlphaFold", - "jackhmmer", - "hhblits", - "hhsearch", - "hmmsearch", - "hmmbuild", - "kalign", - ] + "software_group": [] # _ma_protocol_step.protocol_id } + for sftwr in modelcif_json["__meta__"].values(): + sftwr = sftwr["software"] + for tool in sftwr: + if tool not in step["software_group"]: + step["software_group"].append(tool) protocol.append(step) # modelling step