Next Article in Journal
Expression Analysis of the TdDRF1 Gene in Field-Grown Durum Wheat under Full and Reduced Irrigation
Previous Article in Journal
Gnas Promoter Hypermethylation in the Basolateral Amygdala Regulates Reconsolidation of Morphine Reward Memory in Rats
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Note on DNA Analysis and Redesigning Using Markov Chain

by
Maciej Zakarczemny
*,† and
Małgorzata Zajęcka
Department of Applied Mathematics, Faculty of Computer Science and Telecommunications, Cracow University of Technology (CUT), 24 Warszawska Street, 31-155 Cracow, Poland
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Genes 2022, 13(3), 554; https://doi.org/10.3390/genes13030554
Submission received: 28 January 2022 / Revised: 7 March 2022 / Accepted: 9 March 2022 / Published: 21 March 2022
(This article belongs to the Section Bioinformatics)

Abstract

:
The paper contains a discussion on mathematical modifying and redesigning DNA with the use of Markov chains. We give a simple mathematical technique for overwriting missing parts of DNA. With a certain probability (without even knowing the function of the missing codon) we can find a synonymous codon, so that there is no frequency change in amino acid sequences of proteins. We use Markov Chain to analyze the dependencies in DNA sequence of the human gene Alpha 1,3-Galactosyltransfe rase 2. We include a theoretical introduction which facilitates the understanding of the paper for non-mathematicians, especially for biologists not familiar with the theory of Markov chains.
MSC:
92B05; 60J20

1. Introduction

1.1. Motivation and Methods

Modeling and analyzing DNA sequences using statistical methods have been a challenge for statisticians and biologists for many years. For many years, the most common approach was based on the theory of Markov chains. Well known simple models appeared in the mid-1980s in the papers by B.E. Blaisdell [1] and V. Brendel, J.S. Beckmann, E.N. Trifonov [2]. This was later followed by more advanced models developed to study different biological aspects of DNA (see [3,4,5]) that have been also using Markov chains (both homogeneous and non-homogeneous ones, possibly of higher orders). There are some statistical results showing that first-order Markov chains are not an adequate model for DNA sequences (see, e.g., [6]). Moreover, the latest comparison studies (see [7]) show that in general DNA sequencing by models based on even higher order Markov chains does not fit perfectly. Thus the latest research in DNA sequencing in bioinformatics is focusing on deep learning methods (see [8]). The methods presented in this paper, however, are local rather than statistical. We apply our model to DNA sequences less than 55 base pairs long, which is not enough for statistical methods. Markov chain theory is being applied to modeling music and literature. For example, a random song generated by a Markov chain based on some given piece of music, can achieve a similarity level comparable to this piece (see [9,10,11]). The question arises whether DNA can be handled similarly to a piece of music. Numerous attempts to write an understandable text as the realization of a low-order Markov chain have not proved successful. For high-order Markov chains, however, such a text becomes understandable as it contains complete sentences from the original text (see [12,13,14]). Therefore, the question whether Markov chains of any order are suitable to study DNA sequencing becomes the question about the complexity of the DNA structure. In this paper we show methods for filling in short gaps in DNA sequences. The results obtained by our method are then compared with the original DNA sequence.

1.2. Notations

We consider a probability space ( Ω , F , P ) , where Ω = { S 1 , S 2 , , S n } denotes a finite state space, i.e., the set of all possible results of an experiment, F is a σ -field of events, and P : F [ 0 , 1 ] denotes a probabilistic measure. By random variable we denote a function Z : Ω R such that for any a R a preimage Z 1 ( ( , a ] ) is in the σ -field F . In our case a random variable will allow us to assign natural numbers to states from the state space Ω : let E be a single experiment with possible results forming Ω , if in t-th repetition (i.e., in time t) of experiment E we obtain result S j Ω , then we put Z t = j , where Z t is a random variable with natural values.

1.3. Stochastic Matrices

Definition 1.
A matrix Π = ( p i j ) i , j { 1 , , n } is called stochastic if all p i j are non-negative and for any i we have j = 1 n p i j = 1 (right stochastic matrix) or for any j we have i = 1 n p i j = 1 (left stochastic matrix). A doubly stochastic matrix is both left stochastic and right stochastic. A vector with non-negative real elements is a stochastic vector if its elements sum to one.
Remark 1.
Rows of right (columns of left) stochastic matrix are row (vertical) stochastic vectors.
Using basic algebra one can prove the following remark.
Remark 2.
The product of two right (two left) stochastic matrices is a right (left) stochastic matrix.
Definition 2.
A square matrix A = ( a i j ) i , j { 1 , , n } is called irreducible if for any partition S T = { 1 , , n } , S T = there exists s S , t T such that a s t 0 .
Definition 3.
Let A be a square matrix. An eigenvalue of A is a complex number λ such that det ( A λ I ) = 0 (i.e., λ is a zero with multiplicity k 1 of the characteristic polynomial p A ( λ ) = det ( A λ I ) ), where I denotes the identity matrix. The set of all eigenvalues is called spectrum.
Definition 4.
The eigenvector of a of a square matrix A is a column vector v such that A v = λ v , where λ is an eigenvalue of A. The left eigenvector of a square matrix A is a column vector w such that w T A = λ w T , where λ is an eigenvalue of A. Some authors define the left eigenvector as a row vector w T .

