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
4c569e33
Commit
4c569e33
authored
Sep 05, 2018
by
Philippe Veber
Browse files
alistats mode: computation of mean number of residues per column
parent
6bc754e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
app/reviewphiltrans_app.ml
app/reviewphiltrans_app.ml
+1
-0
lib/alignment.ml
lib/alignment.ml
+3
-1
lib/alistats.ml
lib/alistats.ml
+19
-0
No files found.
app/reviewphiltrans_app.ml
View file @
4c569e33
...
...
@@ -6,5 +6,6 @@ let () =
"simulation"
,
Pipeline
.
simulation_command
;
"detection"
,
Pipeline
.
detection_command
;
"validation"
,
Pipeline
.
validation_command
;
"alistats"
,
Alistats
.
command
;
]
|>
Command
.
run
lib/alignment.ml
View file @
4c569e33
...
...
@@ -8,9 +8,11 @@ type t = {
seqs
:
string
array
;
}
let
fmt
=
Biocaml_ez
.
Fasta
.{
default_fmt
with
allow_empty_lines
=
true
}
let
from_fasta
fn
=
match
Biocaml_ez
.
Fasta
.
with_file
fn
~
f
:
(
fun
_
items
->
Biocaml_ez
.
Fasta
.
with_file
~
fmt
fn
~
f
:
(
fun
_
items
->
Stream
.
map
items
~
f
:
(
fun
i
->
i
.
description
,
i
.
sequence
)
|>
Stream
.
to_array
|>
Array
.
unzip
...
...
lib/alistats.ml
0 → 100644
View file @
4c569e33
open
Core
let
main
~
alignment
()
=
match
Alignment
.
from_fasta
alignment
with
|
Ok
al
->
let
mu
,
sigma
=
Alignment
.
number_of_residues_per_column_stats
al
in
printf
"%f %f
\n
"
mu
sigma
|
Error
(
`Msg
msg
)
->
failwith
msg
let
command
=
let
open
Command
.
Let_syntax
in
Command
.
basic
~
summary
:
"Computes stats on alignments"
[
%
map_open
let
alignment
=
flag
"--alignment"
(
required
string
)
~
doc
:
"PATH Output directory"
in
main
~
alignment
]
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