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
Open sidebar
VEBER Philippe
codepi
Commits
ff73f17e
Commit
ff73f17e
authored
Mar 28, 2020
by
Philippe Veber
Browse files
update wrt phylogenetics
parent
a56faf3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
lib/orthomam.ml
lib/orthomam.ml
+2
-11
No files found.
lib/orthomam.ml
View file @
ff73f17e
...
...
@@ -68,22 +68,13 @@ let tag_tree t tagged_leaves =
Fitch
.
fitch
~
n
:
2
~
category
t
|>
transfer_tag_to_branches
let
with_inner_newick_tree
tree
~
f
=
let
open
Phylogenetics
in
match
(
tree
:
Newick
.
t
)
with
|
Tree
t
->
Newick
.
Tree
(
f
t
)
|
Branch
(
Branch
{
tip
;
data
})
->
Newick
.
Branch
(
Tree
.
branch
data
(
f
tip
)
)
let
%
pworkflow
clip_tree_on_alignment
tree
ali
=
let
open
Phylogenetics
in
let
tree
=
Newick
.
from_file
[
%
path
tree
]
in
let
ali
=
Phylip
.
read_exn
~
strict
:
false
[
%
path
ali
]
in
let
ali_species
=
List
.
map
ali
.
items
~
f
:
(
fun
it
->
it
.
name
)
in
let
clipped_tree
=
with_inner_newick
_tree
tree
~
f
:
(
fun
tree
->
Newick
.
map_inner
_tree
tree
~
f
:
(
fun
tree
->
match
Tree
.
leafset_generated_subtree
tree
(
fun
bi
->
bi
.
Newick
.
name
)
ali_species
...
...
@@ -105,7 +96,7 @@ let tree_of_convergent_species tree species =
let
ensembl_tree
=
Newick
.
from_file
omm_tree
in
let
tagged_tree
=
with_inner_newick
_tree
ensembl_tree
~
f
:
(
fun
t
->
Newick
.
map_inner
_tree
ensembl_tree
~
f
:
(
fun
t
->
tag_tree
t
(
String
.
Set
.
of_list
species
)
)
in
...
...
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