diff --git a/actions/ost-compare-structures b/actions/ost-compare-structures index f94d79bc10168f7fe698af8c7e8f82eb34b5608a..dce074bfa90beab4c358631b96f169a470ecc416 100644 --- a/actions/ost-compare-structures +++ b/actions/ost-compare-structures @@ -277,6 +277,13 @@ def _ParseArgs(): "https://github.com/kliment-olechnovic/voronota). Searches PATH " "if not set.")) + parser.add_argument( + "--usalign-exec", + dest="usalign_exec", + default=None, + help=("Path to USalign executable to compute TM-score. If not given, " + "an OpenStructure internal copy of USalign code is used.")) + parser.add_argument( "--qs-score", dest="qs_score", @@ -346,6 +353,16 @@ def _ParseArgs(): "as string in form <num><inscode>. The respective scores are " "available as keys \"patch_qs\" and \"patch_dockq\"")) + parser.add_argument( + "--tm-score", + dest="tm_score", + default=False, + action="store_true", + help=("Computes TM-score with the USalign tool. Also computes a " + "chain mapping in case of complexes that is stored in the " + "same format as the default mapping. TM-score and the mapping " + "are available as keys \"tm_score\" and \"usalign_mapping\"")) + return parser.parse_args() def _Rename(ent): @@ -483,7 +500,8 @@ def _Process(model, reference, args): scorer = scoring.Scorer(model, reference, resnum_alignments = args.residue_number_alignment, cad_score_exec = args.cad_exec, - custom_mapping = mapping) + custom_mapping = mapping, + usalign_exec = args.usalign_exec) ir = _GetInconsistentResidues(scorer.aln) if len(ir) > 0 and args.enforce_consistency: @@ -559,6 +577,10 @@ def _Process(model, reference, args): out["patch_qs"] = scorer.patch_qs out["patch_dockq"] = scorer.patch_dockq + if args.tm_score: + out["tm_score"] = scorer.tm_score + out["usalign_mapping"] = scorer.usalign_mapping + if args.dump_structures: try: io.SavePDB(scorer.model, model.GetName() + args.dump_suffix) diff --git a/modules/doc/actions.rst b/modules/doc/actions.rst index c8ddb6da55fd59742a6c9f728228f1f36f8757ed..3b6fdc277bd16506e5229c516eaf3d9d080766a3 100644 --- a/modules/doc/actions.rst +++ b/modules/doc/actions.rst @@ -250,6 +250,12 @@ Details on the usage (output of ``ost compare-structures --help``): Residues are represented as string in form <num><inscode>. The respective scores are available as keys "patch_qs" and "patch_dockq" + --tm-score Computes TM-score with the USalign tool. Also computes + a chain mapping in case of complexes that is stored + in the same format as the default mapping. TM-score + and the mapping are available as keys "tm_score" and + "usalign_mapping" + .. _ost compare ligand structures: