Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
1d0ebac0
Commit
1d0ebac0
authored
2 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
enable custom chain mappings in compare-structures action
parent
e08c77a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
actions/ost-compare-structures-new
+19
-2
19 additions, 2 deletions
actions/ost-compare-structures-new
with
19 additions
and
2 deletions
actions/ost-compare-structures-new
+
19
−
2
View file @
1d0ebac0
...
...
@@ -43,6 +43,10 @@ Example to compute local and per-residue lDDT values as well as QS-score:
ost compare-structures-new -m model.pdb -r reference.cif --lddt --local-lddt \
--qs-score
Example to inject custom chain mapping
ost compare-structures-new -m model.pdb -r reference.cif -c A:B B:A
"""
import argparse
...
...
@@ -149,6 +153,16 @@ def _ParseArgs():
action="store_true",
help=("Fault tolerant parsing."))
parser.add_argument(
"-c",
"--chain-mapping",
nargs="+",
dest="chain_mapping",
help=("Custom mapping of chains between the reference and the model. "
"Each separate mapping consist of key:value pairs where key "
"is the chain name in reference and value is the chain name in "
"model."))
parser.add_argument(
"--lddt",
dest="lddt",
...
...
@@ -354,10 +368,14 @@ def _InterfaceResiduesToJSONDict(interface_dict):
def _Process(model, reference, args):
mapping = None
if args.chain_mapping is not None:
mapping = {x.split(':')[0]: x.split(':')[1] for x in args.chain_mapping}
scorer = scoring.Scorer(model, reference,
resnum_alignments = args.residue_number_alignment,
cad_score_exec = args.cad_exec)
cad_score_exec = args.cad_exec,
custom_mapping = mapping)
ir = _GetInconsistentResidues(scorer.aln)
if len(ir) > 0 and args.enforce_consistency:
...
...
@@ -427,7 +445,6 @@ def _Process(model, reference, args):
io.SavePDB(scorer.model, model.GetName() + args.dump_suffix)
io.SavePDB(scorer.target, reference.GetName() + args.dump_suffix)
return out
def _Main():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment