Skip to content
Snippets Groups Projects
Commit 489e84b2 authored by Rafal Gumienny's avatar Rafal Gumienny
Browse files

fix: SCHWED-3121 Consistency check performed on renumbered entities

parent f6d06f3e
Branches
Tags
No related merge requests found
...@@ -75,6 +75,7 @@ from ost import PushVerbosityLevel ...@@ -75,6 +75,7 @@ from ost import PushVerbosityLevel
from ost.mol.alg import (qsscoring, Molck, MolckSettings, lDDTSettings, from ost.mol.alg import (qsscoring, Molck, MolckSettings, lDDTSettings,
CheckStructure, ResidueNamesMatch) CheckStructure, ResidueNamesMatch)
from ost.conop import CompoundLib from ost.conop import CompoundLib
from ost.seq.alg.renumber import Renumber
class _DefaultStereochemicalParamAction(argparse.Action): class _DefaultStereochemicalParamAction(argparse.Action):
...@@ -449,11 +450,11 @@ def _RevertChainNames(ent): ...@@ -449,11 +450,11 @@ def _RevertChainNames(ent):
ost.LogInfo("Reverted chains: %s" % ", ".join(rev_out)) ost.LogInfo("Reverted chains: %s" % ", ".join(rev_out))
def _CheckConsistency(reference, model, chain_mapping, log_error): def _CheckConsistency(alignments, log_error):
is_cons = True is_cons = True
for ref_cname, mdl_cname in chain_mapping.iteritems(): for alignment in alignments:
ref_chain = reference.Select("cname=%s" % ref_cname) ref_chain = Renumber(alignment.GetSequence(0)).CreateFullView()
mdl_chain = model.Select("cname=%s" % mdl_cname) mdl_chain = Renumber(alignment.GetSequence(1)).CreateFullView()
is_cons = ResidueNamesMatch(ref_chain, mdl_chain, log_error) is_cons = ResidueNamesMatch(ref_chain, mdl_chain, log_error)
return is_cons return is_cons
...@@ -669,9 +670,7 @@ def _Main(): ...@@ -669,9 +670,7 @@ def _Main():
ost.LogInfo("Checking consistency between %s and %s" % ( ost.LogInfo("Checking consistency between %s and %s" % (
model_name, reference_name)) model_name, reference_name))
is_cons = _CheckConsistency( is_cons = _CheckConsistency(
reference, qs_scorer.alignments,
model,
qs_scorer.chain_mapping,
opts.consistency_checks) opts.consistency_checks)
reference_results["info"]["residue_names_consistent"] = is_cons reference_results["info"]["residue_names_consistent"] = is_cons
reference_results["info"]["mapping"] = { reference_results["info"]["mapping"] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment