schrodinger.application.bioluminate.antibody.search_results_table module¶
Classes for the search results table used in the Antibody Prediction and Antibody Humanization: CDR Grafting panels. These classes cover the table view, model, and proxy models.
- class schrodinger.application.bioluminate.antibody.search_results_table.FullColumns¶
Bases:
object
Constants for the full (i.e. non-split) table columns
- NAMES = ('Heavy', 'Light', 'Composite\nScore', 'Antigen Type', 'Species', 'Heavy\nFr. Sim.', 'Light\nFr. Sim.', 'Heavy\nFr. Iden.', 'Light\nFr. Iden.', 'Heavy\nSim.', 'Light\nSim.', 'Heavy\nIden.', 'Light\nIden.', 'PDB\nResolution')¶
- TOOLTIPS = ('The heavy region template', 'The light region template', 'The average framework region similarity of both heavy and light chain', '"protein (<N> residues)"/"ligand"/"none"', 'The host species of the antibody', 'Sequence similarity of the framework region for the heavy chain', 'Sequence similarity of the framework region for the light chain', 'Sequence identity of the framework region for the heavy chain', 'Sequence identity of the framework region for the light chain', 'Sequence similarity of the entire sequence for the heavy chain', 'Sequence similarity of the entire sequence for the light chain', 'Sequence identity of the entire sequence for the heavy chain', 'Sequence identity of the entire sequence for the light chain', 'PDB Resolution')¶
- NUM = 14¶
- HEAVY = 0¶
- LIGHT = 1¶
- COMP_SCORE = 2¶
- ANTIGEN_TYPE = 3¶
- SPECIES = 4¶
- HEAVY_FR_SIM = 5¶
- LIGHT_FR_SIM = 6¶
- HEAVY_FR_IDEN = 7¶
- LIGHT_FR_IDEN = 8¶
- HEAVY_SIM = 9¶
- LIGHT_SIM = 10¶
- HEAVY_IDEN = 11¶
- LIGHT_IDEN = 12¶
- PDB_RES = 13¶
- LIGHT_COLS = (1, 6, 8, 10, 12)¶
- class schrodinger.application.bioluminate.antibody.search_results_table.SplitColumns¶
Bases:
object
Constants for the split table columns (i.e. for a table that shows either the heavy templates or the light templates)
- NUM = 9¶
- CHAIN = 0¶
- CHAIN_FR_SIM = 1¶
- CHAIN_FR_IDEN = 2¶
- CHAIN_SIM = 3¶
- CHAIN_IDEN = 4¶
- COMP_SCORE = 5¶
- ANTIGEN_TYPE = 6¶
- SPECIES = 7¶
- PDB_RES = 8¶
- class schrodinger.application.bioluminate.antibody.search_results_table.TableView(parent)¶
Bases:
PyQt6.QtWidgets.QTableView
A table view for both full and split search results. This table is designed to be used with a FullProxyModel or a SplitProxyModel, as the model is expected to have a DEFAULT_SORT_COLUMN attribute.
- __init__(parent)¶
- reset()¶
If the model is reset and contains new data, sort the new data appropriately and select the first row.
- getSelectedResult()¶
Get the currently selected framework. This method also causes the selected row to be highlighted in green so the user can see which framework was used to build the current model if they go back to the framework tab.
- Returns
The framework from the currently selected row
- Return type
antibody_prediction_gui.FrameworkTemplate
- class schrodinger.application.bioluminate.antibody.search_results_table.FullProxyModel(parent)¶
Bases:
PyQt6.QtCore.QSortFilterProxyModel
A proxy model for the full search results. This proxy stores the most recent accepted row, i.e. the framework that was selected when the user clicked Accept. This row will be colored green if the user comes back to the table.
- Variables
DEFAULT_SORT_COLUMN (int) – When new data is loaded into a table using this proxy, it will be initially sorted using this column.
SECONDARY_SORT_COLUMNS – When two rows contain identical values for a given sort column, those rows will be sorted using SECONDARY_SORT_COLUMNS[column]
ACCEPTED_FRAMEWORK_COLOR (
PyQt5.QtGui.QColor
) – The background color for the accepted framework row.
- COLUMN = <schrodinger.application.bioluminate.antibody.search_results_table.FullColumns object>¶
- DEFAULT_SORT_COLUMN = 2¶
- DEFAULT_SORT_ORDER = 1¶
- SECONDARY_SORT_COLUMNS = {5: 2, 6: 2, 7: 5, 8: 6, 9: 2, 10: 2, 11: 9, 12: 10}¶
- ACCEPTED_FRAMEWORK_COLOR = <PyQt6.QtGui.QColor object>¶
- __init__(parent)¶
- setData(index, value, role=ItemDataRole.EditRole)¶
Store the accepted framework
- Parameters
index (
PyQt5.QtCore.QModelIndex
) – The index of a cell from the row to set as the accepted framework. The column of the index is ignored.value (bool) – The value to set. Is expected to be True to set the accepted framework.
role (int) – The role to set data for. Is expected to be Qt.EditRole to set the accepted framework.
- Returns
True if the accepted framework was stored successfully. False otherwise.
- Return type
bool
- data(index, role=ItemDataRole.DisplayRole)¶
Color the background of the accepted framework row green, and pass through all other data from the model.
- Parameters
index (
PyQt5.QtCore.QModelIndex
) – The index to retrieve data forrole (int) – The role to retrieve data for
- Returns
The requested data
- setSourceModel(source_model)¶
Set the source model for this proxy, and make sure that the accepted row is reset when the model is reset.
- Parameters
source_model (
FrameworkModel
) – The source model to set
- resetAcceptedRow()¶
Reset the accepted row.
- lessThan(source_left, source_right)¶
See Qt documentation for method documentation.
- class schrodinger.application.bioluminate.antibody.search_results_table.SplitProxyModel(parent, is_heavy)¶
Bases:
schrodinger.application.bioluminate.antibody.search_results_table.FullProxyModel
A proxy for the split search results (i.e. for a table that shows either the heavy templates or the light templates).
- Variables
col_from_source (dict) – A mapping of {column number in the source model: column number in this proxy model}
col_to_source (dict) – A mapping of {column number in this proxy model: column number in the source model}
- COLUMN = <schrodinger.application.bioluminate.antibody.search_results_table.SplitColumns object>¶
- DEFAULT_SORT_COLUMN = 1¶
- __init__(parent, is_heavy)¶
Initialize the proxy
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetis_heavy (bool) – Does this proxy model represent the heavy chain (True) or the light chain (False)?
- filterAcceptsColumn(self, source_column: int, source_parent: QModelIndex) bool ¶
- class schrodinger.application.bioluminate.antibody.search_results_table.FrameworkModel(parent)¶
Bases:
PyQt6.QtCore.QAbstractTableModel
A model to store search results
- COLUMN = <schrodinger.application.bioluminate.antibody.search_results_table.FullColumns object>¶
- __init__(parent)¶
- headerData(section, orientation, role)¶
Retrieve the requested header data
- Parameters
section (int) – The row/column number to retrieve header data for
orientation (int) – The orientation of the header (Qt.Horizontal or Qt.Vertical) to retrieve data for
role (int) – The role to retrieve header data for
- rowCount(parent=None)¶
Return the number of rows in the model
- Parameters
parent – Unused, but present for PyQt compatibility.
- Returns
The number of rows in the model
- Return type
int
- columnCount(parent=None)¶
Return the number of columns in the model
- Parameters
parent – Unused, but present for PyQt compatibility.
- Returns
The number of columns in the model
- Return type
int
- loadData(results)¶
Load in new data, replacing any existing data
- Parameters
results (list) – The results of the framework search. Must be a list of
antibody_prediction_gui.FrameworkTemplate
objects.
- reset()¶
Remove any existing data
- data(index, role=ItemDataRole.DisplayRole)¶
Retrieve the requested data
- Parameters
index (
PyQt5.QtCore.QModelIndex
) – The index to retrieve data forrole (int) – The role to retrieve data for
- Returns
The requested data
- flags(index)¶
Retrieve flags for the specified index
- Parameters
index (
PyQt5.QtCore.QModelIndex
) – The index to retrieve data for- Returns
The flags for the specified index
- Return type
int
- isPopulated()¶
Does this model contain data (i.e. > 0 rows)?
- Returns
True if the model contain data, False otherwise
- Return type
bool
- class schrodinger.application.bioluminate.antibody.search_results_table.FullTable(parent, model)¶
Bases:
PyQt6.QtWidgets.QWidget
A widget to contain the full search results table
- COLUMN = <schrodinger.application.bioluminate.antibody.search_results_table.FullColumns object>¶
- PROXY_CLASS¶
alias of
schrodinger.application.bioluminate.antibody.search_results_table.FullProxyModel
- VIEW_CLASS¶
alias of
schrodinger.application.bioluminate.antibody.search_results_table.TableView
- __init__(parent, model)¶
Initialize the table using the specified model
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetmodel (
FrameworkModel
) – The model containing the search results
- getSelectedResult()¶
Get the currently selected framework
- Returns
The framework from the currently selected row
- Return type
antibody_prediction_gui.FrameworkTemplate
- updateLightColVisibility(show_light)¶
Show or hide light columns when single-domain prediction is toggled.
- Parameters
show_light – Whether or not to show the light columns.
show_light – bool
- class schrodinger.application.bioluminate.antibody.search_results_table.SplitTable(parent, model)¶
Bases:
PyQt6.QtWidgets.QWidget
A widget to contain both split search results tables (i.e. one table that show the heavy frameworks and one table that shows the light frameworks).
- COLUMN = <schrodinger.application.bioluminate.antibody.search_results_table.SplitColumns object>¶
- __init__(parent, model)¶
Initialize the tables using the specified model
- Parameters
parent (
PyQt5.QtWidgets.QWidget
) – The Qt parent widgetmodel (
FrameworkModel
) – The model containing the search results
- getSelectedResults()¶
Get the currently selected frameworks from both tables
- Returns
A list of the currently selected [heavy framework, light framework]
- Return type
list