# The main entry point of your workflow.
# After configuring, running snakemake -n in a clone of this repository should successfully execute a dry-run of the workflow.

subworkflow prepare_hubmap:
    workdir: '../subworkflows/prepare_data/'
    snakefile:
             "../subworkflows/prepare_data/workflow/Snakefile"
    configfile:
        "config/config_prepare_HubMAP2020.yml"

subworkflow prepare_jackson:
    workdir: '../subworkflows/prepare_data/'
    snakefile:
             "../subworkflows/prepare_data/workflow/Snakefile"
    configfile:
              "config/config_prepare_Jackson2020.yml"
    
subworkflow prepare_damond:
    workdir: '../subworkflows/prepare_data/'
    snakefile:
             "../subworkflows/prepare_data/workflow/Snakefile"
    configfile:
              "config/config_prepare_Damond2018.yml"

subworkflow prepare_schulz:
    workdir: '../subworkflows/prepare_data/'
    snakefile:
             "../subworkflows/prepare_data/workflow/Snakefile"
    configfile:
              "config/config_prepare_Schulz2017.yml"

subworkflow prepare_ali:
    workdir: '../subworkflows/prepare_data/'
    snakefile:
             "../subworkflows/prepare_data/workflow/Snakefile"
    configfile:
              "config/config_prepare_Ali2020.yml"

subworkflow evaluate_schulz:
    workdir: '../subworkflows/evaluate_segmentation/'
    snakefile:
             "../subworkflows/evaluate_segmentation/workflow/Snakefile"
    configfile:
              "config/config_evaluate_Schulz2017.yml"

subworkflow evaluate_jackson:
    workdir: '../subworkflows/evaluate_segmentation/'
    snakefile:
             "../subworkflows/evaluate_segmentation/workflow/Snakefile"
    configfile:
              "config/config_evaluate_Jackson2020.yml"

subworkflow evaluate_damond:
    workdir: '../subworkflows/evaluate_segmentation/'
    snakefile:
             "../subworkflows/evaluate_segmentation/workflow/Snakefile"
    configfile:
              "config/config_evaluate_Damond2018.yml"

subworkflow evaluate_hubmap:
    workdir: '../subworkflows/evaluate_segmentation/'
    snakefile:
             "../subworkflows/evaluate_segmentation/workflow/Snakefile"
    configfile:
              "config/config_evaluate_HubMAP2020.yml"

subworkflow evaluate_ali:
    workdir: '../subworkflows/evaluate_segmentation/'
    snakefile:
             "../subworkflows/evaluate_segmentation/workflow/Snakefile"
    configfile:
              "config/config_evaluate_Ali2020.yml"

rule all:
    input: #evaluate_schulz('Schulz2017/cp_seg_probab_all_open.sh'),
           prepare_schulz('Schulz2017/training_image_meta.csv'),
           prepare_hubmap('HubMAP2020/training_image_meta.csv'),
           prepare_damond('Damond2018/training_image_meta.csv'),
           prepare_ali('Ali2020/training_image_meta.csv'),
           #evaluate_schulz('Schulz2017/cp_crop_images_open.sh'),
           #evaluate_schulz('Schulz2017/cp_evaluate_masks_open.sh'),
           evaluate_schulz('Schulz2017/all'),
           evaluate_hubmap('HubMAP2020/all'),
           evaluate_damond('Damond2018/all'),
           evaluate_jackson('Jackson2020/all'),
           evaluate_ali('Ali2020/all'),


         
# rsync -rtu  . "vizano@cluster.s3it.uzh.ch:/scratch/vizano/MISegmentation" --progress --exclude=".*" --exclude="pkgs/" --exclude=".snakemake"