2. Markov Chains

A Markov chain is a sequence of random variables forming a probabilistic model describing a memoryless type of dependency: the future may depend only on the present and must be independent of the past.

2.1. Model

1.
E is an experiment with possible results forming a finite set Ω = { S 1 , S 2 , , S n } ;
2.
S = { 1 , 2 , , n } is a state space associated with Ω ;
3.
( Ω , F , P ) is a probability space, where F 2 Ω is a σ -field and P is a probabilistic measure P : F [ 0 , ) ;
4.
Z t is a random variable defined as follows: if in t-th repetition of experiment E we obtain result S j Ω , then we put Z t = j S .
Definition 5.
A sequence of random variables ( Z t ) t = 0 with values in a state space S is a Markov chain if for all t N and all j 0 , j 1 , , j t S
P ( Z t = j t | Z 0 = j 0 , Z 1 = j 1 , , Z t 1 = j t 1 ) = P ( Z t = j t | Z t 1 = j t 1 )
if only
P ( Z 0 = j 0 , Z 1 = j 1 , , Z t 1 = j t 1 ) > 0 .
Remark 3.
In the general case a state space S can be an arbitrary countable subset of N (positive integers).
Remark 4.
The Equation (1) is called Markov property and its right-hand side is called a transition operator i.e., the probability of moving from state j t 1 to state j t in one step.
Definition 6.
Let ( Z t ) t = 0 be a Markov chain. For t 1 we call a stochastic matrix Π ( t ) = ( p i j ( t ) ) i , j S a transition Matrix of a Markov chain ( Z t ) in time t if
p i j ( t ) = P ( Z t = j | Z t 1 = i )
for all i such that P ( Z t 1 = i ) > 0 . Since the total of transition probability from one state to all other states must be equal to one, thus this matrix is a right stochastic matrix.
Definition 7.
Let ( Z t ) t = 0 be a Markov chain. If P ( Z t = j t | Z t 1 = j t 1 ) is independent of t, then we call this Markov chain homogeneous.
Remark 5.
For our convenience we index states by t, but we remind the reader of the following property of homogeneous Markov chains
P ( Z t = j t | Z t 1 = j t 1 ) = P ( Z t + m = j t | Z t + m 1 = j t 1 ) , t , m N .
Remark 6.
If a Markov chain ( Z t ) t = 0 is homogeneous then there exists a stochastic matrix Π = ( p i j ) i , j S such that for all t 1 transition matrix Π ( t ) = Π , where each value p i j is the probability of moving from state i to state j in one step.
Now we are going to consider probabilities of moving from state to state in larger number of steps.
Definition 8.
Let ( Z t ) t = 0 be a homogeneous Markov chain. For m 1 we call a stochastic matrix Π ( m ) = ( p i j ( m ) ) i , j S a transition Matrix of a Markov chain ( Z t ) in m steps if
p i j ( m ) = P ( Z m = j | Z 0 = i )
for all i such that P ( Z 0 = i ) > 0 .
Theorem 1.
Let ( Z t ) t = 0 be a homogeneous Markov chain. Then Π ( m ) = Π m .
Proof. 
For m = 1 theorem is true because Π ( 1 ) = Π . For m 2 from the law of total probability we obtain
p i j ( m ) = P ( Z m = j | Z 0 = i ) = s S P ( Z m 1 = s | Z 0 = i ) P ( Z m = j | Z m 1 = s ) = s S p i s ( m 1 ) p s j .
Hence Π ( m ) = Π ( m 1 ) Π , thus Π ( m ) = Π m . □
Example 1
(Random walk on a complex plane). Identify adenine with i , cytosine with 1, guanine with 1 , and thymine with i. Let ( U n ) n = 0 be a sequence of independent random variables such that for any n 1 :
P ( U n = 1 ) = p 1 , P ( U n = i ) = p 2 , P ( U n = 1 ) = p 3 , P ( U n = i ) = p 4 ,
where p 1 + p 2 + p 3 + p 4 = 1 , and P ( U 0 = 0 ) = 1 .
For n 1 define Z n = U 0 + U 1 + + U n which is a random variable with values in state space of Gaussian integers Z [ i ] = { a + b i : a , b Z } . Gaussian integers form a commutative ring and 2-dimensional integer lattice. We show that ( Z n ) n = 0 is a Markov sequence.
Let j 0 , j 1 , , j n Z [ i ] be such that P ( Z 0 = j 0 , Z 1 = j 1 , , Z n 1 = j n 1 ) > 0 . Then, from definition of Z n ,
P ( Z n = j n | Z 0 = j 0 , Z 1 = j 1 , , Z n 1 = j n 1 ) = P ( Z 0 = j 0 , Z 1 = j 1 , , Z n 1 = j n 1 , Z n = j n ) P ( Z 0 = j 0 , Z 1 = j 1 , , Z n 1 = j n 1 ) = P ( U 0 = j 0 , U 1 = j 1 j 0 , , U n 1 = j n 1 j n 2 , U n = j n j n 1 ) P ( U 0 = j 0 , U 1 = j 1 j 0 , , U n 1 = j n 1 j n 2 ) = P ( U 0 = j 0 ) P ( U 1 = j 1 j 0 ) · · P ( U n 1 = j n 1 j n 2 ) P ( U n = j n j n 1 ) P ( U 0 = j 0 ) P ( U 1 = j 1 j 0 ) · · P ( U n 1 = j n 1 j n 2 ) = P ( U n = j n j n 1 )
because variables ( U n ) n = 0 were independent. Observe that variables U n and Z n 1 are also independent, thus
P ( U n = j n j n 1 ) = P ( U n = j n j n 1 ) P ( Z n 1 = j n 1 ) P ( Z n 1 = j n 1 ) = P ( Z n 1 = j n 1 , U n = j n j n 1 ) P ( Z n 1 = j n 1 ) = P ( Z n 1 = j n 1 , Z n = j n ) P ( Z n 1 = j n 1 ) = P ( Z n = j n | Z n 1 = j n 1 ) .
One can show that E ( | Z n | ) —the expected translation distance after n steps is of order n , more precise, lim n E ( | Z n | ) n = π 2 . With our identification of adenine ( i ), cytosine (1), guanine ( 1 ), and thymine (i) using Markov chain ( Z n ) n = 0 we can consider probability that from n-th to m-th place in DNA strand, n < m , number of adenine equals number of thymine and, simultaneously, number of cytosine equals number of guanine. This situation means that our random walk made a loop, that is Z n = Z m (see Figure 1). If one needs to research other pairwise equalities it suffices to change the identification. Denote Z [ n 1 , n 2 ] = { Z n : n 1 n n 2 } . One can show that for all k 2 we have P ( Z [ 0 , k ] Z [ 2 k , 3 k ] ) > 0 . That means that with positive probability there exists n [ 0 , k ] and m [ 2 k , 3 k ] such that Z n = Z m , i.e., we have a loop.

