ovo.app.utils.protein_qc_plots¶
Module Contents¶
Functions¶
Load precomputed PDB histograms for all tools. The histograms are computed for the data between 1st and 99th percentile. |
|
Create Altair histogram from precomputed data. |
|
Given bins for a histogram and a list of values, extend the bins if the values are outside the range of the bins. |
|
Create a combined histogram plot for a descriptor. The top histogram is the precomputed histogram and the bottom histogram is the pool histogram from the passed values. |
|
Format the threshold values for display. |
|
Data¶
API¶
- ovo.app.utils.protein_qc_plots.FLAG_ICONS¶
None
- ovo.app.utils.protein_qc_plots.SOURCE_OPTIONS¶
None
- ovo.app.utils.protein_qc_plots.load_histograms() Dict[str, Dict[str, Dict[str, List[float]]]]¶
Load precomputed PDB histograms for all tools. The histograms are computed for the data between 1st and 99th percentile.
Returns: {‘descriptor’: {‘all’: {‘x’: [0, 1, 2, …], ‘y’: [0.1, 0.2, …]}, ‘non-human_only’: …, ‘human_only’: …, ‘human+non-human}, …}}}} x - bin edges y - bin heights
- ovo.app.utils.protein_qc_plots.load_plots_data(file_path: str) dict¶
- ovo.app.utils.protein_qc_plots.get_histogram_alt(bins: numpy.ndarray, y: numpy.ndarray, color_by: str, thresholds: List[float] = None, reverse_colors: bool = False, width: int = None, height: int = None, title: str = None, x_label: str = None, y_label: str = None, value: float = None, value_label: str = None) altair.Chart¶
Create Altair histogram from precomputed data.
Args: bins: bin edges in the precomputed histograms y: bin heights in the precomputed histograms color_by: coloring method, one of ‘reference’, ‘thresholds’, ‘plddt’, ‘rmsd’, or other color schemes supported by get_cmap thresholds: list of thresholds for color_by=’thresholds’ reverse_colors: reverse the color scale width: width of the chart height: height of the chart title: title of the chart x_label: label for the x-axis y_label: label for the y-axis value: single value to highlight on the histogram value_label: label for the highlighted value
- ovo.app.utils.protein_qc_plots.update_bin_edges(values: List[float], bins: List[float], y: list[float]) tuple[numpy.ndarray, numpy.ndarray]¶
Given bins for a histogram and a list of values, extend the bins if the values are outside the range of the bins.
- ovo.app.utils.protein_qc_plots.descriptor_histograms(descriptor: ovo.Descriptor, histogram_source: str, values: List[float], value: float = None, value_label: str = None, color_by: str = 'default', precomputed_histogram_height: int = 150, pool_histogram_height: int = 150, width: int = 600)¶
Create a combined histogram plot for a descriptor. The top histogram is the precomputed histogram and the bottom histogram is the pool histogram from the passed values.
Parameters: descriptor (Descriptor): descriptor object histogram_source (str): Source of the histogram values (List[float]): Values for the pool/selected designs histogram value (float): Single value to highlight on the histogram value_label (str): Label for the highlighted value color_by (str): Color by ‘thresholds’, None, or values returned by get_descriptor_plot_setting precomputed_histogram_height (int): Height of the precomputed histogram pool_histogram_height (int): Height of the pool histogram width (int): Maximum width of the chart in pixels
- ovo.app.utils.protein_qc_plots.format_threshold_value(descriptor_name: str, value) str | None¶
Format the threshold values for display.
If the descriptor is a percentage (0-1), multiply by 100 and add a percentage sign. If the descriptor is ‘Sequence length’, round to the nearest integer. Otherwise, round to two decimal places.
- ovo.app.utils.protein_qc_plots.source_selectbox(value: str, key_prefix: str)¶