Abstract
Advances in DNA information extraction techniques have led to huge sequenced genomes from organisms spanning the tree of life. This increasing amount of genomic information requires tools for comparison of the nucleotide sequences. In this paper, we propose a novel nucleotide sequence alignment method based on sparse coding and belief propagation to compare the similarity of the nucleotide sequences. We used the neighbors of each nucleotide as features, and then we employed sparse coding to find a set of candidate nucleotides. To select optimum matches, belief propagation was subsequently applied to these candidate nucleotides. Experimental results show that the proposed approach is able to robustly align nucleotide sequences and is competitive to SOAPaligner [1] and BWA [2].
I. Introduction
The latest sequencing technologies have generated numerous sequenced genomes for various species. This increasing volume of data requires tools that can accurately compare multiple genome sequences to aid in the study of populations, pan-genomes, and genome evolution [1], [2]. For a particular study, many individual genomes may be sequenced to investigate genetic diversity. For example, the Cancer Genome Atlas [3] and 1000 Genomes Project [4] will generate genome sequences from several thousand people. The complete bacterial genomes in public databases are already over one thousand. To better utilize this huge amount of sequenced genome information, many tools have been developed that are capable of efficiently finding similar sequences from whole genomes. Whole genome sequence alignment are used for studying genome evolution and genetic diversity [5], [6]. For example, Blanchette et al., defined a Threaded Blockset Aligner (TBA) and built a threaded blockset under the assumption that all matching segments occur in the same order and orientation in a given sequence [7]. TBA was designed for aligning megabase-sized regions of multiple mammalian genomes. Darling et al. [8] implemented a method for identification and alignment of conserved genomic DNA in the presence of rearrangements and horizontal transfer called Mauve. Mauve has been applied to align nine enterobacterial genomes and to determine global rearrangement structure in three mammalian genomes. There are other whole-genome alignment tools that can align multiple whole genomes such as [9]–[11].
Whole-genome alignment tools are classified from collinear multiple sequence alignment tools, such as tools in [12]–[14] where they can align very long sequences and detect the presence of rearrangements, duplications, and large-scale sequence gains and losses. For example, Bradley et al., in [12] proposed a program for the alignment of multiple biological sequences that is statistically motivated and fast for practical size problems. It was based on pair hidden Markov models which approximate an insertion/deletion process on a tree and used a sequence annealing algorithm to combine the posterior probabilities estimated from these models into a multiple alignment. Edgar et al. proposed another alignment tool named MUSCLE which is a program for creating multiple alignments of protein sequences [13]. Elements of the algorithm include fast distance estimation using k-mer counting, progressive alignment using a log-expectation score, and refinement using tree-dependent restricted partitioning. In spite of collinear alignment technologies, non-collinear alignment such as [15], [16] contains the elements that are arranged in some non-linear order (see Fig. I.1).
Fig. I.1.