2.2. Classification of States and Chains

In this subsection, we will give some mathematical background and also state some well known results, see [7,15].
Definition 9.
A state i is called accessible from state j if there exists n 0 such that P ( Z n = i | Z 0 = j ) > 0 . If state i is accessible from state j and vice versa we say that states i and j communicate.
Observe that communication is an equivalence relation that divides states into equivalence classes called communicating classes.
Definition 10.
A Markov chain is called irreducible if its state space forms a single communicating class.
In other words, in irreducible Markov chain it is possible to get from any state to any state (every two states communicate).
Definition 11.
A state i is called inessential if there exists a state j and n 1 such that P ( Z n = j | Z 0 = i ) > 0 and P ( Z k = i | Z 0 = j ) = 0 for any k 0 . A state is essential if it is not inessential.
Denote f i j ( n ) = P ( Z n = j , Z n 1 j , , Z 1 j | Z 0 = i ) , F i j = n = 1 f i j ( n ) , P i = n = 1 p i i ( n ) and define N i = n = 1 1 { Z n = i } , M i = n = 1 1 { T i i n } , where T i j = inf { n N : Z n = j } when Z 0 = i . Then f i j ( n ) is a probability that we access state j from state i exactly in n steps, F i j is a probability that we ever access state j from state i, P i a trace of the transition matrix in n steps, N i is a random variable that counts how many times state i is accessed and M i is a random variable that counts how many steps are needed to reappear in state i for the first time.
Remark 7.
P i = n = 1 P ( Z n = i | Z 0 = i ) = n = 1 E ( 1 { Z n = i } | Z 0 = i ) = E ( N i | Z 0 = i ) ,
where E denotes an expected value. Thus P i is an average time a Markov chain is in state i (averagely how many times Markov chain is in state i). If we define μ i = n = 1 P ( T i i n | Z 0 = i ) then μ i = E ( M i | Z 0 = i ) . Thus μ i is an average number of steps needed to reappear in state i.
Definition 12.
A state i is called recurrent if F i i = 1 . If F i i < 0 then state i is called transient.
We will need the following result.
Theorem 2
(see [15]).
(a) 
A state i is recurrent if and only if P ( N i = | Z 0 = i ) = 1 .
(b) 
A state i is transient if and only if P ( N j < | Z 0 = i ) = 1 .
Theorem 3.
(a) 
A state i is transient if and only if P i < .
(b) 
A state i is recurrent if and only if P i = .
Proof. 
Note that for all states i , j and natural n we have
p i j ( n ) = m = 1 n f i j ( m ) p j j ( n m ) .
It follows from the fact that accessing state j from state i after n steps means that we access state j for the first time after exactly m steps (for some m n ) and then after next n m steps we return to it (perhaps reaching state j a few times on the way). Thus we have
k = 1 n p i i ( k ) = k = 1 n m = 0 k 1 f i i ( k m ) p i i ( m ) = m = 0 n 1 p i i ( m ) k = m + 1 n f i i ( k m ) m = 0 n p i i ( m ) F i i = F i i + F i i m = 1 n p i i ( m ) .
Hence we get an inequality
( 1 F i i ) m = 1 n p i i ( m ) F i i .
Since n is arbitrary, as n tends to infinity we obtain
( 1 F i i ) P i F i i .
Assume that state i is transient. Then from (6) we obtain P i < . On the other hand if P i < then E ( N i | Z 0 = i ) < , thus P ( N i = | Z 0 = i ) = 0 . From Theorem 2 state i is transient. If i is recurrent, then we must have P i = (otherwise see proof of point (a)). Now assume P i = . If F i i < 1 then ( 1 F i i ) P i is unbounded and from (6) we get a contradiction. □
Remark 8.
In irreducible Markov chain either all states are recurrent or all states are transient. Thus we call an irreducible Markov chain recurrent or transient, depending on type of states.
Remark 9.
One can show that for a finite Markov chain (chain with a finite state space) a state is inessential if and only if it is transient, thus a state is essential if and only if it is recurrent.
Remark 10.
In the case of gene A3GALT2 each state is essential (because all entries in transition matrix are nonzero), thus from Remark 9 each state is recurrent. This also can be shown using properties of transition matrix: evaluate p i i ( n ) from the matrix Π n . Then P i = for each i { a , c , g , t } . From Theorem 3 we once again obtain that each state is recurrent.
Definition 13.
A state i is called null-recurrent if lim n p i i ( n ) = 0 . A state which is not null-recurrent is called positive recurrent.
Definition 14.
A state i is called periodic with period d i if d i = GCD { n > 0 : p i i ( n ) > 0 } > 1 (if for all n > 0 we have p i i ( n ) = 0 then we put d i = ). If d i = 1 state i is called aperiodic.
Definition 15.
A state which is aperiodic, recurrent, and positive recurrent is called ergodic.
Remark 11.
In case of our matrix Π all states are ergodic.
For irreducible matrices we have the following property.
Theorem 4.
A Markov chain is irreducible if and only if for all j { 1 , , n } there exists a limit
lim t p i j ( t ) = p j , i , j { 1 , , n } ,
independent of i, where p j , j { 1 , , n } , form a unique solution of the following system of equations
i = 1 n p i p i j = p j , j { 1 , , n } j = 1 n p j = 1 .
A special case of irreducible Markov chain is a regular Markov chain.
Definition 16.
A irreducible Markov chain is called regular if there exists k N such that all entries of the matrix Π k are positive. In other words there exists k N such that from any state we can reach any state in exactly k steps.
Definition 17.
Let Π be a transition matrix of a Markov chain. A stationary probability vector is a stochastic vector (see Definition 1) such that π = π Π . In other words π is a stochastic eigenvector associated with eigenvalue λ = 1 of matrix Π.
Theorem 5
(see [15]). Let Π ( m ) = ( p i j ( m ) ) i , j S be a transition matrix in m steps of an irreducible aperiodic Markov chain ( Z n ) with finite state space S . Then
(i) 
for any i , j S there exists a limit lim m p i j ( m ) = π j , where π j > 0 ,
(ii) 
Markov chain ( Z n ) is recurrent,
(iii) 
a vector π = ( π j ) j S is a unique stationary probability vector, moreover,
π j = 1 μ j where μ j is an average number of steps needed to reappear in state j.
For regular Markov chains we have the following result.
Theorem 6.
Let Π be a transition matrix of an irreducible aperiodic Markov chain with finite state space. Then matrix Π ( m ) converges to a positive stochastic matrix W such that if π is a row of matrix W, then π = π Π .

