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
82c33888
Commit
82c33888
authored
Oct 26, 2020
by
Louis Duchemin
Browse files
Implements Gemma output to Result_table workflow
parent
868cfd29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
lib/gemma.ml
lib/gemma.ml
+19
-0
lib/gemma.mli
lib/gemma.mli
+11
-1
No files found.
lib/gemma.ml
View file @
82c33888
...
...
@@ -31,6 +31,13 @@ let%pworkflow phenotype_of_tree nhx =
let
template_of_lmm
lmm
=
int
(
match
lmm
with
`Wald
->
1
|
`LRT
->
2
|
`Score
->
3
|
`All
->
4
)
class
type
univariate_lmm_output
=
object
inherit
tsv
method
format
:
[
`gemma_test_output
]
end
let
univariate_lmm
~
lmm
~
genotype
~
phenotype
~
relatedness_matrix
=
Workflow
.
shell
~
descr
:
"gemma.univariate_lmm"
[
...
...
@@ -63,3 +70,15 @@ let calculate_relatedness_matrix ~mode ~genotype ~phenotype =
];
cmd
"cp"
[
tmp
//
relatedness_filename
mode
;
dest
];
]
let
%
pworkflow
[
@
version
3
]
result_table_of_output
gemma_output
=
let
module
R
=
Reviewphiltrans_toolbox
.
Gemma
.
Result_file
in
let
open
Phylogenetics
in
match
R
.
of_file
[
%
path
gemma_output
]
with
|
Error
msg
->
failwith
msg
|
Ok
result_file
->
R
.
to_result_table
result_file
~
site_aggregator
:
(
fun
items
->
List1
.
to_list
items
|>
List
.
map
~
f
:
R
.
min_pval_of_item
|>
List
.
reduce_exn
~
f
:
Float
.
min
)
|>
Reviewphiltrans_toolbox
.
Result_table
.
to_file
~
output
:
[
%
dest
]
lib/gemma.mli
View file @
82c33888
...
...
@@ -18,10 +18,20 @@ val calculate_relatedness_matrix :
phenotype
:
bimbam
file
->
relatedness_matrix
file
class
type
univariate_lmm_output
=
object
inherit
tsv
method
format
:
[
`gemma_test_output
]
end
val
univariate_lmm
:
lmm
:
[
`Wald
|
`LRT
|
`Score
|
`All
]
->
genotype
:
bimbam
file
->
phenotype
:
bimbam
file
->
relatedness_matrix
:
relatedness_matrix
file
->
tex
t
file
univariate_lmm_outpu
t
file
val
result_table_of_output
:
univariate_lmm_output
file
->
text
file
\ No newline at end of file
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