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
656b6af8
Commit
656b6af8
authored
Jun 18, 2018
by
Carine Rey
Browse files
refactor output directory as "datasets"
parent
8b707edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
lib/pipeline.ml
lib/pipeline.ml
+31
-3
No files found.
lib/pipeline.ml
View file @
656b6af8
...
...
@@ -22,14 +22,42 @@ let select_out parsed_tree t = match t with
|
Tree4simu
->
parsed_tree
/
selector
[
"tree.only_node_ids.nhx"
]
|
Tree_diffsel
->
parsed_tree
/
selector
[
"tree.diffsel"
]
let
ready_dataset_of_raw_dataset
raw_dataset
=
let
tree
=
raw_dataset
.
input_tree
in
let
fna
=
raw_dataset
.
fna
in
let
parsed_tree
=
parse_input_tree
~
tree
in
let
faa
=
Bppsuite
.
fna2faa
~
fna
in
{
parsed_tree
;
fna
;
faa
}
let
repo_of_ready_dataset
ready_dataset
=
Repo
.[
item
[
"ready_dataset/tree.H0.node_ids"
]
(
ready_dataset
.
parsed_tree
/
selector
[
"tree.H0.node_ids"
])
;
item
[
"ready_dataset/tree.Ha.node_ids"
]
(
ready_dataset
.
parsed_tree
/
selector
[
"tree.Ha.node_ids"
])
;
item
[
"ready_dataset/tree.only_convergent_tags.nhx"
]
(
ready_dataset
.
parsed_tree
/
selector
[
"tree.only_convergent_tags.nhx"
])
;
item
[
"ready_dataset/tree.only_node_ids.nhx"
]
(
ready_dataset
.
parsed_tree
/
selector
[
"tree.only_node_ids.nhx"
])
;
item
[
"ready_dataset/tree.diffsel"
]
(
ready_dataset
.
parsed_tree
/
selector
[
"tree.diffsel"
])
;
item
[
"ready_dataset/simulated_sequences.fna"
]
ready_dataset
.
fna
;
item
[
"ready_dataset/simulated_sequences.faa"
]
ready_dataset
.
faa
;
]
let
repo_of_raw_dataset
raw_dataset
=
Repo
.[
item
[
"raw_dataset/input_tree.nhx"
]
raw_dataset
.
input_tree
;
item
[
"raw_dataset/simulated_sequences.fna"
]
raw_dataset
.
fna
;
]
let
derive_from_tree
~
tree_dir
~
tree
~
preview
=
let
tree
=
input
(
Filename
.
concat
tree_dir
tree
)
in
let
nb_sites
=
if
preview
then
10
else
100
in
let
parsed_tree
=
parse_input_tree
~
tree
in
let
fna
=
Bppsuite
.
bppseqgen
~
nb_sites
~
tree
:
(
select_out
parsed_tree
Tree4simu
)
in
Repo
.[
item
[
"simulated_sequences.fna"
]
fna
;
]
let
faa
=
Bppsuite
.
fna2faa
~
fna
in
let
raw_dataset
=
{
input_tree
=
tree
;
fna
}
in
let
ready_dataset
=
{
parsed_tree
;
fna
;
faa
}
in
if
preview
then
repo_of_ready_dataset
ready_dataset
else
repo_of_raw_dataset
raw_dataset
let
derive
~
tree_dir
~
trees
~
preview
=
List
.
map
trees
~
f
:
(
fun
tree
->
...
...
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