-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to consolidate results - does not work yet
- Loading branch information
1 parent
e496f39
commit 637918e
Showing
12 changed files
with
179 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python | ||
|
||
import argparse | ||
|
||
|
||
def get_parser(): | ||
parser = argparse.ArgumentParser(description="Consolidate results for SingleDrugModels") | ||
parser.add_argument("--test_mode", type=str, required=True, help="Test mode (LPO, LCO, LDO)") | ||
parser.add_argument("--model_names", type=str, nargs="+", required=True, help="All Model " | ||
"names") | ||
parser.add_argument("--pred_files", type=str, nargs="+", required=True, help="All prediction " | ||
"files") | ||
parser.add_argument("--n_cv_splits", type=int, required=True, help="Number of CV splits") | ||
parser.add_argument("--cross_study_datasets", type=str, nargs="+", help="All " | ||
"cross-study " | ||
"datasets") | ||
parser.add_argument("--randomizations", type=str, nargs="+", required=True, help="All " | ||
"randomizations") | ||
parser.add_argument("--n_trials_robustness", type=int, required=True, help="Number of trials") | ||
return parser | ||
|
||
|
||
def main(): | ||
parser = get_parser() | ||
args = parser.parse_args() | ||
print(args) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
process CONSOLIDATE_RESULTS { | ||
tag "Consolidate" | ||
label 'process_single' | ||
publishDir "${params.outdir}/${params.run_id}/${test_mode}", mode: 'copy' | ||
|
||
input: | ||
tuple val(test_mode), val(model_names), val(pred_files) | ||
val(rand_modes) | ||
|
||
output: | ||
tuple val(test_mode), val(model_names), val(pred_files) | ||
|
||
script: | ||
""" | ||
consolidate_results.py \\ | ||
--test_mode ${test_mode} \\ | ||
--model_names "${model_names}" \\ | ||
--pred_files "${pred_files}" \\ | ||
--n_cv_splits ${params.n_cv_splits} \\ | ||
${params.cross_study_datasets != '' ? '--cross_study_datasets ' + params | ||
.cross_study_datasets.replace(',', ' ') : ''} \\ | ||
--randomizations ${rand_modes}\\ | ||
--n_trials_robustness ${params.n_trials_robustness} | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.