Commit f22a7cf1 authored by Carine Rey's avatar Carine Rey
Browse files

add phyml to re infer tree after simu

parent 5ea6131a
# PhyML
# http://www.atgc-montpellier.fr/phyml/
# v3.1
FROM debian:stretch
RUN apt-get update && apt-get install -y \
wget \
unzip
WORKDIR /phyml
RUN wget http://www.atgc-montpellier.fr/download/binaries/phyml/PhyML-3.1.zip \
&& unzip PhyML-3.1.zip \
&& rm -rf PhyML-3.1.zip \
&& mv PhyML-3.1/PhyML-3.1_linux64 /usr/local/bin/phyml \
&& chmod 755 /usr/local/bin/phyml \
&& rm -rf /phyml/PhyML-3.1
WORKDIR /data
#! /bin/bash
set -e
IMAGE_NAME=phyml
DOCKERFILE_DIR=.
TAG=v3.1
REPO=carinerey/$IMAGE_NAME:$TAG
docker build -t $REPO -f ./Dockerfile $DOCKERFILE_DIR
if [[ $1 == "push_yes" ]]
then
docker push $REPO
fi
open Core
open Bistro.Std
open Bistro.EDSL
open Bistro_bioinfo.Std
type phyml
let phyml ~tree phy : phyml directory workflow =
let env = docker_image ~account:"carinerey" ~name:"phyml" ~tag:"v3.1" () in
(*mpirun -np 4 phyml -o lr -u cyp_coding.ok.nwk -i cyp_coding.phy -d 'nt' -m gtr*)
let tmp_phy = dest // "tree.phy" in
workflow ~descr:"phyml" [
docker env (
and_list [
mkdir_p dest;
mkdir_p tmp;
cd tmp;
cmd "cp" [ dep phy ; ident tmp_phy] ;
cmd "phyml" ~env [
string "--quiet" ;
opt "-u" dep tree;
opt "-o" string "lr";
opt "-i" ident tmp_phy ;
opt "-d" string "nt" ;
opt "-m" string "gtr" ;
];
])
]
let phyml_tree ~tree phy =
(phyml ~tree phy) / selector ["tree.phy_phyml_tree.txt"]
......@@ -22,10 +22,13 @@ let of_raw (raw_dataset : Raw_dataset.t) =
let faa = Bppsuite.fna2faa ~fna in
{ input_tree; tree_dataset ; fna; faa; fna_infos}
let repo rd =
let phy = (Bppsuite.fa2phy rd.fna) in
Repo.[
[
item ["input_tree.nhx"] rd.input_tree ;
item ["recalculated_tree.nw"] (Phyml.phyml_tree ~tree:rd.input_tree phy );
item ["tree.H0.node_ids" ] (Tree_dataset.nodes rd.tree_dataset H0) ;
item ["tree.Ha.node_ids" ] (Tree_dataset.nodes rd.tree_dataset HaPCOC) ;
item ["tree.only_convergent_tags.nhx" ] (Tree_dataset.tree rd.tree_dataset `Detection) ;
......@@ -33,7 +36,7 @@ let repo rd =
item ["tree.diffsel" ] (Tree_dataset.diffsel_tree rd.tree_dataset) ;
item ["tree.convergent_topology" ] (Tree_dataset.topological_tree rd.tree_dataset) ;
item ["simulated_sequences.fna"] rd.fna ;
item ["simulated_sequences.phy"] (Bppsuite.fa2phy rd.fna) ;
item ["simulated_sequences.phy"] phy ;
item ["simulated_sequences.faa"] rd.faa ;
] ;
match rd.fna_infos with
......
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