Collinear vs. Non–collinear nucleotide sequence alignment.
In this paper, we propose a novel alignment technique using sparse coding and belief propagation. First, we build an overcomplete dictionary out of extracted nucleotide features of a reference sequence. We then find a set of candidate nucleotide for each nucleotide of the test sequence using sparse coding from the constructed dictionary. The match score of each candidate nucleotide will be evaluated taking both local and neighboring information into account using belief propagation. The best match will be selected as the candidate with the highest score. The rest of this paper is structured as follows. Section II introduces our proposed method. In Section III, we show and discuss our simulation results and compare them with SOAPaligner [1] and BWA [2], followed by a brief conclusion in Section IV.
II. Proposed Method
The proposed method described here is inspired by our recent work, SCoBeP [17]. First, we map the reference nucleotide sequence
of size N and the test nucleotide sequence
of size M into the two integer sequences, X and Y, respectively. We then extract the features from the reference sequence X ∈
and the test sequence Y ∈
.
Second, we create a dictionary
containing all the extracted feature vectors of the reference sequence X to match to the corresponding extracted features of the test sequence Y. The dictionary includes all vectorized one dimensional features as its columns where all of them have been normalized. We then apply sparse coding to each extracted feature of the test sequence. Sparse coding will reconstruct a nucleotide vector at each nucleotide gi as a linear combination of the reference sequences. Note that the obtained representation coefficients αi should be sparse, i.e., it should be 0 for most coefficients. The non-zero coefficients of αi indicate the corresponding nucleotides on the reference sequence (see Fig. II.1).
Fig. II.1.
Sparse representation of a feature vector yi with a dictionary
: α̂i as a sparse vector constructs the feature vector yi using a few columns (highlighted in gray) of dictionary
.
To select n candidate nucleotides, we simply pick those corresponding to n largest coefficients in the sparse co-efficient vector. We store the locations of these candidate nucleotides in a length-n vector
and a probability vector ρi as a length-n vector storing the corresponding probabilities of the sparse coefficient vector. Each coefficient in the probability vector ρi serves as a prior probability of matching the nucleotide at i to a nucleotide of reference sequence. This probability vector takes only local characteristics into account but ignores neighborhood characteristics of the matches.
Finally, we expect that nearby nucleotides in the test sequence should also match the nucleotides that are close to each other in the reference sequence. To incorporate these neighborhood characteristics, we model the problem by a factor graph and apply the Belief Propagation (BP) algorithm to identify the best matches. We consider a one dimensional factor graph as follows: for each nucleotide in the test sequence, one variable node was assigned and each variable node was connected to its two neighbors by a factor node. Also, we consider one extra factor node for each variable node to impose the restriction of prior probabilities for the candidate nucleotides (see Fig. III.1).
Fig. III.1.

