Skip to content

Commit

Permalink
Update BioMarkovChains.jl to improve "Get Started" section and packag…
Browse files Browse the repository at this point in the history
…e installation instructions
  • Loading branch information
camilogarciabotero committed Jun 8, 2024
1 parent 373c788 commit 229777c
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions docs/src/getstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ seq = dna"CCTCCCGGACCCTGGGCTCGGGAC"

BioMarkovChain(sequence)
```

BioMarkovChain of DNAAlphabet{4}() and order 1:
- Transition Probability Matrix -> Matrix{Float64}(4 × 4):
0.0 1.0 0.0 0.0
0.0 0.5 0.2 0.3
0.25 0.125 0.625 0.0
0.0 0.6667 0.3333 0.0
- Initial Probabilities -> Vector{Float64}(4 × 1):
0.087 0.4348 0.3478 0.1304
```
BioMarkovChain of DNAAlphabet{4}() and order 1:
- Transition Probability Matrix -> Matrix{Float64}(4 × 4):
0.0 1.0 0.0 0.0
0.0 0.5 0.2 0.3
0.25 0.125 0.625 0.0
0.0 0.6667 0.3333 0.0
- Initial Probabilities -> Vector{Float64}(4 × 1):
0.087 0.4348 0.3478 0.1304
```

Note that, sometimes the dinucleotides transition do not harbor important biological meaning, whereas trinucleotides or codons are, in
fact, the building block of proteins. Therefore, sometimes the transition model we want to build is usually a second-order Markov chain, that represents the possible transitions of a trinucleotide.
Expand All @@ -38,12 +39,13 @@ A very nice nice property of the transition probability matrix is that the *n-st
``` julia
BioMarkovChain(sequence, 2)
```

BioMarkovChain of DNAAlphabet{4}() and order 2:
- Transition Probability Matrix -> Matrix{Float64}(4 × 4):
0.0 0.5 0.2 0.3
0.05 0.475 0.325 0.15
0.1562 0.3906 0.4156 0.0375
0.0833 0.375 0.3417 0.2
- Initial Probabilities -> Vector{Float64}(4 × 1):
0.087 0.4348 0.3478 0.1304
```
BioMarkovChain of DNAAlphabet{4}() and order 2:
- Transition Probability Matrix -> Matrix{Float64}(4 × 4):
0.0 0.5 0.2 0.3
0.05 0.475 0.325 0.15
0.1562 0.3906 0.4156 0.0375
0.0833 0.375 0.3417 0.2
- Initial Probabilities -> Vector{Float64}(4 × 1):
0.087 0.4348 0.3478 0.1304
```

0 comments on commit 229777c

Please sign in to comment.