Skip to content

Commit

Permalink
Merge pull request #50 from scipion-em/rm_fix_plot
Browse files Browse the repository at this point in the history
show avg and std of all data not only the selected
  • Loading branch information
mmmtnez committed Jun 4, 2021
2 parents 6600cc2 + 3ed2447 commit afd027a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
58 changes: 29 additions & 29 deletions phenix/protocols.conf
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[PROTOCOLS]
Protocols SPA = [
{"tag": "section", "text": "Tools", "openItem": "False", "children": [
{"tag": "protocol_group", "text": "Calculators", "openItem": "False", "children": [
{"tag": "protocol", "value": "PhenixProtRunSuperposePDBs", "text": "default"}
]}
]}]
{"tag": "section", "text": "Tools", "openItem": "False", "children": [
{"tag": "protocol_group", "text": "Calculators", "openItem": "False", "children": [
{"tag": "protocol", "value": "PhenixProtRunSuperposePDBs", "text": "default"}
]}
]}]
Model building = [
{"tag": "section", "text": "Imports", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Preprocess map", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Initial model", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Rigid fitting", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunDockInMap", "text": "default"},
{"tag": "protocol", "value": "PhenixProtSearchFit", "text": "default"}
]},
{"tag": "section", "text": "Flexible fitting", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunRSRefine", "text": "default"}
]},
{"tag": "section", "text": "Validation", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunEMRinger", "text": "default"},
{"tag": "protocol", "value": "PhenixProtRunMolprobity", "text": "default"},
{"tag": "protocol", "value": "PhenixProtRunValidationCryoEM", "text": "default"}
]},
{"tag": "section", "text": "Tools-Calculators", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunSuperposePDBs", "text": "default"}
]},
{"tag": "section", "text": "Others", "icon": "bookmark.png", "children": [
]}
]
{"tag": "section", "text": "Imports", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Preprocess map", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Initial model", "icon": "bookmark.png", "children": [
]},
{"tag": "section", "text": "Rigid fitting", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunDockInMap", "text": "default"}
]},
{"tag": "section", "text": "Flexible fitting", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunRSRefine", "text": "default"},
{"tag": "protocol", "value": "PhenixProtSearchFit", "text": "default"}
]},
{"tag": "section", "text": "Validation", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunEMRinger", "text": "default"},
{"tag": "protocol", "value": "PhenixProtRunMolprobity", "text": "default"},
{"tag": "protocol", "value": "PhenixProtRunValidationCryoEM", "text": "default"}
]},
{"tag": "section", "text": "Tools-Calculators", "icon": "bookmark.png", "children": [
{"tag": "protocol", "value": "PhenixProtRunSuperposePDBs", "text": "default"}
]},
{"tag": "section", "text": "Others", "icon": "bookmark.png", "children": [
]}
]
10 changes: 5 additions & 5 deletions phenix/viewers/viewer_search_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def _defineParams(self, form):
form.addParam("numAtomStruct", IntParam, label="Max. Number Atom Structs.",
default=1000,
help="Number of atom structs to show ordered by model_to_map_fit\n")
form.addParam("zone", FloatParam, label="Show Area arround input PDB (A)",
form.addParam("zone", FloatParam, label="Show Area around input atomic struct (A)",
default=3,
help="Limit the display to a zone around the input PDB.\n"
help="Limit the display to a zone around the input atomic structure.\n"
"Units = A.")
form.addParam('showPlot', LabelParam,
label="Summary Plot",
Expand Down Expand Up @@ -182,15 +182,15 @@ def _showPlot(self, e=None):
FROM %s
WHERE model_to_map_fit != -1
ORDER BY model_to_map_fit desc
LIMIT %d)""" % (TABLE, self.numAtomStruct)
)""" % (TABLE)
c.execute(sqlCommand)
rows = c.fetchone(); avg = rows[0]
print("avg", avg)
fromRelation = """(SELECT model_to_map_fit
FROM %s
WHERE model_to_map_fit != -1
ORDER BY model_to_map_fit desc
LIMIT %d) AS mainTable""" % (TABLE, self.numAtomStruct)
) AS mainTable""" % (TABLE)

sqlCommand = """SELECT AVG((mainTable.model_to_map_fit - sub.a) * (mainTable.model_to_map_fit - sub.a)) as var
FROM %s,
Expand All @@ -210,7 +210,7 @@ def _showPlot(self, e=None):
errorWindow(self.getTkRoot(), "No data available")
return

title = 'Map Model Fit - avg = %f, std = %f'%(avg, std)
title = 'avg (all data) = %f, std (all data) = %f'%(avg, std)
plt.plot(xList, yList, 'x')
plt.axis([0, max(xList) + 1.0, 0.0, max(yList)+0.1])
plt.title(title)
Expand Down

0 comments on commit afd027a

Please sign in to comment.