2.3. Analysis of Alpha 1,3-Galactosyltransferase 2

We show that a time homogeneous Markov chain is an appropriate simple model of Alpha 1,3-Galactosyltransferase 2 (A3GALT2). We use transition matrices as a criterion for identifying similarities in structure of this particular gene. A3GALT2 is a Protein Coding gene (a region of DNA) located in chromosome 1, position 33,306,766, consisting of 14,333 bases [16].
Let Ω = { S 1 , S 2 , S 3 , S 4 } , where S 1 = A , S 2 = C , S 3 = G , S 4 = T , and S = { 1 , 2 , 3 , 4 } be a corresponding state space. We form a stochastic matrix (7) as follows. For example we would like to know how probable is that after adenine ( A ) occurs cytosine ( C ). We count all occurrences of a pair AC in gene A3GALT2 and divide it by number of all occurring pairs which start from A . Number of all such pairs is equal to number of occurrences of A provided that A is not the last nucleotid base in gene A3GALT2.
Π = A C G T A C G T 769 3195 745 3195 1093 3195 588 3195 1140 4052 1392 4052 350 4052 1170 4052 811 3715 934 3715 1254 3715 716 3715 475 3370 980 3370 1018 3370 897 3370
Note that because the last nucleotide base in gene A3GALT2 is T , in the denominator in last row we have 3370 instead of 3371.
Remark 12.
One can pose a question of biological interpretation of matrix Π. Does the occurrences of nucleotid bases can be used to identify a specific gene or, in general case, to identify an individual?
Because all entries of matrix Π are positive, in the case of gene A3GALT2 a suitable Markov chain is irreducible (see Definition 10) and each d i = 1 for i S thus our chain is aperiodic (see Definition 14). From Theorem 5 for any i , j S there exists a limit lim m p i j ( m ) = π j > 0 , suitable Markov chain is recurrent, π = ( π j ) j S is a unique stationary probability vector and π j = 1 μ j where μ j is an average number of steps needed to reappear in state j.
Remark 13.
The stationary probability vector of matrix Π is
π = ( 0.22292 , 0.28265 , 0.25923 , 0.23521 ) .
Remark 14.
Note that if nucleotide bases in gene A3GALT2 are a good estimation of a possible sequence of values of a Markov chain, then from Remark 13 probability of occurrence of a should be 0.22292, c: 0.28265, g: 0.25923 and t: 0.23521. Comparing this with computed probabilities from Table 1 (a: 0.222912, c: 0.282704, g: 0.259192, t: 0.235192) we see that they are correct up to the fourth decimal place.
Corollary 1.
From Remark 13 we can compute approximate values of μ j : μ 1 4.486 , μ 2 3.538 , μ 3 3.858 , μ 4 4.252 which means that an average number of steps needed for each nucleotide base to reappear in our gene is approximately 4 for all bases. Thus we conclude that bases are uniformly distributed in gene A3GALT2 which means that they appear to be random and disorganized.
All of the above considerations can be repeated for pairs of bases, see Table 2.

