-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from picciama/feature/curvecurator_module
Feature/curvecurator module
- Loading branch information
Showing
19 changed files
with
272 additions
and
23 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
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,19 @@ | ||
#!/usr/bin/env python | ||
from drevalpy.datasets.curvecurator import postprocess | ||
import argparse | ||
|
||
|
||
def get_parser(): | ||
parser = argparse.ArgumentParser(description="Postprocess CurveCurator viability data.") | ||
parser.add_argument("--dataset_name", type=str, required=True, help="Dataset name.") | ||
return parser | ||
|
||
|
||
def main(args): | ||
postprocess(output_folder='./', dataset_name=args.dataset_name) | ||
|
||
|
||
if __name__ == "__main__": | ||
arg_parser = get_parser() | ||
args = arg_parser.parse_args() | ||
main(args) |
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 @@ | ||
#!/usr/bin/env python | ||
from drevalpy.datasets.curvecurator import preprocess | ||
from pathlib import Path | ||
import argparse | ||
|
||
def get_parser(): | ||
parser = argparse.ArgumentParser(description="Preprocess CurveCurator viability data.") | ||
parser.add_argument("--path_data", type=str, default="", help="Path to base folder containing datasets.") | ||
parser.add_argument("--dataset_name", type=str, required=True, help="Dataset name.") | ||
parser.add_argument("--cores", type=int, default=0, help="The number of cores used for CurveCurator fitting.") | ||
return parser | ||
|
||
|
||
def main(args): | ||
input_file = Path(args.path_data) / args.dataset_name / f"{args.dataset_name}_raw.csv" | ||
preprocess( | ||
input_file=input_file, | ||
output_dir=args.dataset_name, | ||
dataset_name=args.dataset_name, | ||
cores=args.cores | ||
) | ||
|
||
if __name__ == "__main__": | ||
arg_parser = get_parser() | ||
args = arg_parser.parse_args() | ||
main(args) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ channels: | |
- conda-forge | ||
- defaults | ||
dependencies: | ||
- ray-tune | ||
- pip | ||
- pip: | ||
- drevalpy==1.1.1 |
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,17 @@ | ||
process FIT_CURVES { | ||
tag "$dir_name" | ||
label 'high_cpu_low_mem' | ||
|
||
input: | ||
val dataset_name | ||
tuple val(dir_name), path(toml), path(curvecurator_input) | ||
|
||
output: | ||
path("curves.tsv"), emit: path_to_curvecurator_out | ||
tuple path("mad.txt"), path("dashboard.html"), path("curveCurator.log") // other output | ||
|
||
script: | ||
""" | ||
CurveCurator ${toml} --mad | ||
""" | ||
} |
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,18 @@ | ||
process POSTPROCESS_CURVECURATOR_DATA { | ||
label 'process_single' | ||
publishDir "${params.path_data}/${dataset_name}", mode: 'copy' | ||
|
||
input: | ||
val dataset_name | ||
path(curve_data, stageAs: "?/*") | ||
val measure | ||
|
||
output: | ||
path "${dataset_name}.csv", emit: path_to_dataset | ||
val "${measure}" + "_curvecurator", emit: measure | ||
|
||
script: | ||
""" | ||
postprocess_curvecurator_output.py --dataset_name ${dataset_name} | ||
""" | ||
} |
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,17 @@ | ||
process PREPROCESS_RAW_VIABILITY { | ||
label 'process_low' | ||
|
||
input: | ||
val(dataset_name) | ||
path(work_path) | ||
val useless_count | ||
|
||
output: | ||
path "${dataset_name}/*/config.toml", emit: path_to_toml | ||
path "${dataset_name}/*/curvecurator_input.tsv", emit: curvecurator_input | ||
|
||
script: | ||
""" | ||
preprocess_raw_viability.py --path_data ${work_path} --dataset_name ${dataset_name} --cores ${task.cpus} | ||
""" | ||
} |
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.