Skip to content

Command Line Interfaces#243

Merged
PascalIversen merged 49 commits intodevelopmentfrom
cli
Jun 27, 2025
Merged

Command Line Interfaces#243
PascalIversen merged 49 commits intodevelopmentfrom
cli

Conversation

@PascalIversen
Copy link
Collaborator

@PascalIversen PascalIversen commented Jun 25, 2025

command line interface that is available after installing drevalpy.

to run the drug response experiment:
drevalpy --help
to create the report:
drevalpy-report --help

also refactored create_report into functions for more harmony with the nf-core pipeline <3 and to make it available via

from drevalpy.visualization import create report
create_report(run_id="togepi", dataset="TOYv1")

TODO:

  1. check all documentation.
  2. rewrite quick start
  3. rewrite collab notebook
  4. rewrite tests

closes #242

and sneaking in:
closes #241

JudithBernett and others added 26 commits January 30, 2025 14:20
New versions, new Dockerimage
Including curve-curator by default now
New version: adapted hyperparameter files, faster GradientBoosting
v1.2.3: bug fix cross study prediction SMRF
New version with various fixes:

DIPK fix for batch size 1
MOLIR/SuperFELTR: removed VarianceThreshold selection. Now always selecting min(1000, n_features) most variable features from the dataset
MOLIR/SuperFELTR fix for if self.model is None
MOLIR/SuperFELTR: moved duplicated code to utils
MultiOmicsNN: removed unused self.methylation_features
test restructuring: now baseline tests, single drug model tests, neural network tests for non-single drug models
Also adapted tests for the bugs
updated requirements
Force NaiveMeanEffectsPredictor if not already selected as baseline
@github-actions github-actions bot added the chore label Jun 26, 2025
@PascalIversen

This comment was marked as outdated.

@PascalIversen PascalIversen marked this pull request as ready for review June 27, 2025 06:48
@JudithBernett JudithBernett self-requested a review June 27, 2025 08:18
@PascalIversen PascalIversen requested a review from Copilot June 27, 2025 11:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the legacy top-level scripts with proper CLI entrypoints, reorganizes report generation into a module for better integration, updates tests to cover both experiment and report commands, and refreshes documentation to use the new drevalpy and drevalpy-report commands.

  • Define drevalpy and drevalpy-report entrypoints in pyproject.toml and remove run_suite.py/create_report.py at the repo root.
  • Refactor report generation into drevalpy.visualization.create_report with modular functions and streamline pipeline decorators in visualization code.
  • Replace old end-to-end test with a unified tests/test_main.py and update all docs to reference the new CLI.

Reviewed Changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Added [tool.poetry.scripts] for drevalpy and drevalpy-report.
run_suite.py, create_report.py Removed legacy scripts in project root.
drevalpy/cli.py New CLI entrypoint for drevalpy.
drevalpy/visualization/create_report.py New module organizing report generation logic into functions.
tests/test_run_suite.py Deleted obsolete test.
tests/test_main.py New integrated test covering both main pipeline and report.
docs/ Updated usage examples to use drevalpy/drevalpy-report.
drevalpy/visualization/*.py Removed @pipeline_function decorators from plotting classes.
Comments suppressed due to low confidence (2)

drevalpy/models/drp_model.py:107

  • The @pipeline_function decorator is applied here but pipeline_function is not imported in this file. Please add from drevalpy.pipeline_function import pipeline_function (or the correct relative import) at the top.
    @pipeline_function

drevalpy/datasets/dataset.py:46

  • The @pipeline_function decorator is used here but pipeline_function is not imported. Please add from drevalpy.pipeline_function import pipeline_function (or the correct relative import) at the top of this module.
    @pipeline_function

docs/usage.rst Outdated
* ``--measure MEASURE``: The name of the measure to use, default 'LN_IC50'. If using one of the available datasets (see ``--dataset_name``), this is restricted to one of ['LN_IC50', 'EC50', 'IC50', 'pEC50', 'AUC', 'response']. This corresponds to the names of the columns that contain theses measures in the provided input dataset. If providing a custom dataset, this may differ. If the option ``--curve_curator`` is set, the prefix '_curvecurator' is automatically appended, e.g. 'LN_IC50_curvecurator', to allow using the refit measures instead of the ones originally published for the available datasets, allowing for better dataset comparability (refit measures are already provided in the available datasets or computed as part of the fitting procedure when providing custom raw viability datasets, see ``--curve_curator`` for details).
* ``--curve_curator``: Default true. If set, the measure is appended with '_curvecurator'. If a custom dataset_name was provided, this will invoke the fitting procedure of raw viability data, which is expected to exist at ``<path_data>/<dataset_name>/<dataset_name>_raw.csv``. The fitted dataset will be stored in the same folder, in a file called ``<dataset_name>.csv``. Also check the :ref:`usage:Custom Datasets` section.
* ``--curve_curator_cores CORES``: Number of cores to use for CurveCurator fitting. Only used when ``--curve_curator`` is set.
* ``--curve_curator``: If set, the measure is appended with '_curvecurator'. If a custom dataset_name was provided, this will invoke the fitting procedure of raw viability data, which is expected to exist at ``<path_data>/<dataset_name>/<dataset_name>_raw.csv``. The fitted dataset will be stored in the same folder, in a file called ``<dataset_name>.csv``. Also check the :ref:`usage:Custom Datasets` section. Default is False.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is true. For the pipeline I changed this parameter to --no-refitting, default False because I thought it's weird to have true default. But for the package, I just left it this way. We can also change it to --no-refitting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! do I need to change soemthing somwhere else?

@PascalIversen PascalIversen merged commit 70ea830 into development Jun 27, 2025
32 checks passed
python run_suite.py [-h] [--run_id RUN_ID] [--path_data PATH_DATA] [--models MODELS [MODELS ...]] [--baselines BASELINES [BASELINES ...]] [--test_mode TEST_MODE [TEST_MODE ...]]
drevalpy [-h] [--run_id RUN_ID] [--path_data PATH_DATA] [--models MODELS [MODELS ...]] [--baselines BASELINES [BASELINES ...]] [--test_mode TEST_MODE [TEST_MODE ...]]
[--randomization_mode RANDOMIZATION_MODE [RANDOMIZATION_MODE ...]] [--randomization_type RANDOMIZATION_TYPE] [--n_trials_robustness N_TRIALS_ROBUSTNESS] [--dataset_name DATASET_NAME]
[--cross_study_datasets CROSS_STUDY_DATASETS [CROSS_STUDY_DATASETS ...]] [--path_out PATH_OUT] [--measure MEASURE] [--curve_curator] [--curve_curator_cores CORES] [--overwrite] [--optim_metric OPTIM_METRIC] [--n_cv_splits N_CV_SPLITS]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

da steht noch curve_curator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command Line Interface Empty Early Stopping Sets

3 participants