runner.sh 1.38 KB
Newer Older
Marco Chierici's avatar
Marco Chierici committed
1
2
3
#!/bin/bash
# Example script for the INF pipeline

Alessia Marcolini's avatar
Alessia Marcolini committed
4
CORES=12
alessiamarcolini's avatar
alessiamarcolini committed
5

Alessia Marcolini's avatar
Alessia Marcolini committed
6
7
OUTFOLDER=results
DATAFOLDER=data
Alessia Marcolini's avatar
Alessia Marcolini committed
8
DATASET=tcga_aml
Alessia Marcolini's avatar
Alessia Marcolini committed
9
LAYER1=gene
Alessia Marcolini's avatar
Alessia Marcolini committed
10
11
12
13
LAYER2=meth
LAYER3=mirna
TARGET=OS
MODEL=randomForest
Alessia Marcolini's avatar
Alessia Marcolini committed
14
15
16
N_SPLITS_START=0
N_SPLITS_END=10

Alessia Marcolini's avatar
Alessia Marcolini committed
17
RANDOM_LABELS=false
Marco Chierici's avatar
Marco Chierici committed
18

19
# go!
20

Nicole Bussola's avatar
Nicole Bussola committed
21
for (( i=$N_SPLITS_START; i<$N_SPLITS_END; i++ ))
Alessia Marcolini's avatar
Alessia Marcolini committed
22
do
Alessia Marcolini's avatar
Alessia Marcolini committed
23
    snakemake -s Snakefile_split --cores $CORES --config datafolder=$DATAFOLDER outfolder=$OUTFOLDER dataset=$DATASET target=$TARGET layer1=$LAYER1 layer2=$LAYER2 layer3=$LAYER3 model=$MODEL random=$RANDOM_LABELS split_id=$i  -p 
Alessia Marcolini's avatar
Alessia Marcolini committed
24
done
25

Alessia Marcolini's avatar
Alessia Marcolini committed
26
27
28
29
30
if [ $RANDOM_LABELS = true ]
then 
    TARGET+='_random'
fi

31
for MODE in juxt rSNF rSNFi single
32
do
Alessia Marcolini's avatar
Alessia Marcolini committed
33
    python postprocessing/compute_all_metrics.py --outfolder $OUTFOLDER --dataset $DATASET --target $TARGET --layers $LAYER1 $LAYER2 $LAYER3 --model $MODEL --n_splits_end $N_SPLITS_END --n_splits_start $N_SPLITS_START --mode $MODE
34
done
35
36


Nicole Bussola's avatar
Nicole Bussola committed
37
38
for MODE in juxt rSNF 
do
Alessia Marcolini's avatar
Alessia Marcolini committed
39
    python postprocessing/borda_global_juxt_rSNF.py --datafolder $DATAFOLDER --outfolder $OUTFOLDER --dataset $DATASET --target $TARGET --layers $LAYER1 $LAYER2 $LAYER3 --model $MODEL --n_splits_end $N_SPLITS_END --n_splits_start $N_SPLITS_START --mode $MODE
Nicole Bussola's avatar
Nicole Bussola committed
40
done
Nicole Bussola's avatar
Nicole Bussola committed
41

Alessia Marcolini's avatar
Alessia Marcolini committed
42
python postprocessing/borda_global_rSNFi.py --datafolder $DATAFOLDER --outfolder $OUTFOLDER --dataset $DATASET --target $TARGET --layers $LAYER1 $LAYER2 $LAYER3 --model $MODEL --n_splits_end $N_SPLITS_END --n_splits_start $N_SPLITS_START --mode rSNFi
Nicole Bussola's avatar
Nicole Bussola committed
43
44
45