Commit 9bee5124 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Specify between full or accelerated DAP

parent 0e3423c4
......@@ -54,7 +54,7 @@ To quickly reproduce our results, first download preprocessed data from [Figshar
for filename in *.tar.gz; do; tar zxfv $filename; done
mkdir data
mv tcga* data
./runner.sh
./runner.sh full
```
#### Data splits generation
......@@ -100,7 +100,7 @@ All the {variables} can be specified either in a config.yaml file or on the comm
Example:
```bash
snakemake --config datafolder=data outfolder=results dataset=tcga_brca target=ER \
snakemake -s Snakefile_full --config datafolder=data outfolder=results dataset=tcga_brca target=ER \
layer1=gene layer2=cnv layer3=prot model=randomForest random=false split_id=0 -p
```
......@@ -119,3 +119,15 @@ snakemake --cores 12 -n
```
*A bash script (`runner.sh`) is provided for convenience, in order to run the pipeline for each split, to compute Borda of Bordas and to average metrics for all the splits.*
Depending on what kind of SNF-DAP you want (either a "full DAP" or an "accelerated DAP" - please see the article for the details), run:
```bash
./runner.sh full
```
to execute a "full DAP" and:
```bash
./runner.sh accelerated
```
to excecute an "accelerated DAP".
Please note that if you don't provide any argument, by default a "full DAP" will be executed.
#%%
import os
import subprocess
import numpy as np
DATAFOLDER = config['datafolder']
OUTFOLDER = config['outfolder']
DATASET = config['dataset']
MODEL = config['model']
TARGET = config['target']
SPLIT_ID = config['split_id']
LAYERS = [config[k] for k in config.keys() if k.startswith('layer')]
LAYERS_CONCAT = "_".join(LAYERS)
LAYERS_SPACED = " ".join(LAYERS)
old_target = TARGET
try:
RANDOM = config['random']
if RANDOM == 'true':
TARGET = TARGET + '_random'
except:
pass
rule all:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_MCC_scores.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_MCC_scores.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_MCC_scores.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/single/{layer}_tr_MCC_scores.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layer=LAYERS, split_id=SPLIT_ID)
rule create_labels_random:
output:
f"{DATAFOLDER}/{DATASET}/{TARGET}/{SPLIT_ID}/labels_{TARGET}_tr.txt",
f"{DATAFOLDER}/{DATASET}/{TARGET}/{SPLIT_ID}/labels_{TARGET}_ts.txt",
f"{DATAFOLDER}/{DATASET}/{TARGET}/{SPLIT_ID}/labels_{TARGET}_ts2.txt",
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS),
run:
print(RANDOM)
if RANDOM:
path = os.path.abspath(os.path.join(f'{DATAFOLDER}/{DATASET}/{old_target}/{SPLIT_ID}'))
path_random = os.path.join(f'{DATAFOLDER}/{DATASET}/{TARGET}/{SPLIT_ID}')
# link each data file but labels as they need to be shuffled
files_to_link = [f for f in os.listdir(path) if not f.startswith('labels')]
for f in files_to_link:
if not os.path.exists(f'{path_random}/{f}'):
subprocess.call(f'ln -s {path}/{f} {path_random}/{f}', shell=True)
subprocess.call(f'ln -s {path}/labels_{old_target}_ts2.txt {path_random}/labels_{TARGET}_ts2.txt', shell=True)
labels_file_tr = f'{path}/labels_{old_target}_tr.txt'
shuffled_labels_file_tr = f'{path_random}/labels_{TARGET}_tr.txt'
labels_file_ts = f'{path}/labels_{old_target}_ts.txt'
shuffled_labels_file_ts = f'{path_random}/labels_{TARGET}_ts.txt'
np.random.seed(0)
with open(labels_file_tr, 'r') as f_old:
labels = np.array(f_old.readlines())
np.random.shuffle(labels)
with open(shuffled_labels_file_tr, 'w') as f_new:
f_new.write(''.join(labels))
np.random.seed(0)
with open(labels_file_ts, 'r') as f_old:
labels = np.array(f_old.readlines())
np.random.shuffle(labels)
with open(shuffled_labels_file_ts, 'w') as f_new:
f_new.write(''.join(labels))
rule concat_layers:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS)
output:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layer=LAYERS_CONCAT)
shell:
f"python preprocessing/concat_layers.py --datafolder {DATAFOLDER} --dataset {DATASET} --target {TARGET} --layers {LAYERS_SPACED} --split_id {SPLIT_ID}"
rule ml_juxt_tr:
input:
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layers}_tr.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/labels_{target}_tr.txt")
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log"
shell:
"python sklearn_training.py {input} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/juxt --model {wildcards.model} --ranking KBest"
rule ml_juxt_val:
input:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log",
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layers}_tr.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layers}_ts.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/labels_{target}_ts.txt")
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_MCC_scores.txt"
shell:
"python sklearn_validation.py {input[0]} {input[2]} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/juxt --tslab {input[3]}"
rule snf:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layer=LAYERS, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID)
threads: 8
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/INF_{layers}_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
run:
all_input = [i[1] for i in input.allitems()]
inputfiles = " ".join(all_input[:-1])
labfile = all_input[-1]
subprocess.call(f"Rscript snf_integration.R --data {inputfiles} --lab {labfile} \
--scriptDir SNFtools/ --clust spectral --threads {threads} \
--outf {output}", shell=True)
rule ml_rsnf_tr:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID),
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/INF_{layers}_tr.txt",
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
shell:
"python sklearn_training.py {input[0]} {input[1]} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/rSNF --model {wildcards.model} --ranking rankList --rankFeats {input[2]}"
rule ml_rsnf_val:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_MCC_scores.txt",
shell:
"python sklearn_validation.py {input[0]} {input[1]} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/rSNF --tslab {input[2]}"
rule myintersect:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_intersect_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
shell:
"python intersect_biomarkers.py {input} {output}" ########
rule extract:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_intersect_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
shell:
"python extract_topfeats_onecol.py {input} {output}"
rule ml_rsnfi_tr:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_{model}_KBest.log"
shell:
"python sklearn_training.py {input} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/rSNFi --model {wildcards.model} --ranking KBest"
rule ml_rsnfi_val:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layers=LAYERS_CONCAT)
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_MCC_scores.txt"
shell:
"python sklearn_validation.py {input[0]} {input[1]} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/rSNFi --tslab {input[2]}"
rule single_tr:
input:
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layer}_tr.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/labels_{target}_tr.txt")
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/single/{layer}_tr_{model}_KBest.log"
shell:
"python sklearn_training.py {input} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/single --model {wildcards.model} --ranking KBest"
rule single_val:
input:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/single/{layer}_tr_{model}_KBest.log",
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layer}_ts.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/labels_{target}_ts.txt")
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/single/{layer}_tr_MCC_scores.txt"
shell:
"python sklearn_validation.py {input[0]} {input[1]} {wildcards.outfolder}/{wildcards.dataset}/{wildcards.target}/{wildcards.model}/{wildcards.split_id}/single --tslab {input[2]}"
......@@ -4,11 +4,6 @@ import subprocess
import numpy as np
#%%
# these can be set on runtime:
# snakemake --config datafolder="mydata" outfolder="out" dataset="breast" model="RandomForest" target="ER" layer1="gene" layer2="cnv" layer3="prot" split_id="1"(...)
DATAFOLDER = config['datafolder']
OUTFOLDER = config['outfolder']
DATASET = config['dataset']
......@@ -136,7 +131,7 @@ rule ml_juxt_tr:
rule ml_juxt_val:
input:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log",
ancient("{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layers}_tr.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/{layers}_ts.txt"),
os.path.join(DATAFOLDER, "{dataset}/{target}/{split_id}/labels_{target}_ts.txt")
......@@ -147,10 +142,10 @@ rule ml_juxt_val:
rule snf:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr_{{cv_n}}_{{cv_k}}.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layer=LAYERS, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr_{{cv_n}}_{{cv_k}}.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID),
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/{layer}_tr_{{cv_n}}_{{cv_k}}.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layer=LAYERS, split_id=SPLIT_ID)),
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr_{{cv_n}}_{{cv_k}}.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID)),
threads: 8
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/INF_{layers}_tr_{{cv_n}}_{{cv_k}}.txt",
......@@ -166,12 +161,12 @@ rule snf:
rule ml_rsnf_tr:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID),
snf_rankings = expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/INF_{layers}_tr_{cv_n}_{cv_k}.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT, cv_n=list(range(CV_N)), cv_k=list(range(CV_K)))
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_tr.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID)),
snf_rankings = ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/INF_{layers}_tr_{cv_n}_{cv_k}.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT, cv_n=list(range(CV_N)), cv_k=list(range(CV_K))))
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
shell:
......@@ -180,12 +175,12 @@ rule ml_rsnf_tr:
rule ml_rsnf_val:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
output:
"{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_MCC_scores.txt",
shell:
......@@ -194,10 +189,10 @@ rule ml_rsnf_val:
rule myintersect:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/juxt/{layers}_tr_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNF/{layers}_tr_{model}_rankList.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID))
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_intersect_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
......@@ -207,10 +202,10 @@ rule myintersect:
rule extract:
input:
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID),
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_intersect_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
ancient(expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, layers=LAYERS_CONCAT, split_id=SPLIT_ID)),
ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_intersect_tr.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID))
output:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts.txt",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, layers=LAYERS_CONCAT, split_id=SPLIT_ID)
......@@ -232,8 +227,8 @@ rule ml_rsnfi_tr:
rule ml_rsnfi_val:
input:
expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
ancient(expand("{outfolder}/{dataset}/{target}/{model}/{split_id}/rSNFi/{layers}_ts_{model}_KBest.log",
outfolder=OUTFOLDER, dataset=DATASET, target=TARGET, model=MODEL, split_id=SPLIT_ID, layers=LAYERS_CONCAT)),
expand("{datafolder}/{dataset}/{target}/{split_id}/{layers}_ts2.txt",
datafolder=DATAFOLDER, dataset=DATASET, target=TARGET, split_id=SPLIT_ID, layers=LAYERS_CONCAT),
expand("{datafolder}/{dataset}/{target}/{split_id}/labels_{target}_ts2.txt",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment