Skip to content
Snippets Groups Projects
Commit 37fdd729 authored by Rayan  CHIKHI's avatar Rayan CHIKHI
Browse files

auto generation of results

parent afe8cbe7
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,10 @@ def parse_args():
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('filename', type=str,
help='The file to evalute')
parser.add_argument('experiment', type=str,
help='name of experiment (optional, for figure print)')
parser.add_argument('type', type=str,
help='graph type (optional, for figure print)')
args = parser.parse_args()
return args
......@@ -150,7 +154,9 @@ def evaluate_accuracy_paths(path_len,max_paths_per_node=5):
else:
nb_bad_paths += 1
nb_paths = nb_bad_paths + nb_good_paths
print("accuracy for l=%d (%d paths, %d nodes explored):" % (path_len, nb_paths, nb_paths*path_len),nb_good_paths / (nb_good_paths + nb_bad_paths))
acc = nb_good_paths / (nb_good_paths + nb_bad_paths)
#print("accuracy for l=%d (%d paths, %d nodes explored):" % (path_len, nb_paths, nb_paths*path_len),acc)
return acc
# ---- sensitivity evaluation
......@@ -207,7 +213,9 @@ def evaluate_sensitivity_paths(path_len,overlap_length=7000):
nb_found += 1
else:
nb_not_found += 1
print("sensitivity for l=%d" % path_len, nb_found / (nb_not_found + nb_found))
sens = nb_found / (nb_not_found + nb_found)
#print("sensitivity for l=%d" % path_len, sens)
return sens
from multiprocessing import Pool
......@@ -217,13 +225,22 @@ def main():
graph = load_graph(args.filename)
p = Pool(12)
points = [2,4,10,25,50,75,100,150]
#p.map(evaluate_accuracy_paths, [1,2,4,6,8,10,15,20,50,100,200,500])
p.map(evaluate_accuracy_paths, [2,4,10,100])
p.map(evaluate_sensitivity_paths, [2,4,10,100])
accs = p.map(evaluate_accuracy_paths, points)
sens = p.map(evaluate_sensitivity_paths, points)
#evaluate_accuracy_paths(100)
#evaluate_sensitivity_paths(1)
#evaluate_sensitivity_paths(3)
#evaluate_sensitivity_paths(10)
# latex print
#print(' & '.join("%0.2f & %0.2f" % (x,y) for (x,y) in list(zip(accs,sens))) + '\\' )
# figure print
if len(sys.argv) > 2:
experiment = sys.argv[2]
type = sys.argv[3]
for i,l in enumerate(points):
print(experiment,type,l,accs[i],sens[i])
p.close()
p.join()
......
for n in 5000 10000
do
for d in 5
do
for m in 2 3
do
for dev in 0 1
do
echo "n=$n d=$d m=$m m_dev=$dev"
rm -f snake_exec/simu_0_bar_n"$n"_d"$d"_m"$m"-dev0.gexf &&
snakemake -s Snakefile_data_simu --config n=$n d=$d m=$m m_dev=$dev >/dev/null 2>&1
cd snake_exec && source CMD_acc_sens && cd ..
done
done
done
done
#!/bin/bash
python3 ../deconvolution/main/to_d2_graph.py simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf >/dev/null 2>&1
mv d2_graph.gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph.gexf
python ../deconvolution/main/d2_reduction.py --output_d2_name simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph_reduced.gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph.gexf 2>&1 >/dev/null
echo "Gb $n $d $m $dev"
python ../deconvolution/main/d2_random_path_evaluation.py simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf $n-$d-$dev Gb
echo "Lcp $n $d $m $dev"
python ../deconvolution/main/d2_random_path_evaluation.py simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph_reduced.gexf $n-$d-$dev Lcp
#!/bin/bash
python3 ../deconvolution/main/to_d2_graph.py simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf
mv d2_graph.gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph.gexf
python ../deconvolution/main/d2_reduction.py --output_d2_name simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph_reduced.gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph.gexf
python ../deconvolution/main/d2_to_path_simple.py simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph_reduced.gexf
python ../deconvolution/main/evaluate.py --type path --barcode_graph simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf simu_0_bar_n"$n"_d"$d"_m"$m"-dev"$dev".gexf.d2_graph_reduced_path.gexf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment