diff --git a/.gitignore b/.gitignore index 6c7a0af..2c518a9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.pyc test-results /.idea +.github \ No newline at end of file diff --git a/ovo_proteindj/components/workflow_visualization_components.py b/ovo_proteindj/components/workflow_visualization_components.py index 6a18899..b7e03d6 100644 --- a/ovo_proteindj/components/workflow_visualization_components.py +++ b/ovo_proteindj/components/workflow_visualization_components.py @@ -372,9 +372,10 @@ def visualize_binder_design_structure(design_id: str): # TODO use target spec for this # Note this assumes that the target chain is B in the RFdiffusion output PDB, # and that the residue numbers are same as in the input PDB + target_chain = workflow.get_target_chain() hotspot_selections = ( - [h.replace(workflow.target_chain, "B") for h in workflow.get_hotspots().split(",")] - if workflow.get_hotspots() and workflow.target_chain + [h.replace(target_chain, "B") for h in workflow.get_hotspots().split(",")] + if workflow.get_hotspots() and target_chain else None ) diff --git a/ovo_proteindj/logic.py b/ovo_proteindj/logic.py index 100cd7a..9864983 100644 --- a/ovo_proteindj/logic.py +++ b/ovo_proteindj/logic.py @@ -32,13 +32,37 @@ def process_workflow_results(job: DesignJob, callback: Callable = None) -> list[ assert job.workflow.is_instance(models_proteindj.ProteinDJDesignWorkflow), ( "This function expects a ProteinDJDesignWorkflow instance, got: {}".format(type(job.workflow).__name__) ) + + # Get source directory + source_dir = scheduler.get_output_dir(job.job_id) + run_dir = os.path.join(source_dir, "run") + + # Auto-detect or use configured fold directory + fold_dir = job.workflow.params.get('fold_method', 'rfd') + + # Auto-detect or use configured sequence design directory + seq_dir = job.workflow.params.get('seq_method') + if not seq_dir: + for option in ["fampnn", "mpnn"]: + if os.path.exists(os.path.join(run_dir, option)): + seq_dir = option + break + + # Auto-detect or use configured structure prediction directory + pred_dir = job.workflow.params.get('pred_method') + if not pred_dir: + for option in ["af2", "boltz"]: + if os.path.exists(os.path.join(run_dir, option)): + pred_dir = option + break + return process_proteindj_output_dir( job=job, pool=pool, - source_dir=scheduler.get_output_dir(job.job_id), - fold_dir="rfd", - seq_dir=job.workflow.params.seq_method, - pred_dir=job.workflow.params.pred_method, + source_dir=source_dir, + fold_dir=fold_dir, + seq_dir=seq_dir, + pred_dir=pred_dir, callback=callback, ) diff --git a/ovo_proteindj/models_proteindj.py b/ovo_proteindj/models_proteindj.py index 61f7081..d1d295e 100644 --- a/ovo_proteindj/models_proteindj.py +++ b/ovo_proteindj/models_proteindj.py @@ -14,7 +14,7 @@ # Pipeline version # tag or commit ID from https://github.com/PapenfussLab/proteindj -PIPELINE_VERSION = "5db7c4e6b9507ebfdcd20090ebb3eef544abe27c" +PIPELINE_VERSION = "v2.1.1" # Get default pipeline params from OVO config plugin_config = config.plugins.get(__package__, {})