Skip to content

Feat survival task inclusion - #116

Merged
tonyliang19 merged 31 commits into
devfrom
feat-survival-task-inclusion
Sep 29, 2026
Merged

tonyliang19 merged 31 commits into
devfrom
feat-survival-task-inclusion

Conversation

@tonyliang19

Copy link
Copy Markdown
Contributor

No description provided.

Major change to prepare data, seed reproduce
feat: add the final samplesheet used for the pipeline
Copilot AI balanced review requested due to automatic review settings September 29, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Survival execution currently has unresolved workflow imports, configuration gaps, incompatible result handling, and failing MOFA code paths.

Review effort: Balanced
Findings: 5 High severity · 2 Medium severity

Open (7)
What changed in this PR

Adds survival-analysis support and single-modality benchmarking while reorganizing container configuration and removing deprecated simulation methods.

Changes:

  • Adds survival splitting, scikit-survival workflows, and preliminary MOFA survival support.
  • Adds unimodal dataset expansion and sklearn dimensionality reduction.
  • Centralizes container selection and removes deprecated simulation, GOAT, and SGMR code.
File Description
workflows/​messi_benchmark.nf Routes unimodal datasets through splitting and validation.
subworkflows/​splitting/​main.nf Passes outcome type to splitting.
subworkflows/​simulation/​main.nf Removes the simulation workflow.
subworkflows/​prepare_data/​main.nf Produces unimodal MuData channels.
subworkflows/​methods/​sksurv/​main.nf Adds the scikit-survival workflow.
subworkflows/​methods/​sklearn/​main.nf Adds configurable dimensionality reduction.
subworkflows/​methods/​sgmr/​main.nf Removes the SGMR placeholder.
subworkflows/​cross_validation/​r/​main.nf Removes SGMR registration.
subworkflows/​cross_validation/​python/​main.nf Routes sklearn and survival methods.
subworkflows/​cross_validation/​main.nf Adds unimodal cross-validation inputs.
nextflow.config Adds survival, sklearn, and container settings.
modules/​split_train_test/​resources/​usr/​bin/​split_tr_te.py Adds survival-event stratification.
modules/​split_train_test/​main.nf Passes outcome type to the splitter.
modules/​sksurv/​train/​resources/​usr/​bin/​sksurv_train.py Implements survival-model training.
modules/​sksurv/​train/​resources/​usr/​bin/​manual_set_seed.py Adds reproducibility utilities.
modules/​sksurv/​train/​resources/​usr/​bin/​load_tr_te.py Loads survival fold datasets.
modules/​sksurv/​train/​resources/​usr/​bin/​load_survival_model_class.py Defines survival model builders.
modules/​sksurv/​train/​resources/​usr/​bin/​combine_mdata2df_survival.py Converts MuData to survival inputs.
modules/​sksurv/​train/​main.nf Defines the survival training process.
modules/​sksurv/​preprocess/​resources/​usr/​bin/​tr_te_split_mdata.py Partitions MuData folds.
modules/​sksurv/​preprocess/​resources/​usr/​bin/​sksurv_preprocess.py Creates survival train/test files.
modules/​sksurv/​preprocess/​resources/​usr/​bin/​load_test_splits.py Loads fold index files.
modules/​sksurv/​preprocess/​main.nf Defines survival preprocessing.
modules/​sksurv/​predict/​resources/​usr/​bin/​sksurv_predict.py Generates survival predictions.
modules/​sksurv/​predict/​resources/​usr/​bin/​manual_set_seed.py Adds prediction seed utilities.
modules/​sksurv/​predict/​resources/​usr/​bin/​load_survival_model_class.py Supplies prediction-time model classes.
modules/​sksurv/​predict/​resources/​usr/​bin/​generate_result_table_survival.py Formats survival results.
modules/​sksurv/​predict/​resources/​usr/​bin/​combine_mdata2df_survival.py Converts prediction MuData inputs.
modules/​sksurv/​predict/​main.nf Defines survival prediction.
modules/​sklearn/​train/​resources/​usr/​bin/​sklearn_train.py Adds per-modality PCA pipelines.
modules/​sklearn/​train/​resources/​usr/​bin/​load_classifier_class.py Removes the local classifier loader.
modules/​sklearn/​train/​resources/​usr/​bin/​combine_mdata2df.py Removes the local MuData converter.
modules/​sklearn/​train/​main.nf Adds reduction variants to training.
modules/​sklearn/​select_feature/​resources/​usr/​bin/​sklearn_select_features.py Uses shared conversion and fitted search pipelines.
modules/​sklearn/​select_feature/​resources/​usr/​bin/​run_random_search_cv.py Searches over scaled pipelines.
modules/​sklearn/​select_feature/​resources/​usr/​bin/​combine_mdata2df.py Removes duplicated conversion code.
modules/​sklearn/​select_feature/​main.nf Uses centralized container labels.
modules/​sklearn/​preprocess/​main.nf Uses centralized container labels.
modules/​sklearn/​predict/​resources/​usr/​bin/​sklearn_predict.py Adapts to the shared converter API.
modules/​sklearn/​predict/​resources/​usr/​bin/​combine_mdata2df.py Removes duplicated conversion code.
modules/​sklearn/​predict/​main.nf Uses centralized container labels.
modules/​simulation/​simulate_mvn_data/​resources/​usr/​bin/​unique_matrices.R Removes MVN simulation helpers.
modules/​simulation/​simulate_mvn_data/​resources/​usr/​bin/​simulate_data.R Removes MVN simulation logic.
modules/​simulation/​simulate_mvn_data/​resources/​usr/​bin/​gen_simul_metadata.R Removes simulation metadata generation.
modules/​simulation/​simulate_mvn_data/​resources/​usr/​bin/​debug_simulate_data.R Removes simulation debugging code.
modules/​simulation/​simulate_mvn_data/​main.nf Removes the MVN process.
modules/​simulation/​simulate_intersim/​resources/​usr/​bin/​simulate_InterSIM.R Removes InterSIM generation.
modules/​simulation/​simulate_intersim/​resources/​usr/​bin/​save_mudata.py Removes InterSIM MuData serialization.
modules/​simulation/​simulate_intersim/​main.nf Removes the InterSIM process.
modules/​rgcca/​train/​resources/​usr/​bin/​run_rgcca.R Selects the Horst scheme.
modules/​rgcca/​train/​main.nf Uses centralized RGCCA containers.
modules/​rgcca/​select_feature/​resources/​usr/​bin/​rgcca_select_features.R Uses the Horst scheme for selection.
modules/​rgcca/​select_feature/​main.nf Uses centralized RGCCA containers.
modules/​rgcca/​preprocess/​main.nf Uses centralized RGCCA containers.
modules/​rgcca/​predict/​main.nf Uses centralized RGCCA containers.
modules/​prepare_data/​uncompress_record/​main.nf Uses the generic container label.
modules/​prepare_data/​split_modality/​resources/​usr/​bin/​split_modalities.py Splits MuData by modality.
modules/​prepare_data/​split_modality/​main.nf Defines modality splitting.
modules/​prepare_data/​prepare_mu_data/​main.nf Uses the generic container label.
modules/​prepare_data/​prepare_mae_data/​main.nf Uses the generic container label.
modules/​prepare_data/​parse_metadata/​main.nf Uses the generic container label.
modules/​mogonet/​train/​main.nf Uses centralized MOGONET containers.
modules/​mogonet/​select_feature/​main.nf Uses centralized MOGONET containers.
modules/​mogonet/​preprocess/​main.nf Uses centralized MOGONET containers.
modules/​mogonet/​predict/​main.nf Uses centralized MOGONET containers.
modules/​mofa/​train/​resources/​usr/​bin/​run_mofa_survival.R Adds preliminary MOFA Cox training.
modules/​mofa/​train/​main.nf Selects training scripts by outcome.
modules/​mofa/​select_feature/​main.nf Uses centralized MOFA containers.
modules/​mofa/​preprocess/​resources/​usr/​bin/​preprocess_mofa.R Documents survival embedding use.
modules/​mofa/​preprocess/​main.nf Uses centralized MOFA containers.
modules/​mofa/​predict/​main.nf Uses centralized MOFA containers.
modules/​merge_selected_features/​main.nf Uses the CODIA container label.
modules/​merge_result_table/​main.nf Uses the CODIA container label.
modules/​local/​samplesheet_check/​main.nf Uses the MOGONET container label.
modules/​integrao/​train/​main.nf Uses centralized Integrao containers.
modules/​integrao/​select_feature/​main.nf Uses centralized Integrao containers.
modules/​integrao/​preprocess/​main.nf Uses centralized Integrao containers.
modules/​integrao/​predict/​main.nf Uses centralized Integrao containers.
modules/​goat/​main.nf Removes the GOAT placeholder.
modules/​diablo/​train/​resources/​usr/​bin/​tune_diablo.R Uses the Horst tuning scheme.
modules/​diablo/​train/​resources/​usr/​bin/​run_diablo.R Uses the Horst training scheme.
modules/​diablo/​train/​main.nf Uses centralized CODIA containers.
modules/​diablo/​select_feature/​resources/​usr/​bin/​diablo_select_features.R Uses Horst for feature selection.
modules/​diablo/​select_feature/​main.nf Uses centralized CODIA containers.
modules/​diablo/​preprocess/​main.nf Uses centralized CODIA containers.
modules/​diablo/​predict/​main.nf Uses centralized CODIA containers.
modules/​diablo/​downstream/​main.nf Uses centralized CODIA containers.
modules/​cooperative_learning/​train/​main.nf Uses centralized CODIA containers.
modules/​cooperative_learning/​select_feature/​main.nf Uses centralized CODIA containers.
modules/​cooperative_learning/​preprocess/​main.nf Uses centralized CODIA containers.
modules/​cooperative_learning/​predict/​main.nf Uses centralized CODIA containers.
modules/​caret_multimodal/​train/​main.nf Uses centralized caret containers.
modules/​caret_multimodal/​select_feature/​main.nf Uses centralized caret containers.
modules/​caret_multimodal/​preprocess/​main.nf Uses centralized caret containers.
modules/​caret_multimodal/​predict/​main.nf Uses centralized caret containers.
modules/​calculate_metrics/​resources/​usr/​bin/​calculate_metrics.py Expands classification metrics.
modules/​calculate_metrics/​main.nf Uses label-based container selection.
launcher_local.sh Adds a local pipeline launcher.
conf/​real_data.config Corrects the feature-selection parameter name.
bin/​python_utils/​load_classifier_class.py Centralizes and expands classifier definitions.
bin/​python_utils/​combine_mdata2df.py Centralizes MuData conversion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +34 to +35
// Dynamically determine script based on classification or survival task
def script_names = params.outcome_type == "classification" ? "run_mofa.R" : "run_mofa_survival.R"
Comment on lines 31 to +33
params.skip_mogonet &&
params.skip_integrao
params.skip_integrao &&
params.skip_sklearn
include { GOAT } from "${subworkflowDir}/methods/goat"
include { INTEGRAO } from "${subworkflowDir}/methods/integrao"
include { SKLEARN } from "${subworkflowDir}/methods/sklearn"
include { MOGONET } from "${subworkflowDir}/methods/mogonet"

workflow SKSURV {
// Survival models to train: coxnet | rsf | gbm
model_name = Channel.fromList(params.survival_model_names)
[ it[2], it[3] ]
}
.set { result_table }
MERGE_RESULT_TABLE ( result_table, saveMode )
Comment thread nextflow.config
Comment on lines +79 to +80
time_col = "time" // colData column with follow-up time in days
event_col = "status" // colData column with event indicator (0/1)
Comment on lines +34 to 35
// Set classifier to Logit only if single_mode is true
model_name = Channel.fromList(params.sklearn_classifier_names)
@tonyliang19
tonyliang19 merged commit 0423fcc into dev Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants