Skip to content

Commit

Permalink
added gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
nifets committed Apr 2, 2023
1 parent af27044 commit 6729152
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.archive
File renamed without changes.
13 changes: 10 additions & 3 deletions src/EvolutionSimulator.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
using OffsetArrays
using BioStructures

include("distributions/WrappedNormal.jl")
include("distributions/Processes.jl")
include("distributions/SubstitutionModel.jl")
include("distributions/TKF92.jl")
include("distributions/WrappedDiffusion.jl")
include("utils/Backbone.jl")
# evolution simulation - sample descendant from ancestor

sequence(chain) = aa_to_id.(collect(string(LongAA(chain, standardselector))))
Expand Down Expand Up @@ -90,7 +97,7 @@ function sample_descendant(X, alignment, subprocess, evolprocess, t)
end


function simulator(t; λ = 0.001, μ = 0.0010001, r = 0.7, γ = 0.9)
function simulator(t; λ = 0.1, μ = 0.10001, r = 0.7, γ = 0.1)
chain = read("data/pdb/1A3N.pdb", PDB)["A"]

X = vcat(reshape(sequence(chain), 1, :), angles(chain))
Expand All @@ -102,8 +109,8 @@ function simulator(t; λ = 0.001, μ = 0.0010001, r = 0.7, γ = 0.9)

mat, pii = TKF92TransitionMatrix(λ, μ, r, t)
alignment = sample_alignment_from_ancestor(mat, size(X, 2), pii)
Y, _ = sample_descendant(X, alignment, subprocess, evolprocess, t)
Y, filled_alignment = sample_descendant(X, alignment, subprocess, evolprocess, t)
new_chain = build_chain_from_alignment(chain, alignment, Y)

display(filled_alignment)
return new_chain
end

0 comments on commit 6729152

Please sign in to comment.