Commit acc0e489 authored by LANORE Vincent's avatar LANORE Vincent
Browse files

Corrected nb_cols bug for profiles

parent f3b6864b
......@@ -60,21 +60,21 @@ let conf_file_bppseqgen_multi_profiles ~tree ~config =
let bppseqgen_multi_profiles_script ~config ~nb_sites_per_profile ~nb_combis ~nb_cols ~out ~profile_f =
let bppseqgen_multi_profiles_script ~config ~nb_sites_per_profile ~nb_combis ~out ~profile_f =
let vars = [
"FINAL_OUT", ident out ;
"PARAM", config ;
"PROFILE_F", dep profile_f ;
"NB_SITES", int nb_sites_per_profile ;
"NB_COMBI_PROFILES", int nb_combis ;
"NB_COLS", int nb_cols ;
]
in
bash_script vars {|
start_i=1
end_i=$NB_COMBI_PROFILES
NB_COLS=`awk '{print NF}' $PROFILE_F | sort -nu | tail -n 1 | head -n 1`
for ((i=start_i; i<=end_i; i++))
do
echo "i: $i"
......@@ -93,7 +93,6 @@ let bppseqgen_multi_profiles_script ~config ~nb_sites_per_profile ~nb_combis ~nb
let bppseqgen_multi_profiles ?(descr="") ~profile_f ~nb_sites ~tree ~config : nucleotide_fasta workflow =
let nb_sites_per_profile = if nb_sites > 100 then 2 else 1 in
let nb_combis = Pervasives.(nb_sites / nb_sites_per_profile) in
let nb_cols = 100 in (*TODO: automatiser le nb de cols du fichier profile_f*)
let config_f = dest // "config.bpp" in
let out = dest // "seq.fa" in
workflow ~descr:("bppsuite.bppseqgen" ^ descr) [
......@@ -103,7 +102,7 @@ let bppseqgen_multi_profiles ?(descr="") ~profile_f ~nb_sites ~tree ~config : nu
mkdir_p tmp;
cd tmp;
cmd "cat" ~stdout:config_f [(file_dump (conf_file_bppseqgen_multi_profiles ~tree ~config))];
cmd "bash" [(file_dump (bppseqgen_multi_profiles_script ~config:config_f ~nb_sites_per_profile ~nb_combis ~nb_cols ~out ~profile_f))];
cmd "bash" [(file_dump (bppseqgen_multi_profiles_script ~config:config_f ~nb_sites_per_profile ~nb_combis ~out ~profile_f))];
]
)
] / selector ["seq.fa"]
......
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