webinterface.UI_utils module#

webinterface.UI_utils.get_base64_image(path)[source]#
webinterface.UI_utils.get_n_modules()[source]#

Get the number of modules in ProteoBench.

Returns:

The number of modules.

Return type:

int

webinterface.UI_utils.get_n_modules_proposed(rst_text: str) int[source]#

Computes the number of proposed modules as the sum of modules ‘in discussion’ and ‘in development’.

Parameters:

status_counts (Dict[str, int]) – A dictionary of status counts as returned by parse_proteobench_index().

Returns:

The total number of proposed modules.

Return type:

int

webinterface.UI_utils.get_n_submitted_points(url: str = 'https://proteobench.cubimed.rub.de/datasets/')[source]#

Get the number of submitted points in ProteoBench.

Returns:

The number of submitted points (excluding ‘fasta/’ and ‘raw_files/’).

Return type:

int

webinterface.UI_utils.get_n_supported_tools()[source]#

Get the number of supported tools in ProteoBench.

Returns:

The number of supported tools.

Return type:

int

webinterface.UI_utils.parse_proteobench_index(rst_text: str) Dict[str, int][source]#

Parses the ProteoBench index.rst and counts modules by status.

This version assumes that each module starts with ‘.. grid-item-card::’ and that the badge line contains ‘:bdg-’ followed by the status.

Parameters:

rst_text (str) – The text content of the index.rst file.

Returns:

Dictionary mapping statuses to counts.

Return type:

Dict[str, int]

webinterface.UI_utils.stat_box(title, value, icon_path, url=None)[source]#