The result of proposed method for non-collinear nucleotide sequence alignment. a) alignment result of proposed method in compare to the ground truth. b) zoomed plot to show the gap between the proposed method and ground truth on the jump point.
BP [18] is an efficient inference method used on graphical models such as factor graphs. It was performed by passing messages through the factor graph of our problem. We apply BP on the factor graph of test sequence with n candidate nucleotides as prior knowledge. BP updates the probability of candidate nucleotides based on the probabilities of their neighbors.
Define N(i) and N(a) as two sets of neighbors of a variable node i and a factor node a, respectively, and denote mi→a and ma→i as the forward and backward messages from node i to node a, respectively. Message updates for mi→a and ma→i are based on the messages received by the incoming messages towards nodes i and a, respectively. More precisely, in our factor graph, the message update rules are given by [18]
| (II.1) |
| (II.2) |
where N(a)\i means all neighbors of node a excluding node i; the factor node xa is located between variable nodes xi and xj. Also, we model f (xa) as follows:
| (II.3) |
where σ2 is a parameter to control the relative strength of the geometric constraint imposed by a neighboring node. If we increase the value of σ2, the belief of each variable node will have less effect on its neighbors.
To align the test nucleotide sequence, we select the nucleotide candidate with highest probability and then calculate the displacement β between the current nucleotide and the selected candidate nucleotide. Therefore, for each nucleotide in the test sequence, we have
, βi and ρi for each nucleotide gi which are the most probable match nucleotide, the most probable displacement and the probability of the current match, respectively.
The main procedure for our proposed alignment method is summarized in Algorithm 1.
Algorithm 1.
Proposed nucleotide sequence alignment algorithm - estimate the location of the input sequence
Inputs: a reference sequence
∈ ℝM, a test sequence
∈ ℝN, a threshold θ, the number of the candidate points n
|
Convert a string sequence to numeric sequence:
|
Extract feature and construct dictionary:
|
Find the initial estimate of the match location: For each vector yi ∈ Ŷ perform:
|
Refine the candidate match location:
|
Find the correspond nucleotides:
|
Output: the estimated version of aligned sequence
|
A. Implementation details
X = ConvertData(
) maps the input string of the nucleotide sequence to a sequence of integer values for the further processing. The mapping function of four nucleotides {A, C, G, T} can be defined in a two-dimension space where A = (1, 1), C = (1, −1), G = (−1, 1), and T = (−1, −1), respectively. Therefore, {A, C, G, T} ↦ {(1, 1), (1, −1), (−1, 1), (−1, −1)}.-
Ŷ = ExtractFeature(Y) presents a vector extractor algorithm using Y as a source sequence, where the result is a two dimensional matrix containing the vectorized one dimensional sequences. To this end, we consider a vector of size S = 2 × (2a + 1) containing neighboring nucleotides on two sides of a nucleotide, where a is a positive integer and the first “2” is corresponding to the dimension of the mapping space). For each nucleotide gi in the test sequence Y, we vectorized a sequence centered around the nucleotide gi to a feature vector yi ∈
. A two dimensional test feature data Ŷ ∈
is then constructed from yi as follows:
(II.4) Note that X̂ is created in the same manner as Ŷ but from the reference sequence X instead.
= MakeDic(X̂) creates a dictionary
using the vectors of X̂. Later, the dictionary
is used to match the extracted features of the source sequence to corresponding the extracted features of the reference sequence. We can write
where xi is a feature vector of X̂. Note that we normalize dictionary
to guarantee the norm of each feature vector to be 1.-
αi = FindSparseVector(
, yi) finds the candidate match nucleotide using the sparse coding algorithm, where αi is a sparse vector. Mathematically, we try to solve the following sparse coding problem to find the most sparse coefficient vector αi (see Fig. II.1) such that
(II.5) Although there are several methods to solve (II.5) [19]–[21], in our work, we employ Subspace Pursuit (SP) [20] because of its computational efficiency.
-
[
, ρ̂i] = FindTopScoreMatch(n, αi) picks up the n largest coefficients of αi as n candidates.
is a n × 1 vector that stores the locations of these candidate nucleotide and ρ̂i is the length-n vector that stores the corresponding probabilities of
. Each coefficient in ρĉi serves as a prior probability of matching the source sequence at i to a sub-sequence centered around the nucleotide gi. After finding the candidates and their initial probabilities, we concatenate the result of each nucleotide and construct following matrices:
(II.6) which we will use to apply belief propagation at the next step.
ρ = BP(
, ρ̂) models the problem by a factor graph (see Fig. III.1) and applies belief propagation [18] to update probability ρ. The updated probability ρ can be used to align the reference sequence onto the test sequence. In our case, we assign a variable node for each nucleotide on the source sequence and connect each pair of neighboring nucleotide with a factor node. Also, we introduce one extra factor node to take care of the prior knowledge obtained in the sparse coding step for each nucleotide of the source sequence (for more details, see [17]).[
, β] = Warp(X, ρ,
, θ) returns the aligned sequence
and a displacement vector β which contains the movement of each nucleotide in the reference sequence. Note that in step BP(·), we calculated the refined probability of each candidate nucleotide match.
III. EXPERIMENTAL RESULTS
In this section, we present our experiments to evaluate the proposed method for aligning the nucleotide sequences and compare it with SOAPaligner [1] and BWA [2]. We considered the problem of aligning a sequence of human nucleotides from the National Center for Biotechnology Information (NCBI) [22]. To evaluate the performance of our approach, we conducted two sets of tests on the nucleotide sequences. In the first set, we selected twenty short subsequences of human genomes and then used SOAPaligner, BWA and the proposed method to find the location of selected sub-sequence nucleotide in the human chromosome. All of three algorithms successfully passed this test. We created five shuffled sub-sequences of the reference sequence. We chose six indexes js,j1, j2, j3, j4 and je where js < j1 < j2 < j3 < j4 < je and we considered js and je as the index of the first and the last nucleotide in the original sequence, respectively. Then we shuffled the reference sequence by swapping the sub-sequence [gj1…gj2−1] with [gj3…gj4−1]. Therefore, the test nucleotide sequence can be presented as
| (III.1) |
where gj is the nucleotide for index j. In this set of the test sequences, SOAPaligner and BWA could not find proper alignments. In contrast, Fig. III.1 shows the proposed method alignment output agrees with the ground truth by a gap of 10 to 15 nucleotides. Throughout the experiments, the following parameters were used: the number of candidate points n is set to be 3, k = 3 and a = 20.
The computational complexity of proposed is mainly determined by the following three steps: 1) extracting subsequence nucleotides as features and constructing the dictionary, 2) finding candidate nucleotides via sparse coding, and 3) applying BP. Assume the size of the test and reference sequences are N and M nucleotides, respectively. The required time of feature extraction will be O(h(M + N)), where h is the size of the vector of extracted features for each nucleotide. As for dictionary construction, the only time needed is for the normalization of each column, which requires O(hM) amount of time. Thus the total time complexity of the first step is O(h(M + N)). In the second step of the SCoBeP, the time complexity of SP is O log(f)hM [23], where f is the number of iterations for finding the sparse vector. Since we have to repeat the process of finding candidate points for all N feature vectors, the time complexity of finding candidate points by SP is O(log(f)hMN). In the third step, the time complexity of BP in our factor graph is O(vn2M), where v is the number iterations before converging. Consequently, if the SCoBeP uses SP, its time complexity will be O(vn2M + h(M + N) + log(f)hMN).
IV. Conclusion
In conclusion, we have proposed a nucleotide sequence alignment method based on the sparse coding and belief propagation. Our technique performs alignment by first running sparse coding over an over-complete dictionary constructed from the nucleotides of a reference sequence to gather possible candidate nucleotides. Belief propagation is then applied to eliminate bad candidates and to select the best matches. The experimental results illustrate that our proposed algorithm shows comparable performance to those of SOAPaligner [1] and BWA [2]. We believe that the proposed method can be used for various collinear and non-collinear nucleotide sequence alignment applications.
Fig. II.2.