3. The Markov Process Model of Nucleotide Substitution

We assume that nucleotide substitution is follow a homogeneous Markov process. We take Ω = { S 1 , S 2 , S 3 , S 4 } , where S 1 = A , S 2 = C , S 3 = G , S 4 = T . Let S = { 1 , 2 , 3 , 4 } be a corresponding state space. Let P ( t ) = { P μ ν ( t ) } is a matrix of transition probabilities in time t . We assume that P ( t ) = Q P ( t ) where Q = { Q μ ν } is the rate matrix of the process.
Remark 15.
Figure 2, Figure 3, Figure 4 and Figure 5 show four situations in which the sequence starts with adenine, cytosine, guanine, and thymine, respectively. In each case, the probabilities of occurence of a given base stabilize. Finally, they converge to the probabilities forming a stationary probability vector. Note that, as predicted by Corollary 1, in each case stabilization is achieved after about four steps.

4. Application in DNA Sequencing, Redesigned DNA

The meaning of DNA sequencing is here deemed to cover all methods used to determine the order of nucleotides along a DNA strand. The objective of this section is to present an example of applying Markov chains to complete short fragments of a DNA strand. Markov chains have been applied as mathematical models of real-life processes. Such real-life dynamical systems, examined with Markov-chain method, include
-
queues of passengers arriving at an airport,
-
currency exchange rates or
-
animal population dynamics.
Markov chains are also applied to build algorithms calculating the PageRank value for a website (see [17]). The website PageRank value reflects the probability that a random internet surfer will land on this webpage upon clicking a link. Markov processes of various orders are used to model DNA sequencing (see also [6]). A Markov process of order m is one for which the probability of any event depends exclusively on the m preceding events. Statistically, DNA does not have the features of a first-order Markov chain. Higher-order models have been proposed for analyzing interrelations within a DNA sequence, see [6]. Statistical tests used in [6] properly determined the order of the Markov chain being tested for sequences of length 2 9 base pairs or higher. Nevertheless, the authors consider it important to present the method described below for local problems, that is for very short DNA sequences (54 base pairs in our example). We believe it is worth examining the results of local DNA completion based on the properties of first-order Markov chains, when the length of a DNA sequence is less than 2 9 base pairs. The method presented below is a simple, local tool for completing short DNA segments. The method has also educational value. Moreover, instead of analyzing a DNA sequence of the five unit nucleotides, we may use first-order Markov chains to analyze codons or, more precisely, amino acids encoded with those codons. It is worth recalling here some basic facts and conventions:
-
Codon is a sequence of three nucleotides (a triplet) occurring in mRNA, a unit encoding a specific amino acid during protein synthesis;
-
Proteins are built of 20 different amino acids;
-
The sequence of amino acids in a protein exactly follows the sequence of the relevant codons in mRNA;
-
Most amino acids are encoded in several ways (with different codons, which, however, differ from one another usually on the third place in the triplet only); owing to this, certain changes in the genetic information (mutations) do not affect the amino acid sequence;
-
There are 61 codons encoding amino acids and 3 non-encoding codons (they are STOP codons: UAG, UAA, UGA); all in all: 4 3 various triplets;
-
The AUG codon, read as the first one in mRNA by a ribosome during protein synthesis is known as the initiation or start codon;
-
Since a mutation of a single nucleotide changes a single amino acid, the genetic code has to be read as non-overlapping, i.e., any given codon may be followed by any other codon;
-
To get the form typical of DNA, each U in an mRNA codon should be replaced by T; for instance, TAA is the DNA equivalent of the mRNA codon UAA;
-
In the case of a sequence of amino acids, understood as resulting from first-order Markov process action, the transition matrix is a square matrix of degree at most 21. One state is reserved for the three STOP codons, which do not encode amino acids.
Example 2.
Let us consider the human SATB1 gene, which, as research has revealed, is a major growth factor for breast cancer, see [18]. Let us generate a DNA sequence based on SATB1 (this gene is on chromosome 3, locus p23, on the minus strand). The table below sets forth a 54-base-pair-long segment of SATB1, position 18,389,139. Data is sourced from website [19], accessed upon entering human gene SATB1.
The relevant state space comprises four nucleotides: Ω 1 = { A , C , G , T } . The corresponding amino acid sequence is:
Val Lys Arg Leu Ser Asp Lys Asn Lys Ser Ser Leu STOP Gln Leu Cys Cys STOP .
We give another sequence in Table 3, as a variation of the method consists in examining the sequence of amino acids and not the DNA sequence of base pairs. For the sequence of the DNA segment under this analysis, the state space is:
Ω 2 = { Asn , Asp , Arg , Cys , Leu , Lys , Gln , Ser , Val , STOP } .
In the application of the method described below, it is important that in both tables the last element occurs at least twice. Assume that in the sequence in Table 4, the TCC codon (corresponding to the amino acid serine (Ser)) is missing. We want to properly complete the following sequence including three adjacent gaps:
GTCAAAAGACTCTCCGACAAAAACAAA AGTCTC TAGCAGTTATGTTGTTAG
In the other approach, using representation with amino acids (see Table 3), we want to complete the following corresponding sequence including a single gap:
Val Lys Arg Leu Ser Asp Lys Asn Lys Ser Leu STOP Gln Leu Cys Cys STOP .
The (extensive) transition matrix corresponding to sequence (8) is:
Π 1 = A C G T A C G T 9 18 3 18 5 18 1 18 4 10 1 10 1 10 4 8 2 8 1 8 0 8 5 8 3 13 5 13 2 13 3 13
Let us observe that the number of occurrences of G in sequence (8) is 8, as we do not count the last occurrence, because it is not paired. The number of occurrences of A in sequence (8) is 18, as we do not count the last occurrence of A , before the lacking fragment, because this occurrence is not paired. Analogously, the transition matrix corresponding to sequence (9) is:
Π 2 = Asn Asp Arg Cys Leu Lys Gln Ser Val Stop Asn Asp Arg Cys Leu Lys Gln Ser Val Stop 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 3 0 1 3 0 0 0 0 1 3 0 0 0 0 0 1 2 0 0 0 0 0 1 2 0 0 0 1 3 0 0 0 1 3 0 1 3 1 3 0 1 3 0 0 0 0 1 3 0 0 0 0 0 0 1 0 0 0 0 0 0 1 3 0 0 1 3 0 0 1 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Note that, after rounding, the stationary probability vector of matrix Π 1 is equal to:
π 1 ( 0.367347 , 0.204082 , 0.163265 , 0.265306 ) .
For the sake of comparison, we below give rounded relative frequencies of nucleotide occurrences, as disclosed in Table 4:
A : 0.351852 , C : 0.222222 , G : 0.166667 , T : 0.259259 .
The values sourced from Table 4 are not identical to the respective coordinates of the vector π 1 , given that:
1
the sequence of 54 nucleotides is short,
2
in sequence (8), three nucleotides are lacking (cf. Remark 14).
Using the transition matrix Π 1 , we will run an experiment, described below, which will allow us to complete sequence (8). One can proceed analogously using the matrix Π 2 , which we will not do, given the symmetry of the method. The description of the experiment makes it possible to repeat it with no IT tools.
Prepare four boxes, labeled A , C , G and T . In each box, there are assorted balls labeled A , C , G and T . The numbers of balls of individual colors in box A are in proportion to respective entries of the first row of the matrix Π 1 . Thus there are 9 balls labeled A , 3 balls labeled C , 5 balls labeled G , and 1 ball labeled T , a total of 18 balls. We fill the other boxes ( C , G and T ) analogously. Now the experiment begins. In sequence (8), there is a gap after A . Therefore, we draw one ball from box A at random. Assume we have drawn T , which can be done with probability 1 18 . In the next step we draw from the box labeled the same way as the most recently drawn ball; in our experiment it is box T . Assume we have drawn C from box T , which can be done with probability 5 13 . Proceeding this way, we now draw a ball from box C . Assume we have again drawn C, which can be done with probability 1 10 . Thus we have generated three consecutive elements of the sequence GTCAAAAGACTCTCCGACAAAAACAAA , namely TCC , and we fill the gap in sequence (8) with this result. We have recovered the original sequence presented in Table 4. The algorithm works as shown in Figure 6.
For the reader’s convenience, we present in Figure 7 below a computer program written in the Python 3 language, the source code is also available in GitHub [20].

