📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit 23f9cbc2 authored by Louis Duchemin's avatar Louis Duchemin
Browse files

In-house LMM x Gemma hybrid performance evaluation

parent d15d6813
......@@ -65,6 +65,7 @@ let methods = Pipeline.[
(* meth pcoc_v2 ~col:3 "pcoc v2" ; *)
meth (gemma ~lmm_test:`Score ~relatedness_mode:`Standardized) "gemma" ;
meth inhouse_lmm "LMM" ;
meth (lmm_with_gemma_matrix ~relatedness_mode:`Standardized) "LMM_Gemma";
meth multinomial_asymptotic_lrt "multinomial" ;
meth topological "topological" ~requires_rooted_tree:true ;
]
......
......@@ -58,6 +58,10 @@ module type S = sig
val inhouse_lmm : query -> cpt file
val lmm_with_gemma_matrix : query ->
relatedness_mode:[ `Centered | `Standardized ] ->
cpt file
val diffsel : query -> cpt file
val diffseldsparse :
......@@ -198,6 +202,19 @@ module Make (Q : Query) = struct
let tree = tree ~branch_length_unit:`Amino_acid q in
Inhouse_lmm.test alignment tree
let lmm_with_gemma_matrix q ~relatedness_mode =
let alignment = amino_acid_alignment q in
let tree = tree ~branch_length_unit:`Amino_acid q in
let genotype = Gemma.genotype_of_fasta alignment in
let phenotype = Gemma.phenotype_of_tree tree in
let relatedness_matrix =
Gemma.calculate_relatedness_matrix ~mode:relatedness_mode ~genotype
~phenotype
in
Inhouse_lmm.test ~correlation_method:(Inhouse_lmm.Gemma relatedness_matrix)
alignment tree
let diffseltree d =
Tree_dataset.prepare_diffsel_tree
(tree ~branch_length_unit:`Amino_acid d)
......
......@@ -58,6 +58,10 @@ module type S = sig
val inhouse_lmm : query -> cpt file
val lmm_with_gemma_matrix : query ->
relatedness_mode:[ `Centered | `Standardized ] ->
cpt file
val diffsel : query -> cpt file
val diffseldsparse :
......
open Bistro
open Phylogenetics
open Codepitk
module Tk = Codepitk
module LMM = Codepitk.Inhouse_lmm
let test alignment tree =
type correlation_method = Brownian | Gemma of Gemma.relatedness_matrix file
let correlation_method_dep = function
| Brownian -> [%workflow LMM.Brownian]
| Gemma matrix -> [%workflow LMM.Gemma [%path matrix]]
let test ?(correlation_method=Brownian) alignment tree =
let f = fun%workflow dest ->
let alignment =
Alignment.from_fasta [%path alignment]
|> Rresult.R.get_ok
in
let tree =
Convergence_tree.from_file [%path tree]
Tk.Convergence_tree.from_file [%path tree]
|> Result.get_ok
in
Inhouse_lmm.test ~alignment ~tree ()
|> Inhouse_lmm.result_table_of_test
|> Result_table.to_file ~output:dest
let cor_estimation = [%eval correlation_method_dep correlation_method] in
LMM.test ~cor_estimation ~alignment ~tree ()
|> LMM.result_table_of_test
|> Tk.Result_table.to_file ~output:dest
in
Workflow.path_plugin ~descr:"inhouse_lmm.test" f
open Bistro
open File_formats
type correlation_method = Brownian | Gemma of Gemma.relatedness_matrix file
val test :
?correlation_method:correlation_method ->
aminoacid_fasta file ->
nhx file ->
cpt file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment