qbiocode.apps.qprofiler.qprofiler_batchmode module#

Summary#

Functions:

main

Main function to run qprofiler in batch mode.

parse_args

Parse command-line arguments for batch mode processing.

run_job

Run QProfiler on a single dataset file with custom configuration.

Reference#

run_job(data_file, configfile, output_folder_timestamp, data_type)[source]#

Run QProfiler on a single dataset file with custom configuration.

This function creates a temporary configuration file for each dataset by: 1. Loading the base configuration from the specified config file 2. Adding dataset-specific parameters (filename, timestamp, data type) 3. Saving a new config file with a unique name 4. Executing qprofiler with the custom configuration 5. Cleaning up temporary config files after processing

This function is designed for batch processing where multiple datasets are processed in parallel, each with its own configuration variant.

Parameters:
  • data_file (str) – Name of the CSV data file to process (e.g., ‘dataset1.csv’)

  • configfile (str) – Path to the base YAML configuration file to use as template

  • output_folder_timestamp (str) – Timestamp string for organizing output directories

  • data_type (str) – Label for this batch of data (used in output directory naming)

Returns:

None

Example

>>> run_job('cancer_data.csv', 'configs/base.yaml', '2024_01_15_120000', 'cancer_study')
# Creates configs/config_cancer_study_2024_01_15_120000__cancer_data.yaml
# Runs: qprofiler --config-name=config_cancer_study_2024_01_15_120000__cancer_data
parse_args()[source]#

Parse command-line arguments for batch mode processing.

Returns:

Parsed command-line arguments

Return type:

argparse.Namespace

main()[source]#

Main function to run qprofiler in batch mode. It sets up the environment, processes datasets in parallel, and collects results. This function is designed to handle multiple datasets efficiently, allowing for parallel processing of machine learning methods and datasets.

Parameters:

None (uses command-line arguments)

Returns:

None