5. Conclusions

The method just presented is primarily of educational value. The procedure is described suggestively and, the authors believe, explanatory, which makes it possible for the method to be used in a more general context, also by non-mathematicians. The authors do not imply that the probability of achieving the proper completion of a DNA genome is satisfactory; they only present a tool which may be used for such completion and with which they would like to familiarize the reader. The authors are aware that the contemporary efforts in the area of DNA genome completion are focusing on deep learning rather than on Markov chains even of higher orders, see [8]. This paper proposes an alternative tool that can be explained suggestively and deeply. It is now clear that the deep learning methods lead to more exact completions than the Markov chains methods. Yet, our method allows for understanding of what happens behind the process of proper completion and sequencing. It should therefore be treated as of explanatory and educational value, with a potential for future research. It is worth asking, if the algorithms presented in Example 2 might be used to easily generate test data for more advanced deep learning algorithms (see [21]).

Author Contributions

Conceptualization, M.Z. (Maciej Zakarczemny); methodology, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); software, M.Z. (Małgorzata Zajęcka); validation, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); formal analysis, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); investigation, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); resources, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); data curation, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); writing—original draft preparation, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); writing—review and editing, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); visualization, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka); supervision, M.Z. (Maciej Zakarczemny) and M.Z. (Małgorzata Zajęcka). All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Blaisdell, B.E. Markov chain analysis finds a significant influence of neighboring bases on the occurrence of a base in eucaryotic nuclear DNA sequences both protein-coding and noncoding. J. Mol. Evol. 1985, 21, 278–288. [Google Scholar] [CrossRef] [PubMed]
  2. Brendel, V.; Beckmann, J.S.; Trifonov, E.N. Linguistics of nucleotide sequences: Morphology and comparison of vocabularies. J. Biomol. Struct. Dyn. 1986, 4, 11–21. [Google Scholar] [CrossRef] [PubMed]
  3. Avery, P.J.; Henderson, D.A. Fitting Markov chain models to discrete state series such as DNA sequences. Appl. Stat. 1999, 48, 53–61. [Google Scholar] [CrossRef]
  4. Wu, T.-J.; Hsieh, Y.-C.; Li, L.-A. Statistical Measures of DNA Sequence Dissimilarity under Markov Chain Models of Base Composition. Biometrics 2001, 57, 441–448. [Google Scholar] [CrossRef] [PubMed]
  5. Pérez-Lechuga, G.; Venegas-Martínez, F.; Martínez-Sánchez, J.F. Mathematical Modeling of Manufacturing Lines with Distribution by Process: A Markov Chain Approach. Mathematics 2021, 9, 3269. [Google Scholar] [CrossRef]
  6. Usotskaya, N.; Ryabko, B. Applications of information-theoretic tests for analysis of DNA sequences based on Markov chain models. Comput. Stat. Data Anal. 2009, 53, 1861–1872. [Google Scholar] [CrossRef]
  7. Ching, W.; Huang, X.; Ng, M.K.; Siu, T.K. Markov Chains: Models, Algorithms and Applications; Springer: New York, NY, USA, 2013; Volume 189. [Google Scholar]
  8. Yang, A.; Zhang, W.; Wang, J.; Yang, K.; Zhang, L. Review on the Application of Machine Learning Algorithms in the Sequence Data Mining of DNA. Front. Bioeng. Biotechnol. 2020, 8, 1032. [Google Scholar] [CrossRef] [PubMed]
  9. Bell, C. Algorithmic music composition using dynamic markov chains and genetic algorithms. J. Comput. Sci. Coll. 2011, 27, 99–107. [Google Scholar]
  10. Linskens, E.J. Music Improvisation Using Markov Chains. Available online: https://dke.maastrichtuniversity.nl/gm.schoenmakers/wp-content/uploads/2015/09/Linskens-Final-Draft.pdf (accessed on 16 January 2022).
  11. Liu, Y.W.; Selfridge-Field, E. Modeling Music as Markov Chains: Composer Identification. 2002. Available online: https://ccrma.stanford.edu/~jacobliu/254report/ (accessed on 16 January 2022).
  12. Hayes, B. First Links in the Markov Chain. Am. Sci. 2013, 101, 92. Available online: https://www.americanscientist.org/sites/americanscientist.org/files/201321152149545-2013-03Hayes.pdf (accessed on 16 January 2022). [CrossRef]
  13. Markov, A. An Example of Statistical Investigation of the Text Eugene Onegin Concerning the Connection of Samples in Chains. Sci. Context 2006, 19, 591–600. [Google Scholar] [CrossRef] [Green Version]
  14. Yang, Z.; Jin, S.; Huang, Y.; Zhang, Y.; Li, H. Automatically generate steganographic text based on markov model and huffman coding. arXiv 2018, arXiv:1811.04720. [Google Scholar]
  15. Jakubowski, J.; Sztencel, R. Introduction to Probability Theory; Script: Poland, Warsaw, 2010. (In Polish) [Google Scholar]
  16. A3GALT2 at National Center for Biotechnology Information, U.S. National Library of Medicine. Available online: https://www.ncbi.nlm.nih.gov/gene/127550 (accessed on 16 January 2022).
  17. PageRank, in Wikipedia. Available online: https://en.wikipedia.org/wiki/PageRank (accessed on 16 January 2022).
  18. Wang, X.; Yu, X.; Wang, Q.; Lu, Y.; Chen, H. Expression and clinical significance of SATB1 and TLR4 in breast cancer. Oncol. Lett. 2017, 14, 3611–3636. [Google Scholar] [CrossRef] [PubMed]
  19. Wolfram Alpha LLC. Wolfram|Alpha. Available online: https://www.wolframalpha.com/ (accessed on 16 January 2022).
  20. Zakarczemny, M. Note on DNA Analysis and Redesigning Using Markov Chain Simulations. Available online: https://github.com/MaciejZakar/SATB1program (accessed on 16 January 2022).
  21. Jääskinen, V. Bayesian Stochastic Partition Models For Markovian Dependence Structures; University of Helsinki: Helsinki, Finland, 2015. [Google Scholar]