Nucleotides model: One dimensional factor graph used in Belief Propagation.
Acknowledgments
Shuang Wang, Xiaoqian Jiang and Lucila Ohno-Machado were funded in part by the NIH grants K99LM011392, UH2HL108785, U54HL108460, UL1TR00010003 and the AHRQ grant R01HS019913
References
- 1.Li R, Yu C, Li Y, Lam T, Yiu S, Kristiansen K, Wang J. Soap2: an improved ultrafast tool for short read alignment. Bioinformatics. 2009;25(15):1966–1967. doi: 10.1093/bioinformatics/btp336. [DOI] [PubMed] [Google Scholar]
- 2.Li H, Durbin R. Fast and accurate short read alignment with burrows–wheeler transform. Bioinformatics. 2009;25(14):1754–1760. doi: 10.1093/bioinformatics/btp324. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Hampton T. Cancer genome atlas. JAMA: The Journal of the American Medical Association. 2006;296(16):1958–1958. [Google Scholar]
- 4.Siva N. 1000 genomes project. Nature biotechnology. 2008;26(3):256–256. doi: 10.1038/nbt0308-256b. [DOI] [PubMed] [Google Scholar]
- 5.Batzoglou S. The many faces of sequence alignment. Briefings in bioinformatics. 2005;6(1):6–22. doi: 10.1093/bib/6.1.6. [DOI] [PubMed] [Google Scholar]
- 6.Dewey C, Pachter L. Evolution at the nucleotide level: the problem of multiple whole-genome alignment. Human Molecular Genetics. 2006;15(suppl 1):R51–R56. doi: 10.1093/hmg/ddl056. [DOI] [PubMed] [Google Scholar]
- 7.Blanchette M, Kent W, Riemer C, Elnitski L, Smit A, Roskin K, Baertsch R, Rosenbloom K, Clawson H, Green E, et al. Aligning multiple genomic sequences with the threaded blockset aligner. Genome research. 2004;14(4):708–715. doi: 10.1101/gr.1933104. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Darling A, Mau B, Blattner F, Perna N. Mauve: multiple alignment of conserved genomic sequence with rearrangements. Genome research. 2004;14(7):1394–1403. doi: 10.1101/gr.2289704. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Dubchak I, Poliakov A, Kislyuk A, Brudno M. Multiple whole-genome alignments without a reference organism. Genome research. 2009;19(4):682–689. doi: 10.1101/gr.081778.108. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Höhl M, Kurtz S, Ohlebusch E. Efficient multiple genome alignment. Bioinformatics. 2002;18(suppl 1):S312–S320. doi: 10.1093/bioinformatics/18.suppl_1.s312. [DOI] [PubMed] [Google Scholar]
- 11.Paten B, Herrero J, Beal K, Fitzgerald S, Birney E. Enredo and pecan: genome-wide mammalian consistency-based multiple alignment with paralogs. Genome research. 2008;18(11):1814–1828. doi: 10.1101/gr.076554.108. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Bradley R, Roberts A, Smoot M, Juvekar S, Do J, Dewey C, Holmes I, Pachter L. Fast statistical alignment. PLoS computational biology. 2009;5(5):e1000392. doi: 10.1371/journal.pcbi.1000392. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Edgar R. Muscle: multiple sequence alignment with high accuracy and high throughput. Nucleic acids research. 2004;32(5):1792–1797. doi: 10.1093/nar/gkh340. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Thompson J, Higgins D, Gibson T. Clustal w: improving the sensitivity of progressive multiple sequence alignment through sequence weighting, position-specific gap penalties and weight matrix choice. Nucleic acids research. 1994;22(22):4673–4680. doi: 10.1093/nar/22.22.4673. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Bartoš J, Vlček Č, Choulet F, Džunková M, Cviková K, Šafářr J, Šimková H, Pačes J, Strnad H, Sourdille P, et al. Intraspecific sequence comparisons reveal similar rates of non-collinear gene insertion in the b and d genomes of bread wheat. BMC Plant Biology. 2012;12(1):155. doi: 10.1186/1471-2229-12-155. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Song R, Messing J. Gene expression of a gene family in maize based on noncollinear haplotypes. Proceedings of the National Academy of Sciences. 2003;100(15):9055–9060. doi: 10.1073/pnas.1032999100. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Barzigar N, Roozgard A, Cheng S, Verma P. Scobep: Dense image registration using sparse coding and belief propagation. Journal of Visual Communication and Image Representation. 2012 doi: 10.1109/EMBC.2012.6346137. [DOI] [PubMed] [Google Scholar]
- 18.Kschischang F, Frey B, Loeliger H. Factor graphs and the sum-product algorithm. Information Theory, IEEE Transactions on. 2001;47(2):498–519. [Google Scholar]
- 19.Yang A, Sastry S, Ganesh A, Ma Y. Fast 1-minimization algorithms and an application in robust face recognition: A review. Image Processing (ICIP), 2010 17th IEEE International Conference on; IEEE; 2010. pp. 1849–1852. [Google Scholar]
- 20.Dai W, Milenkovic O. Subspace pursuit for compressive sensing signal reconstruction. Information Theory, IEEE Transactions on. 2009;55(5):2230–2249. [Google Scholar]
- 21.Maleh R, Gilbert A, Strauss M. Sparse gradient image reconstruction done faster. Image Processing, 2007. ICIP 2007. IEEE International Conference on; IEEE; 2007. pp. II–77. [Google Scholar]
- 22.N. C. Institute. The national center for biotechnology information. 2013 Jan; http://www.ncbi.nlm.nih.gov/genome?db=genome. [Online]. Available: http://www.ncbi.nlm.nih.gov/genome?db=genome.
- 23.Dai W, Milenkovic O. DTIC Document, Tech Rep. 2008. Subspace pursuit for compressive sensing: Closing the gap between performance and complexity. [Google Scholar]

