proteobench.utils.server_io module#

proteobench.utils.server_io.dataset_folder_exists(intermediate_hash: str, base_url: str = 'https://proteobench.cubimed.rub.de/datasets/') bool[source]#

Check if a dataset folder already exists on the public server for a given intermediate hash. First tries a direct HEAD to the folder URL, then falls back to parsing the index page.

Parameters:
  • intermediate_hash – The hash to check for

  • base_url – Base URL of the datasets server

Returns:

True if the dataset folder exists, False otherwise

proteobench.utils.server_io.download_file(url: str, local_path: str, chunk_size: int = 8192) str[source]#

Download a file from URL to local path.

Parameters:
  • url (str) – URL to download from

  • local_path (str) – Local path to save file

  • chunk_size (int) – Size of chunks for streaming download (default: 8192)

Returns:

Path to downloaded file

Return type:

str

proteobench.utils.server_io.get_merged_json(repo_url='https://github.com/Proteobench/Results_quant_ion_DDA/archive/refs/heads/main.zip', write_to_file=False, outfile_name='combined_results.json')[source]#
proteobench.utils.server_io.get_raw_data(df, base_url='https://proteobench.cubimed.rub.de/datasets/', output_directory='extracted_files')[source]#
proteobench.utils.server_io.make_submission(submission_files=[], token='', module_name='')[source]#