Commit 7ee9fe7d authored by Carine Rey's avatar Carine Rey
Browse files

fix errors comming from real data (indels)

parent 672218d3
......@@ -118,6 +118,8 @@ let conf_file_bppseqman_fna2faa ~fna =
assign "output.sequence.file" dest ;
string {|alphabet=Codon(letter=DNA)
genetic_code = Standard
input.sequence.remove_stop_codons = no
input.sequence.sites_to_use = all
input.alignment = true
sequence.manip = Translate
|}
......@@ -136,6 +138,8 @@ let conf_file_bppseqman_fa2phy ~fna =
assign "output.sequence.file" dest ;
assign "output.sequence.format" (string "Phylip") ;
string {| input.alignment = true
input.sequence.remove_stop_codons = no
input.sequence.sites_to_use = all
sequence.manip =
|}
]
......
......@@ -12,15 +12,17 @@ let assign k v =
let conf_file_bppml ~tree ~faa ~out ~config =
seq ~sep:"\n" (
[
[
assign "OUT" (out) ;
assign "input.sequence.file" (dep faa) ;
assign "alphabet" (string "Protein") ;
assign "input.sequence.remove_stop_codons" (string "no") ;
assign "input.sequence.sites_to_use" (string "all") ;
assign "input.tree.file" (dep tree) ;
assign "init.tree" (string "user") ;
assign "input.tree.format" (string "Nhx") ;
assign "optimization.topology" (string "false") ;
assign "output.tree.file" (string "$(OUT)/tree.nhx") ;
......@@ -48,11 +50,11 @@ let bppml ?(descr="") ~faa ~tree ~config : _ workflow =
]
)
]
let conf_file_bppancestor ~tree ~faa ~out ~config =
seq ~sep:"\n" (
[
[
assign "OUT" (out) ;
assign "input.sequence.file" (dep faa) ;
assign "alphabet" (string "Protein") ;
......@@ -60,7 +62,7 @@ let conf_file_bppancestor ~tree ~faa ~out ~config =
assign "input.tree.file" (dep tree) ;
assign "init.tree" (string "user") ;
assign "input.tree.format" (string "Nhx") ;
assign "optimization.topology" (string "false") ;
assign "output.sequence.file" (string "$(OUT)/output_anc.fa") ;
......
......@@ -110,6 +110,7 @@ df_final["Sites"] = pd.to_numeric(df_final["Sites"].str.replace('[','').str.repl
df_final["Topological"] = map(prob_ap, df_final["lnL_conv"],df_final["lnL_noconv"])
df_final = df_final[["Sites","Topological"]]
#===================================================================================================
# Create output files
#===================================================================================================
......
......@@ -132,9 +132,9 @@ df_list = [df for df in [df_pcoc, df_pcoc_gamma,
] if not df.empty ]
df_list_len = [df.shape[0] for df in df_list]
if len(set(df_list_len)) != 1:
print("ERROR: all files have not the same number of rows")
sys.exit(1)
print("WARNING: all files have not the same number of rows")
df_final = reduce(lambda x, y: pd.merge(x, y, on = 'Sites', how='outer'), df_list)
......
......@@ -16,6 +16,8 @@ let conf_file_bppml ~tree ~faa ~out ~config =
assign "OUT" (out) ;
assign "input.sequence.file" (dep faa) ;
assign "alphabet" (string "Protein") ;
assign "input.sequence.remove_stop_codons" (string "no") ;
assign "input.sequence.sites_to_use" (string "all") ;
assign "input.tree.file" (dep tree) ;
assign "init.tree" (string "user") ;
......
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