Figure 1. Fifty-four step random walk from a central point on a complex plane. Based on DNA sequence from Example 2.
Figure 1. Fifty-four step random walk from a central point on a complex plane. Based on DNA sequence from Example 2.
Genes 13 00554 g001
Figure 2. Probabilities of occurrences of the bases in consecutive steps starting from adenine.
Figure 2. Probabilities of occurrences of the bases in consecutive steps starting from adenine.
Genes 13 00554 g002
Figure 3. Probabilities of occurrences of the bases in consecutive steps starting from cytosine.
Figure 3. Probabilities of occurrences of the bases in consecutive steps starting from cytosine.
Genes 13 00554 g003
Figure 4. Probabilities of occurrences of the bases in consecutive steps starting from guanine.
Figure 4. Probabilities of occurrences of the bases in consecutive steps starting from guanine.
Genes 13 00554 g004
Figure 5. Probabilities of occurrences of the bases in consecutive steps starting from thymine.
Figure 5. Probabilities of occurrences of the bases in consecutive steps starting from thymine.
Genes 13 00554 g005
Figure 6. Illustration for Example 2.
Figure 6. Illustration for Example 2.
Genes 13 00554 g006
Figure 7. Program executes computations from Example 2 with probabilities from the transition matrix Π 1 and generates the completion of sequence (8) with exactly three elements.
Figure 7. Program executes computations from Example 2 with probabilities from the transition matrix Π 1 and generates the completion of sequence (8) with exactly three elements.
Genes 13 00554 g007
Table 1. Occurence of nucleotide bases in A3GALT2.
Table 1. Occurence of nucleotide bases in A3GALT2.
Nucleotide BasesOccurence in A3GALT2Probability (Occurence Divided by Length of Gene)
A3195 0.222912
C4052 0.282704
G3715 0.259192
T3371 0.235192
Table 2. Occurence of nucleotide pairs of bases in A3GALT2.
Table 2. Occurence of nucleotide pairs of bases in A3GALT2.
Pairs of BasesOccurence in A3GALT2ProbabilityPairs of BasesOccurence in A3GALT2Probability
AA769 769 14 , 332 GA811 811 14 , 332
AC745 745 14 , 332 GC934 934 14 , 332
AG1093 1093 14 , 332 GG1254 1254 14 , 332
AT588 588 14 , 332 GT716 716 14 , 332
CA1140 1140 14 , 332 TA475 475 14 , 332
CC1392 1392 14 , 332 TC980 980 14 , 332
CG350 350 14 , 332 TG1018 1018 14 , 332
CT1170 1170 14 , 332 TT897 897 14 , 332
Table 3. The sequence of amino acids corresponding to 54-base-pair-long segment of SATB1.
Table 3. The sequence of amino acids corresponding to 54-base-pair-long segment of SATB1.
1,2,34,5,67,8,910,11,1213,14,1516,17,1819,20,2122,23,2425,26,27
ValLysArgLeuSerAspLysAsnLys
28,29,3031,32,3334,35,3637,38,3940,41,4243,44,4546,47,4849,50,5152,53,54
SerSerLeuSTOPGlnLeuCysCysSTOP
Table 4. Numbered 54-base-pair-long segment of SATB1.
Table 4. Numbered 54-base-pair-long segment of SATB1.
123456789101112131415161718
GTCAAAAGACTCTCCGAC
192021222324252627282930313233343536
AAAAACAAATCCAGTCTC
373839404142434445464748495051525354
TAGCAGTTATGTTGTTAG
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zakarczemny, M.; Zajęcka, M. Note on DNA Analysis and Redesigning Using Markov Chain. Genes 2022, 13, 554. https://doi.org/10.3390/genes13030554

AMA Style

Zakarczemny M, Zajęcka M. Note on DNA Analysis and Redesigning Using Markov Chain. Genes. 2022; 13(3):554. https://doi.org/10.3390/genes13030554

Chicago/Turabian Style

Zakarczemny, Maciej, and Małgorzata Zajęcka. 2022. "Note on DNA Analysis and Redesigning Using Markov Chain" Genes 13, no. 3: 554. https://doi.org/10.3390/genes13030554

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop