Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
VEBER Philippe
codepi
Commits
c2c0c1e0
Commit
c2c0c1e0
authored
Nov 23, 2020
by
Philippe Veber
Browse files
Simulation_dataset: added nhx_of_convergence_tree
parent
f3ec331f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
lib/simulation_pipeline.ml
lib/simulation_pipeline.ml
+21
-0
lib/simulation_pipeline.mli
lib/simulation_pipeline.mli
+4
-0
No files found.
lib/simulation_pipeline.ml
View file @
c2c0c1e0
...
...
@@ -15,6 +15,27 @@ type tree =
branch_length2
:
float
;
}
let
nhx_of_convergence_tree
tree
=
let
f
=
fun
%
workflow
dest
->
let
open
Phylogenetics
in
let
open
Codepitk
in
let
tree
=
[
%
eval
tree
]
|>
Tree
.
map
~
node
:
(
fun
()
->
{
Newick_ast
.
name
=
None
})
~
leaf
:
(
fun
s
->
{
Newick_ast
.
name
=
Some
s
})
~
branch
:
Convergence_tree
.(
fun
bi
->
let
tags
=
match
bi
.
condition
with
|
`Ancestral
->
[
"Condition"
,
"0"
]
|
`Convergent
->
[
"Condition"
,
"1"
;
"Transition"
,
"1"
]
in
{
Newick_ast
.
length
=
Some
bi
.
length
;
tags
}
)
in
Newick
.
to_file
(
Tree
tree
)
dest
in
Workflow
.
path_plugin
~
descr
:
"nhx_of_convergence_tree"
f
module
type
S
=
sig
type
query
...
...
lib/simulation_pipeline.mli
View file @
c2c0c1e0
...
...
@@ -9,6 +9,10 @@ type tree =
branch_length2
:
float
;
}
val
nhx_of_convergence_tree
:
Codepitk
.
Convergence_tree
.
t
workflow
->
nhx
file
module
type
S
=
sig
type
query
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment