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
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
VEBER Philippe
codepi
Commits
e764974c
Commit
e764974c
authored
Mar 11, 2021
by
Louis Duchemin
Browse files
Mutsel simulator stationary distribution
parent
3d706ee4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
lib/tk/mutsel_simulator_cpg.ml
lib/tk/mutsel_simulator_cpg.ml
+3
-14
No files found.
lib/tk/mutsel_simulator_cpg.ml
View file @
e764974c
...
...
@@ -2,6 +2,7 @@ open Core_kernel
open
Phylogenetics
module
NSCodon
=
Codon
.
Universal_genetic_code
.
NS
module
NSCodon_rate_matrix
=
Rate_matrix
.
Make
(
NSCodon
)
module
Evolution_model
=
struct
type
context_CpG
=
{
...
...
@@ -103,19 +104,7 @@ module Evolution_model = struct
|
None
->
0
.
)
let
stationary_distribution
p
=
let
pi
=
p
.
nucleotide_stat_dist
in
NSCodon
.
Vector
.
init
(
fun
codon
->
let
n1
,
n2
,
n3
=
NSCodon
.
nucleotides
codon
in
let
aa
=
NSCodon
.
aa_of_codon
codon
in
let
b
n
=
match
Nucleotide
.
inspect
n
with
|
A
|
T
->
-.
p
.
gBGC
|
C
|
G
->
+.
p
.
gBGC
in
Nucleotide
.(
pi
.%
(
n1
)
*.
pi
.%
(
n2
)
*.
pi
.%
(
n3
))
*.
exp
(
p
.
scaled_fitness
.
Amino_acid
.
%
(
aa
)
+.
(
b
n1
+.
b
n2
+.
b
n3
)
/.
2
.
)
)
|>
NSCodon
.
Vector
.
normalize
end
let
stationary_distribution
p
=
NSCodon_rate_matrix
.
stationary_distribution
(
rate_matrix
p
)
end
module
Make
(
BI
:
Simulator
.
Branch_info
)
=
Simulator
.
Make
(
NSCodon
)(
Evolution_model
)(
BI
)
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