Thus elucidated regulatory features surpass the information derived from comparison of genomic sequences alone. Here, we present EpiAlignment, a web-based tool to align genomic regions with both DNA sequence and epigenomic data. EpiAlignment takes DNA sequence and epigenomic profiles derived by ChIP-seq from two species as input data, and outputs the best semi-global alignments. These alignments are based on EpiAlignment scores, computed by a dynamic programming algorithm that accounts for both sequence alignment and epigenome similarity. For timely response, the EpiAlignment web server automatically initiates up to 140 computing threads depending on the size of user input data. For users’ convenience, we have pre-compiled the comparable human and mouse epigenome datasets in matched cell types and tissues from the Roadmap Epigenomics and ENCODE consortia. Users can either upload their own data or select pre-compiled datasets as inputs for EpiAlignment analyses. Results are presented in graphical and tabular formats where the entries can be interactively expanded to visualize additional features of these aligned regions. EpiAlignment is available at  Epigenomic modifications contribute to the implementation of genomic functions in defining cell identity, coordinating organismal development ,2, and rHere we present the EpiAlignment web server, a pairwise alignment tool for both the genome and the epigenome. EpiAlignment aligns two genomic regions from two species based on their DNA sequences and epigenomic modifications. The web server provides a database of pairwise ChIP-seq datasets for users’ convenience, which contains peak files of 56 human and 70 mouse ChIP-seq experiments from 15 matched tissue types and cell lines. Users can either upload their own data or select pre-compiled datasets as inputs for EpiAlignment analyses.EpiAlignment supports two alignment modes: the one-vs-one mode (default) and the many-vs-many mode, corresponding to two types of analyses. In the one-vs-one mode, the user-defined genomic region from one species (query region) is aligned to the user-defined genomic region in the other species (target region) to identify a continuous subset of the target region with the best similarity to the query region. The similarity is evaluated based on both genomic and epigenomic data in the query and the target regions Figure . The manA and B, with information from both the genome and the epigenome. Each genomic region contains two types of data, namely the DNA sequence and the epigenomic profile, denoted by The EpiAlignment algorithm aims to identify the optimal alignment between two genomic regions, denoted by  regions .α. The following target function is employed to evaluate the quality of α:w is the epigenome weight. We adopt the TKF model  with a matching gene name, alias or Ensembl ID for users to choose from.EpiAlignment provides two major alignment modes: the one-vs-one mode and the many-vs-many mode. The default one-vs-one mode attempts to find a best-matching part for a query region in its corresponding target region. It is useful in cases where target regions are much longer than query regions, and best matches of the query regions cannot be easily determined in the target species with sequence homologies only. The many-vs-many mode, on the other hand, is designed to identify the best match for a query region among a set of target regions. It is more useful when the query region corresponds to multiple candidates with potentially similar functions, such as promoters of paralogous genes.EpiAlignment requires two types of inputs from users in both modes: (i) a pair of peak files from ChIP-seq experiments and (ii) query and target regions to be aligned, both from two species. With the genome assemblies specified, users can either upload their own peak files or select a pair of epigenomic datasets from the database of pairwise ChIP-seq experiments. Details of each ChIP-seq experiment can be viewed on the ENCODE or the GEO website by following the links provided in the database. The query and target regions can be provided in various ways depending on the alignment mode used Table .In both modes, query regions can be provided as genomic coordinates in BED6 format. Gene symbols or Ensembl IDs are also accepted if gene promoters are used as input regions. In the latter case, users need to specify which range around gene transcription start sites (TSSs) will be defined as promoter regions. By default, the  flanking regions around TSSs are used.In the one-vs-one mode, target regions can be defined based on homologous relationship. Users only need to specify the number of base pairs by which the query regions will be increased. The web server will extend each query region and remap it to the target species. The remapped region will be used as the target region. Target regions can also be provided as a list of genomic coordinates in BED6 format. In this case, query and target regions have to be paired, with corresponding lines in the two lists specifying query-target region pairs.In the many-vs-many mode, the target regions can be specified in the same way as query regions in the ‘Target regions’ box, or by selecting a group of evolutionarily-related genes. Users can search for a preset gene cluster by typing a gene symbol or an Ensembl ID in the searching bar. All gene promoters in the selected cluster will be used as target regions. The counts of query and target regions can be different in this mode as they will be aligned all-against-all.With the query and target regions defined, the user may adjust the epigenome weight and alignment parameters . This stw) to leverage DNA sequence and epigenomic information in the alignment. The algorithm considers only sequence when w = 0, while it increasingly relies on epigenomic information as w rises.Users may adjust the epigenome weight (random locations with consistent epigenomic patterns (random epigenomic peak). We simulated this case to study the effects of various weights (Supplementary Methods). We identified mouse genomic regions marked by H3K4me3, H3K27ac or H3K4me1 in all tissue types included in our pairwise ChIP-seq experiment database, among which around 50% had their human orthologues identified using liftOver . We denoted the sequence alignment score (S score) between the mouse query and its human orthologue by Sortho, and the S score between the mouse query and the decoy as Sdecoy. The Sortho distributions were similar among mouse sequences marked by the three histone modifications, with the first quartiles overlapping with the background distribution generated with random mouse and human sequences  and without (w = 0) epigenomic information. For each query region, best matches identified in the two alignments are named ‘EpiAlignment hit’ and ‘Sequence-only hit’ respectively, with alignment scores denoted by w > 0, and w = 0. All scores are calibrated to 1,000 bp , and are thus comparable across alignment results of different region pairs. Alignment results are presented in an interactive table on the result page. Users may click on each row to open an expandable panel and view more details.In both modes, EpiAlignment will return two types of alignment results, yielded with  is provided comparing its sequence alignment score to those of arbitrary locations within the target region (Supplementary Methods). An SNR no larger than 1 indicates that the hit's sequence similarity to the query is indistinguishable from random sequences nearby, and thus the sequence similarity scarcely contributes to the overall similarity at the location. Ranges of sequence alignment scores yielded with random sequences and mouse-human orthologous sequence pairs are also provided for reference (Supplementary Methods).E) between the query and the hits, defined as E is provided based on the query epigenomic profile, where the maximum and the minimum can be achieved when all epigenomic states are rewarded or penalized, respectively. Within the range, a larger E value suggests higher epigenomic similarity, and vice versa.Epigenome evaluation: this part evaluates the epigenomic similarity scores  within 100 kb flanking regions of the query and target regions.In this mode, each expandable panel contains a chart presenting alignment scores along the target regions and a result evaluation panel, which consists of four parts:In this mode, the expandable panels contain sequence alignment score ranges yielded with random and orthologous human-mouse promoter pairs for the evaluation of sequence similarities (Supplementary Methods). Beside the table, two heatmaps will be returned illustrating alignment scores between query regions (rows) and target regions (columns). For each query region, the EpiAlignment hit will be considered as ‘altered’ from the Sequence-only hit if the two hits are different regions, and the epigenomic profile contributes positively within the EpiAlignment hit  where m and n are the lengths of regions to be aligned. The architecture of EpiAlignment utilizes parallel computing of up to 140 worker threads. A load-balancer powered by Nginx is set up at the front of the server to route requests from multiple users to an appropriate state-less Node.js handler, which can allocate region pairs among available worker threads to achieve parallel computing.The time complexity of the algorithm is O. For both sizes, a single job took about 1.25 minutes to finish. The computational resources on the server were not saturated for small-sized jobs and the runtime were merely increased to 2 minutes with 10 concurrent jobs. When the job size doubled, EpiAlignment showed resource saturation at five concurrent jobs and the runtime increased moderately to 4 minutes for 10 jobs running simultaneously . In all ad hoc method, which was subsequently improved into a probabilistic model  and aligned it against the –20,000 to +20,000 neighborhood of its orthologous region in human. The H3K4me3 ChIP-seq datasets of human and mouse round spermatids were selected from the database (GEO accession ID: GSM1673960 and GSM1674016) as epigenomic information (w = 0) revealed two hits with similar alignment scores. The downstream one corresponded to LDAH’s promoter, while it showed an alignment score slightly lower than the best sequence match. With the H3K4me3 information, the best hit shifted to LDAH’s promoter, and EpiAlignment successfully matched the two promoter regions together . EpiAlignment identified the corresponding promoter pairs  were selected as the epigenomic input data. We used the gene symbol SLCO4A1 to define the query region. In the ‘Target regions’ box, we selected ‘Search a gene cluster’ and typed ‘SLCO4A1’ to search for a gene cluster containing its homologous genes. The resulting ‘Cluster_6635’ was selected from the pop-up panel as input. This cluster contained 16 mouse genes, among which Slco4a1 was the orthologue of SLCO4A1.We asked whether best matches of promoter pairs derived by EpiAlignment and sequence-only alignment always agreed. If they did not agree, which promoter alignment would be consistent with orthologous gene pairs. Toward this goal, we aligned the promoter of the human SLCO4A1′s promoter was aligned to Slco3a1′s promoter instead of its orthologue, whereas after incorporating the H3K4me3 data, the promoters of SLCO4A1 and Slco4a1 were successfully matched   Figure . This exIntegrative analyses of the genome and the epigenome can provide insights for the annotation of regulatory sequence, especially in regions lacking sequence conservation. We have developed EpiAlignment, a cross-species alignment tool incorporating both the genome and the epigenome. By assessing structural similarities between functional genomic sites, the tool may assist researchers in identifying functional correspondence across species, which provides a starting point for downstream experiments and analyses. The interface of EpiAlignment is designed to be user-friendly and does not require users to be experienced in computational biology. It also shows versatility in providing different alignment modes and supporting various input types. Users may easily use the one-vs-one mode on orthologous neighborhoods of regulatory elements to refine their annotations, or search for a pre-defined gene cluster and align them with the many-vs-many mode to study the potential functional correspondence among evolutionarily-related genes.Given that EpiAlignment uses peak files from epigenomic experiments to assess epigenomic signatures within regions, its output can be affected by the peak-calling results. Therefore, we only included stable peak files from ENCODE experiments with isogenic biological replicates pooled in our database for pairwise ChIP-seq experiments. When using custom data, users may adjust thresholds for peak-calling and examine the genomic regions surrounding the peaks in genome browsers for better performance. Peak significance may be incorporated into the target function in the future to improve the robustness of the results.EpiAlignment can be further enhanced in several aspects in the future. First, the database for pairwise ChIP-seq experiments can be expanded to include more comparable datasets of different experiment types, including DNase-Seq, ATAC-Seq and MeDIP-Seq. Species other than human or mouse can also be supported in future updates when sufficient epigenomic data are available. Further expansion of the algorithm may allow EpiAlignment to align with multiple epigenomic marks simultaneously to better reflect the interactions among different epigenomic modifications. Moreover, while the current release of EpiAlignment does not support genome-wide alignments due to speed constraints, future investments in computational hardware and algorithm developments may improve the speed performance and enable alignments against the entire genome.gkz426_Supplemental_FilesClick here for additional data file.


As the cost of sequencing has declined, clinical diagnostics based on next generation sequencing (NGS) have become reality. Diagnostics based on sequencing will require rapid and precise mapping against redundant databases because some of the most important determinants, such as antimicrobial resistance and core genome multilocus sequence typing (MLST) alleles, are highly similar to one another.k-mer alignment), was designed. KMA is able to map raw reads directly against redundant databases, it also scales well for large redundant databases. KMA uses k-mer seeding to speed up mapping and the Needleman-Wunsch algorithm to accurately align extensions from k-mer seeds. Multi-mapping reads are resolved using a novel sorting scheme (ConClave scheme), ensuring an accurate selection of templates.In order to facilitate this, a novel mapping method, KMA  contains supplementary material, which is available to authorized users. In bioinformatics, the oldest and probably the single most important tool is the alignment of one or more sequences. Alignments informs us how similar a sequence is compared with another sequence and can be used to quantify the abundance of any similar sequence pattern. If the found pattern has an annotation, this can be transferred to the query sequence. The proper choice of alignment method is thus critical for the further investigations .Over the past decade several mapping methods have been developed that enable direct mapping of raw reads against target sequences. Previous studies have shown read-mapping based approaches to be superior to the more traditional methods where the reads are first assembled, and the assembly is hereafter BLAST’ed. against a database. The success of such methods are highly dictated by the quality of the assembly, because BLAST remains too slow to map the raw reads directly. Which is problematic within repeat and low depth regions of the genome, where the assembly often results in gaps between the assembled contigs, leading to missing data , 3. Todak-mer alignment), was developed. KMA introduces a novel sorting scheme, ConClave, in order to distinguish homologous templates.The redundant databases used in genomic epidemiology are however still posing a challenge regarding mapping raw reads directly. When databases are constantly updated with new sequences due to natural evolution, the results are in a constantly changing state, making clustering difficult. This feature of the databases makes direct mapping of raw reads troublesome, as there is no guarantee that the read will cover a unique part of a reference sequence, resulting in a tie for best match. Redundancy is a problem when mapping to bacterial databases, but to a lesser degree since these databases are not as redundant as some of the gene databases, and better use can be made of paired end reads since only one of the ends will often map to single genes. There is a need for new methods to resolve the issue with redundancy in an accurate and fast manner so that acute decisions can be made. In response to this need, a new alignment method, KMA − 1 in k-mer space. In the case where a query sequence is accepted, the potential template candidates are limited by linking the matching k-mers to their respective template sequences.When mapping against databases, a query sequence can fall within two categories: the query does not look like anything in the database or the query looks like something in the database. Depending on the database, it is therefore necessary to determine at an early stage whether alignment of a given sequence is feasible or if the sequence should be discarded from further analysis. Computationally, it is much faster to map raw reads against template sequences and determine their approximate origin than it is to perform alignment giving the exact differences between sequences. In order to exploit this, KMA maps k-mers from which to start alignment, where this indexing is computed for templates passing the heuristic k-mer mapping. The indexed k-mers are then used as seeds from which to start alignment, where each matching seed is extended to give an optimal score. To enable a high resolution of gaps and mismatches, KMA utilizes the Needleman-Wunsch algorithm [KMA uses a hash map of indexed lgorithm  to alignAs KMA is designed to map sequences against redundant databases, the possibility of a tie for best matching template should be considered more as rule than an exception. For KMA to be able to find the one most likely template for each query sequence, a novel scoring scheme, ConClave, was developed.The ConClave scoring scheme requires that all best matching templates are initially accepted for all best matching query sequences. The alignment scores obtained are then summed together for each template candidate in order to form the ConClave score, in this way reflecting a maximum score for each template. For alignments where ties do not occur, a second score is conducted as the unique ConClave score, which are used to reflect the unique alignments.Ties for best matching templates can now be resolved by choosing the most likely template based on the ConClave score. In case of a tie on the ConClave score, the unique ConClave score is used to choose a best matching template. For samples were two templates are equally well-suited candidates, reflected by identical ConClave scores, the algorithm will choose the first sequence added to the database.The ConClave scoring and alignment of reads enables assembly guided by a reference, resulting in a consensus sequence for the given reference / template. From the alignment, the differences between each read and the associated template are known, and this gives information about which nucleotides are called at each position in the template. Each nucleotide is then determined by majority voting, where the strength of the called nucleotide is tested with a McNemar test, giving a robust base calling performance across different sequencing platforms . In caseAfter reference assembly, statistics for each template are collected in a single file, containing features such as template identity, coverage and depth.Escherichia coli from Grad et al. (2012). The dataset included 11 E. coli from the German / French outbreak in 2011 and two historical E. coli [E. coli, and the presence of the beta-lactamase blaCTX-M-15 were verified by PCR [The performance of KMA was evaluated on a dataset of 13 E. coli were mapped to the ResFinder database of known resistance genes [The 13 ce genes , where tE. coli was downloaded from EnteroBase  database for KMA was compared with six different methods: SRST2 v. 0.1.8) , MGmappe , MGmappSRST2 uses Bowtie2 to map against a homology-reduced database, clustered at 90% identity using CD-hit . From eaFor MGmapper to accept a template, it has to contain at least one unique mapping read when mapped with BWA-MEM. After mapping the reads, MGmapper reports the depth and template coverage of the accepted genes .Salmon was developed for quantifying RNA transcript levels using the EM-algorithm. Which partially matches the redundant database problem, as only a subset of the templates in the database are likely to be present. Salmon can be used as an extension to BWA-MEM, Bowtie2 and Minimap2, when the alignment method is set to report several alignments per read .SAMtools and BEDTools were used to estimate depth and template coverage of mappings performed with BWA-MEM, Bowtie2 and Minimap2 so that these could be used for a more direct comparison as well , 15.To prove the difficulty of mapping raw reads directly against redundant databases, a simulated dataset of single-end and paired-end reads was created, where each gene in the ResFinder database was split into raw reads with a length 100 bp, and an insert size of 250 for the paired end set. Error and indel rates were set to zero so that the simulated reads would represent the perfect case scenario of short-read sequencers. Meaning, that any inconsistencies from the mapping methods, would reveal each of their weaknesses in mapping against redundant databases, and give a clear view of their assumptions. Simulated reads were created with chopDB, which is included alongside the commands used to compare KMA with existing methods and the ResFinder database.Salmon was not used in combination with Minimap2, because Minimap2 did not report more than one alignment per read no matter how the “-N” and “-p” options were set.For the simulated datasets, the comparison was straight forward as the location of every read was known.For both the single and paired-end datasets, KMA mapped everything correctly, where every read in each sample was mapped to the correct template only , mapping and post-processing were measured separately for all methods, unless included in the method. KMA outperformed all of the existing methods on speed when mapping both resistance genes and cgMLST genes. The memory usage of KMA was above that of Bowtie2, but just below that of MGmapper and BWA-MEM, and less than a fourth of MiniMap2 (see Table BWA-MEM, Bowtie2 and Minimap2 were not designed to map against redundant databases, as they are based on unique mappings and therefore do not deal with multi mapping reads. This is also reflected by MGmapper, albeit relying on only one unique mapping.Salmon was designed to predict RNA transcript levels, which includes a certain level of redundancy. The expression pattern seen in bacteria differs from that of eukaryotes, which Salmon was designed for, explaining some of the variation seen here. Salmon does, however, improve the predictions when used with BWA-MEM, with the major problem being over prediction, resulting in a number of FPs. Even though Salmon provides better predictions, it is hard to control the output because alignments are not included. This makes it difficult to sort out partial mapping templates, which might have improved the predictions.SRST2 uses clustering of the template database in order to minimize the redundancy problem. It then uses Bowtie2 to map against the clusters and accepts all mappings, meaning that a single read can be assigned to several clusters. This is where SRST2 has its major drawback, as the clustering does not reflect the mapping performed afterwards. As recommended by SRST2, the databases were clustered with a 90% similarity threshold using CD-hit , 14. HowKMA was designed as a specialized solution for mapping against redundant databases, such as those seen in genomic epidemiology, and is therefore not a general solution compared with BWA-MEM, Bowtie2 and Minimap2. The memory usage of the index used with KMA is not linear, and is dependent on the redundancy within a given database. The higher the redundancy the slower the increase is in database size, whereas for non-redundant databases the indexing will grow faster than for BWA-MEM and Bowtie2.BWA-MEM, Bowtie2 and Minimap2 have a large variety of parameters to set, but none of the parameters seem to have a dramatic effect on the results achieved here.k-mer mapping, which makes KMA able to discard non-mapping sequences at an early state or at least limit the search space.The ConClave scoring scheme is the major difference between KMA and the methods compared, with respect to the prediction performance. If the ConClave scoring had been adapted to analyze SAM-format, BWA-MEM and Bowtie2 would probably have had a similar prediction performance compared with that of KMA. The speed advantage of KMA lies mainly in the heuristic Alignment of sequences plays a crucial role in bioinformatics, and is often the cornerstone in sequence analysis. Choosing the right alignment method for the right problem is thus evident for the further analysis. For aligning raw reads directly against redundant databases, KMA outperforms existing methods on both speed, precision and sensitivity.Additional file 1:Table S1 includes a detailed overview of the predicted resistance genes from each sample, using the methods described in this study. Table S2 extends Table


However, in this study, we show that alignment-free dissimilarity calculated based on sequencing samples can be overestimated compared with the dissimilarity calculated based on their genomes, and this bias can significantly decrease the performance of the alignment-free analysis. Here, we introduce a new alignment-free tool, Alignment-Free methods Adjusted by Neural Network (Afann) that successfully adjusts this bias and achieves excellent performance on various independent datasets. Afann is freely available at  Although alignment-based approaches for sequence comparison are generally accurate and powerful, their applications are being challenged by the size of sequence data that increases at an exponential rate. More importantly, the application of alignment-based methods in NGS analysis could also be limited when the sequencing depth is low so that assembled contigs might not share long homologous regions that could be aligned. Throughout the paper, the sequencing depth (fold coverage) is measured by the total number of sequenced bases divided by the genome length. Therefore, alignment-free methods, alternatives over alignment-based methods, have recently received increasing attention because they are generally more memory and time efficient –9. Moreoassembly , 5, 8–12kmer frequency profile, also known as genomic signature [kmer-based alignment-free methods first count the number of occurrences of kmers along a sequence or in an NGS sample and characterize each sequence or an NGS sample as a feature vector of length 4K. Second, transformation can be applied to normalize the kmer count vector or to remove the random background of kmer counts using a Markov model [CVTree[Based on the rationale that similar sequences share similar ignature , kmer-baov model , 2. Aligl [CVTree, \documeument}d2∗, and Coskmer frequency can be counted directly from raw NGS samples, kmer-based alignment-free methods can be easily adapted to compare NGS samples without assembly. This adaptation relies on a strong assumption that the sequence-representing feature vectors of NGS samples can be used as alternatives of sequence-representing feature vectors of their genomes, and thus, the alignment-free dissimilarity calculated based on the NGS samples should be close to the dissimilarity calculated based on their genomes. While this assumption is reasonable when sequencing depth is high because of the law of large numbers, it can nevertheless be compromised by low sequencing depth, sequencing error, and sequencing bias. For example, for any alignment-free method, the dissimilarity between a genome and itself should be 0 because their feature vectors should be exactly the same whereas the dissimilarity between two NGS samples sampled from the same genome will be greater than 0 since their feature vectors will be different due to the stochastic distribution of reads along the genomes. Therefore, it is expected that the dissimilarity calculated based on the NGS samples will most likely be overestimated than the dissimilarity calculated based on their genomes, and the overestimation will increase as the sequencing depth decreases, which has also been revealed in several studies based on various alignment-free methods [Since  methods , 8, 12. The alignment-free dissimilarity between two NGS samples A and B is determined by three factors which are alignment-free dissimilarity estimated based on their genomes, the bias caused by random sampling of NGS sample A, and the bias caused by random sampling of NGS sample B. Comparing NGS samples without bias adjustment may thus be misguided and be prone to drawing conclusions that are inconsistent with analysis based on their genomes. This can be explained by the fact that the high dissimilarity between two NGS samples does not necessarily imply the high dissimilarity between their genomes. It could also result from the large bias caused by low sequencing depth. Therefore, the relative order of pairwise dissimilarity between NGS samples and dissimilarity between genomes will be different if the sequencing depths of NGS samples are different. For example, suppose genome A is closer to genome B than to genome C based on their complete genomes. All three genomes are sequenced using NGS, and the sequencing depth of genome B is lower than that of genome C. Since the dissimilarity between two genomes using NGS data increases as the sequencing depth decreases, it is possible that the dissimilarity between A and B is higher than that between A and C based on NGS data, resulting in incorrect relationships among the genomes A, B, and C.One feasible solution is to downsample all NGS samples to the same number of reads or the same total number of sequenced bases if the lengths of reads are different . While bCVTree[Another solution is to modify the formula of alignment-free dissimilarity by considering sequencing depth and sequencing error. To the best of our knowledge, AAF  and SkmeCVTree, \documeentclass1pt{minimaentclass1pt{minimaTherefore, a method that can adjust the bias for alignment-free dissimilarity based on NGS samples without downsampling and without introducing new estimations such as sequencing depth or sequencing error rate is necessary. Since background-adjusted dissimilarity measures have been shown to outperform other methods for solving different problems ranging from evolutionary distance estimation  to virusThe bias caused by NGS samples can be illustrated by a simplified example in Fig. K=5 to K=14 where K is the length of the kmer with Markovian order M=K−2 for the background sequences between these 21 primate genomes and compared them with their pairwise evolutionary distances estimated by alignment-based methods. Our results showed that pairwise K=14 and M=12 are highly correlated with their evolutionary distances based on the alignments with Spearman correlation coefficients 0.979 for Although Fig. mentclass2pt{minimK=14 and M=12 is shown in Fig. kmer lengths and Markovian orders are shown in Additional file kmer lengths are shown in Additional file To study the influence of sequencing depths on see the “” sectionentclass1pt{minimakmer lengths , K=31 , and sketch sizes s=103,s=105, and s=107 and compared them with the pairwise evolutionary distances estimated by alignment-based methods. Additional file K=21 and s=107.To show that this bias is a common problem for all alignment-free methods, we did the same analysis for another state-of-the-art alignment-free method Mash  which iskmer length K=21 and sketch size s=107 and compared Mash distances estimated from primate genomes and Mash distances estimated from primate NGS samples. The results are shown in Additional file We then chose the As aforementioned, one solution is to downsample all NGS samples to have the same number of reads as the smallest sample, which is 1 M reads in this example, as shown in Fig. entclass1pt{minimaentclass1pt{minimad is determined by the alignment-free dissimilarity based on their genomes d and the bias caused by each NGS sample Bias(ANGS) and Bias(BNGS):F, alignment-free dissimilarity between a pair of NGS samples, and their corresponding biases, then the alignment-free dissimilarity based on their genomes which is not biased by the sequencing depths in NGS samples can be predicted. Although it is hard to infer a closed-form formula for function F for background-adjusted methods such as CVTree[ANGS),Bias(BNGS), and model training and evaluation.We characterize the bias adjustment process as a regression problem that predicts the dissimilarity based on genomes from the dissimilarity based on NGS samples and their biases. It can be clearly seen in Fig. mentclass2pt{minimK=14 and M=12 were transformed to kmer lengths and Markovian orders were shown in Additional file kmer lengths were transformed to kmer length, Markovian order, or sequencing depth. It should be noticed that our bias adjustment model is capable of increasing the Spearman correlation coefficients even when all samples have the same number of reads by comparing Fig. Two neural network regression models were trained using the 21 primate dataset for see the “” sectionkmer length K=21 and sketch size s=107, which is a recent alignment-free method that corrects the formula of Mash distance based on NGS samples by estimating the sequencing depth and sequencing error rate. The relationship between the Skemr distances using the whole genomes and the Skmer distances using the NGS samples are shown in Additional file We also evaluated the performance of Skmer  on the sK=14 and M=12 between these 28 mammalian genomes and showed that their pairwise We tested our model for als from . In our als from , we havementclass2pt{minimK=14,K=21, and K=31 and sketch size s=103,s=105, and s=107 and compared them with the pairwise evolutionary distances estimated by alignment-based methods. Additional file K=31 and s=107. We then chose kmer length K=31 and sketch size s=107 and compared Mash distance and Skmer distance estimated from mammalian genomes and estimated from NGS samples. The results are shown in Additional file We next tested the performance of Mash and Skmer on the same mammalian dataset. We first calculated pairwise Mash distances based on the 28 mammalian genomes using k-nearest neighbors (k-NN) measured by K=12 and M=10 in the reference set and predicted its continental origin by a majority vote approach  for normal mode and O(N×4K) for the fast mode where K is the kmer length and N is the number of samples. It should be noticed that the counting time is O(N×4K) whereas the calculation time is O(N2×4K); the total speedup ratio will thereby be close to the speedup ratio of dissimilarity calculation as the number of samples N increases. We suggest using fast mode when memory allows. For example, it is common to compare the pairwise dissimilarity among thousands of bacterial genomes using small kmer length 5 or 6 which does not require much memory, then the speedup ratio of fast mode can be more than 5000×.Both tools were used to calculate the pairwise entclass1pt{minimaentclass1pt{minimaK=16 as suggested in [K=12 nad s=103 for oak NGS dataset and K=14 and s=103 for primate genome dataset was only included to test their speed when using the same kmer length as kmer length shorter than 21 is not recommended for Mash and Skmer [CVTree much slower than Mash, Skmer, and FFP whereas Afann is capable of calculating CVTree in a comparable amount of time as Mash, Skmer, and FFP. The pairwise dissimilarity measures among primate genomes calculated by different methods were compared with their evolutionary distances estimated by alignment-based methods in [The running time and memory usage of other fast alignment-free tools Mash  and Skmeested in  were repnd Skmer . We can thods in  and showkmer-based methods have been widely used in NGS analysis without assembly or alignment. However, several studies have revealed that the alignment-free dissimilarity calculated based on NGS samples tends to be over-estimated compared to the alignment-free dissimilarity calculated based on their genomes caused by the stochastic distribution of short reads [k-NN prediction accuracy of their continental origins based on a dataset of samples with 50 M, 100 M, and 300 M sequencing quantity is even much lower than the accuracy based on a dataset of all samples with only 50 M sequencing quantity.Alignment-free sequence comparison methods, especially rt reads , 8, 12. CVTree[This problem was previously solved by downsampling  or modifCVTree, \documeentclass1pt{minimaentclass1pt{minimad,Bias(ANGS), and Bias(BNGS) to predict d. Two neural network regression models were trained for kmer length, supported by the large improvement of root mean squared error and Spearman correlation coefficient between dissimilarity based on NGS samples after bias adjustment and dissimilarity based on genomes.Therefore, we introduced a de novo method in this study to adjust bias without estimating the sequencing depth or sequencing error rate explicitly by defining K=14 and M=12 between all 84 samples were calculated without and with bias adjustment and compared with pairwise genome K=12 and M=10 between all 92 samples were calculated without and with bias adjustment, and k-NN was used to predict the continental origins of test samples based on k-NN is even lower than that using a dataset of all 50 Mbp samples before bias adjustment. After bias adjustment, the k-NN accuracy markedly increased and was comparable to the accuracy based on a dataset of all 300 Mbp samples. In addition, we proved that bias adjustment could increase the accuracy of prediction not only at continental level but also at finer geographic scales. At last, a 67 vertebrate dataset consisting of species from 5 different classes was used to demonstrate the reliability of our method on datasets composed of diverse species. In all datasets, our method outperformed other alignment-free methods including Mash [Without changing any parameters, the performance of our models was tested on 3 independent datasets. A 28 mammalian dataset was used to test our bias adjustment model for kmer length, it is, nevertheless, important to choose a proper kmer length so that the alignment-free dissimilarity based on genomes is highly correlated with their evolutionary distance. For instance, while Additional file K=5 to K=13 based on primate NGS samples, it can be clearly seen in Additional file K<10 is used. Therefore, even if our model can adjust the bias of K<10, the performance might not increase as we expected. There have been several investigations into the choice of optimal kmer length [kmers are optimal when sequences are short or obviously different, whereas longer kmers should be used when sequences are from very closely related species in order to reduce the probability that a kmer commonly appear in a sequence by chance [It should be noticed that while our bias adjustment method is capable of successfully predicting the alignment-free dissimilarity based on genomes regardless of the chosen mentclass2pt{minimr length , 21. In y chance .kmer lengths. Future work could train our models using more samples from different species with more variant sequencing depths to further improve the performance. In addition, since our bias adjustment method only relies on the alignment-free dissimilarity calculated between ANGS and In conclusion, our study showed that bias adjustment is a necessary step to increase the performance of alignment-free methods based on NGS samples. Although our models were trained only on the primate dataset, it was able to adjust the bias for independent mammalian, vertebrate, and white oak datasets, which proved that our model is generalizable to adjust the bias of NGS samples from different species, sequencing depths using different CVTree, Afann is a fast tool to calculate background-adjusted alignment-free dissimilarity measures CVTree[See Appendix A of Additional file CVTree, \documeentclass1pt{minimaentclass1pt{minimaK=14 and M=12 are highly correlated with their evolutionary distances estimated in [The primate dataset consists of 21 complete primate genome sequences downloaded from NCBI. In , the autmated in . The spemated in  to simulSimilarly, the mammalian dataset consists of 28 complete vertebrate genome sequences downloaded from NCBI, with evolutionary distances calculated by the alignment-based method in . The speThe white oak tree dataset consists of whole-genome shotgun (WGS) sequencing data of 92 white oaks from North America, Europe, and Asia with sequencing quantity ranging from 379 to 1852 Mbp from NCBI BioProject PRJNA269970 . The runThe vertebrate dataset consists of 67 complete vertebrate genome sequences downloaded from NCBI. The species are from 5 different classes, including 15 fish, 7 amphibians, 15 reptiles, 15 birds, and 15 mammals. All 15 species were randomly selected from the corresponding classes except for amphibian where there are only 7 amphibian complete genome sequences available on NCBI, and thereby, they were all included in the dataset. The species names, classes, assembly accession numbers, and total sequence lengths of these 67 vertebrate genomes are shown in Additional file d is determined by three variables, which are the alignment-free dissimilairty based on their genomes d and the bias caused by each sample Bias(ANGS) and Bias(BNGS):For any pair of NGS samples, their alignment-free dissimilairty We define the bias of an NGS sample A by the following equation:ANGS is the original NGS sample and ANGS to its reverse complementary read and thus is {AGTT, CGTC, ATAA, TTAT, GACG, AACT}, which is exactly the same as ANGS. The NGS sample in the left of Fig. ANGS.where mentclass2pt{minimmentclass2pt{minimANGS) can then be calculated between ANGS and ANGS) will increase as the sequencing depth of ANGS decreases or the sequencing error rate increases, as shown in Fig. ANGS) in this way is that we do not need to estimate sequencing depth or sequencing error rate explicitly, but this information has already been implicitly considered when we compare ANGS with Given an dissimilarity measure, such as mentclass2pt{minimd,d will increase as Bias(ANGS) or Bias(BNGS) increases, as shown in Fig. s of interest are the same. In addition, if Bias(ANGS) and Bias(BNGS) do not change, d will increase as d increases, as shown in Fig. ANGS) and Bias(BNGS), their pairwise d value increases with d.Given entclass1pt{minimad and d given Bias(ANGS) and Bias(BNGS), Eq. , Eq.  can be rG is a general function. Therefore, the bias adjustment process can be characterized as a regression problem that is capable of predicting the real genome dissimilarity d between any pair of NGS samples. To solve this supervised learning problem, we can first train our regression models on datasets of known d,d,Bias(ANGS), and Bias(BNGS). Then, for any new pair of NGS samples, we first calculate their d,Bias(ANGS), and Bias(BNGS) and use our model to predict its d. After bias adjustment, our sequence comparison can be based on the predicted unbiased d instead of biased d.where We trained 2 neural network regression models that are widely used to solve nonlinear regression problems for kmer length from 5 to 14 and Markovian order = k−2. For each kmer length, there are 168×167=28,056 pairs, so that Xk will be a matrix of dimension 28,056×3 and yk will be a vector of length 28,056 as shown below. To ensure that our model can train kmer lengths, we concatenated Xk from X5 to X14 vertically and concatenated yk from y5 to y14. Therefore, our final For each pair of NGS samples mentclass2pt{minimd=d ⇔ Bias(ANGS)=Bias(BNGS)=0). Therefore, we defined a hyperparameter augmentation ratio as r, and randomly simulated d1 to dm ) and concatenated XA and yA shown as below to our training samples X and y, respectively, to fit our model. The sizes of XA and yA were determined by the size of training samples and augmentation ratio r where m=|X|×r.A data augmentation technique based on prior knowledge was used to further increase the training samples. If there is no bias in NGS samples, then the alignment-free dissimilarity based on NGS samples should be equal to the dissimilarity based on their genomes (Twenty-eight thousand fifty-six (10%) samples were randomly selected as a held-out test set. The remaining 252,504 (90%) samples were used as a training set.R2 under this combination of hyperparameters were calculated .A given combination of hyperparameters was chosen. Steps 3–4 were repeated 10 times, and the average Ten percent of the samples from the training set were randomly chosen as a validation set, the other 90% of the samples were first augmented as aforementioned and then used to fit our model.d for the validation set, and R2 was calculated.The trained model was used to predict R2 was chosen (hyperparameter tuning).Repeat steps 2–4 with different hyperparameters, and the optimal combination of hyperparameters with the highest average d for the held-out test set and R2 was calculated .The optimal combination of hyperparameters was chosen, and trained on all training set, and the final model was used to predict A neural network regression model with ReLU activation , was trained and a grid search algorithm was implemented to find the optimal combination of hyperparameters such as hidden layer sizes, regularization term, and augmentation ratio. The workflow is described below and also shown in Fig. R2 value 0.98 for d and d were almost identical as shown in Additional file d and d as the final predicted dissimilarity between A and B to strictly satisfy the symmetry property.Finally, the combination of hyperparameters with the highest cross-validation score was chosen  and tested on the held-out test data with an K=12 and M=10 between each pair of samples in the dataset. Then, 92 samples were randomly divided into the reference set and query set. The number of samples in the reference set ranges from 91 (leave-one-out), 77, 60, 45, and 30 to 15. For each sample in the query set, we found its k-nearest (k=1–10) neighbors measured by For each sequencing quantity , we first calculated the pairwise Additional file 1 Supplementary methods, supplementary figures, supplementary tables.Additional file 2 Review history.


Aligning protein-protein interaction (PPI) networks is very important to discover the functionally conserved sub-structures between different species. In recent years, the global PPI network alignment problem has been extensively studied aiming at finding the one-to-one alignment with the maximum matching score. However, finding large conserved components remains challenging due to its NP-hardness.We propose a new graph matching method GMAlign for global PPI network alignment. It first selects some pairs of important proteins as seeds, followed by a gradual expansion to obtain an initial matching, and then it refines the current result to obtain an optimal alignment result iteratively based on the vertex cover. We compare GMAlign with the state-of-the-art methods on the PPI network pairs obtained from the largest BioGRID dataset and validate its performance. The results show that our algorithm can produce larger size of alignment, and can find bigger and denser common connected subgraphs as well for the first time. Meanwhile, GMAlign can achieve high quality biological results, as measured by functional consistency and semantic similarity of the Gene Ontology terms. Moreover, we also show that GMAlign can achieve better results which are structurally and biologically meaningful in the detection of large conserved biological pathways between species.https://github.com/yzlwhu/GMAlign.GMAlign is a novel global network alignment tool to discover large conserved functional components between PPI networks. It also has many potential biological applications such as conserved pathway and protein complex discovery across species. The GMAlign software and datasets are avaialbile at The online version of this article (10.1186/s12864-018-5027-9) contains supplementary material, which is available to authorized users. In many areas of bioinformatics, the generated data can be modeled as graphs such as gene co-expression networks, protein-protein interaction (PPI) network, etc. Thus, graph theory is becoming an important tool for biological network analysis. Integration of genetic-interaction data and protein-protein interaction (PPI) networks can reveal functional dependencies involved in cellular processes, including flagellum assembly, envelope integrity, and protein quality control . For PPIEarly literatures show that the sequence alignment problem has been extensively explored. However, as proved in , compariOne of the pioneers for global network alignment is IsoRank , which iAlthough the global network alignment problem has been extensively explored, it remains challenging in achieving a both topologically and biologically meaningful result due to the lack of clarity of the relationship between topology and sequence. Several approaches , 19, 23 GMAlign can produce larger alignment measured by edge-correctness (EC), and find bigger and denser common connected subgraphs measured by the Largest Common Connected subgraph in terms of the nodes  and edges .GMAlign achieves high biological quality in the alignment compared to other up-to-date aligners, as measured by functional consistency (FC) and average functional similarity (AFS).GMAlign can find large conserved components that are both structurally and functionally meaningful, i.e., detecting large conserved sub-structures in biological pathways across species.GMAlign stably outperforms existing algorithms on PPI network pairs. It can not only work well on graph pairs with general size but also can work well on the largest and densest network pair  where some of other aligners cannot even obtain the results in reasonable time.In this paper, we propose a new global network aligner GMAlign, which can successfully combine both topology information and sequence information in a better way to produce the alignment with larger size and find more functional conserved components. GMAlign is an approach with two-stages, inspired by the graph matching method for graphs without labels . In the G= to model a PPI network, where a node in u∈V represents a protein and an edge ∈E represents the interaction between proteins u and v. Usually, the sequence information is attached to each protein, which can be considered as the node label, and a PPI network thus can be considered as a graph with node labels. Now we give the problem definition of the global network alignment.We use a simple undirected graph G1= and G2= with |V1|≤|V2|, a global alignment f:V1→V2 is a one-to-one mapping from the nodes in G1 to the nodes in G2. The global network alignment aims to find a mapping to maximize the sequence similarities of aligned proteins and the number of conserved interactions. We model the global PPI network alignment problem as graph matching, which aims to find a matching M between G1 and G2 according to the mapping relationship f, i.e., M={)∣u∈V1,f(u)∈V2}. The quality of a matching M can be measured by the following score function: Given two PPI networks, eu,v=1 if u and v are connected, and eu,v=0 otherwise. seq can be any of the sequence similarity scores between u and v. score(M). If we do not consider the sequence similarity, this problem can be reduced to finding maximum common subgraph, which is also NP-hard.where There are two stages in the GMAlign algorithm, matching construction and matching refinement. In the first stage, we first identify anchors followed by an expansion to other nodes to find an initial matching. In the second stage, we gradually refine the initial matching to a locally optimal matching based on the vertex cover.S by integrating multiple similarities, including topological similarity St, degree similarity Sd, and sequence similarity Sseq.We propose a novel similarity measure to evaluate the node similarity St of two nodes u and v is evaluated in the context of their topological structures. To compute the topological similarity, we consider not only the local topological similarity Sl, which describes how similar they are regarding the topological structures around them, but also the global topological similarity Sg, which describes how similar they are regarding the whole topological structures of two graphs.The topological similarity Local topological similarity. First, for a node v in G=, we define its k-neighbourhood (k≥0) as Nk(v)={u|u can reach v in k-hops}. The k-neighbourhood subgraph of v in G is defined as the induced subgraph over Nk(v)∪{v} in G, which is denoted as u∈V1 and v∈V2 by comparing their k-neighborhood subgraphs. Specifically, suppose that d(u) is the degree of node u∈V1, and d(v) is the degree of node v∈V2. Let d1,1,d1,2,⋯ and d2,1,d2,2,⋯ are the degree sequences of Nk(u) and Nk(v) respectively sorted in the non-increasing order. Let nmin= min{|Nk(u)|,|Nk(v)|}. Then we can compute the local topological similarity of u∈V1 and v∈V2 as (1) d(u),d(v)} is the ideal number of common neighbor edges when we match nodes u and v, and Nk(u) with nodes in Nk(v).where in Eq. , min{d has good properties that can effectively capture the local topology as follows ≤1. Especially, Sl=1 if u is matched to v in the optimal matching of 1) 0≤u matches v in the optimal matching of 2) 3) Global topological similarity. The global topological similarity is inspired by the graph spectral theory, which can represent and distinguish structural properties of graphs by the eigenvalues and eigenvectors of its adjacency matrices. The intuition is that two isomorphic graphs will have the same eigenvalues and eigenvectors of their adjacency matrices. The earliest representative study is  is the global topological similarity between u∈V1 and v∈V2.Here, Sl and the global topological similarity Sg, we measure the topological similarity St for nodes u and v by combining them together as follows. Based on the local topological similarity St around nodes u and v, we also consider their similarity based on degrees of themselves, which is defined as In addition to the topological structure St and degree similarity Sd are measures to capture graph structure. Thus, we use the structure similarity Sstr to integrate them by adding a balancing parameter θ∈. Both topological similarity u and v, which is defined as In addition, we also consider their sequence similarity when we match two nodes seq can be any of the sequence similarity scores . Sseq is in the range of  after the normalization.where u∈V1 and v∈V2 by integrating the structure similarity Sstr and the sequence similarity Sseq together by a balancing parameter α∈. Finally, we obtain the overall similarity score of To construct an initial matching, we first choose some important node pairs with high similarity scores and large degrees as anchors, and then we expand from the anchors to match the rest of the nodes gradually.We select anchors according to the following two conditions:d(u),d(v)}≥δ1) min{S≥τ, where τ is a threshold and generally τ≥0.5. The detailed method of automatically tuning a suitable τ is given in Additional file 2) M because they are similar with each other. Second, they can be important references in the matching process due to their high degrees.The anchors selected based on above criteria play two important roles. First, they contribute a large number of edges to the matching S for all u∈V1,v∈V2 in line 2, followed by the sort of pairs in the decreasing order of S and the selection of matched anchors pairs in lines 3–5. Then we expand the matching by adding anchors in A to M. For every matched pair ∈M, we put all the N(u)×N(v) pairs into a candidate queue Q, where Q is sorted in the decreasing order of their expansion similarity in lines 6–7. It is a variant of S obtained by excluding the global similarity as the expansion is in a local manner. Then we iteratively remove the pair  with largest similarity from Q in line 9. If both u and v have not been matched before, we add  to M and put N(u)×N(v) into Q for further consideration in lines 10–11. The loop ends when Q is empty.Algorithm 1 shows the process of matching construction. First, we compute score M cannot guarantee the optimality of M. We further study how to refine the initial matching to get better matching results. The main idea is that each time we check some part of the matching to see if we can directly obtain an improved matching by avoiding the exhaustive search over the matching space.The heuristics used to obtain the initial matching G, we define its vertex cover as a subset of nodes C⊆V, such that u∈C or v∈C for each edge ∈E. The complement of a vertex cover I=V−C is an independent set of the graph. In other words, C is the set of nodes that covers all the edges in the graph, while in I=V−C there exists no edge. This also means that a node in C⊆V1 can possibly have many edges to cover or possibly have many matched edges with graph G2.For a graph R1 and R2 to represent the matched nodes in graphs G1 and G2 respectively in the matching M. For any ∈M, we have u∈R1 and v∈R2. Given a vertex cover C⊆V(G1), we use H1 to denote C∩R1, and use H2=M[H1] to denote the corresponding matched part of H1 in R2. The nodes of G1 are divided into three parts H1, C−H1 and V1−C. According to the definition of vertex cover, the nodes in H1 may lead to good matches, which are thus be excluded in the refinement. C−H1 should be included in the refinement as the nodes in C−H1 have not been matched to any nodes. The independent set V1−C is also included in the refinement because the contribution of matched edges for each node in this set will not affect each other. Then by excluding H1, we can compute a refined matching M∗(H1) for G1 and G2 based on the initial matching M and vertex cover C⊆V(G1) as follows.We use Gb, where node set V1−H1 is on one side and nodes set V2−H2 is on the other side. For any u∈V1−H1 and v∈V2−H2, we add an edge  to Gb and its weight can be computed as First of all, we build a bipartite graph w can be consider as the number of matched edges if we match u in G1 with v in G2.where Mb of Gb such that the total weight of edges in Mb is maximized. Thus, a new M∗(H1) can be derived asThen, based on the Hungarian algorithm, we can find the maximum weighted bipartite matching H1×H2 is the cartesian product of H1 and H2 which includes all the pairs  for all u∈H1 and v∈H2. The optimality of M∗(H1) has been proved in , we sample the balancing parameters from 0 to 1 with step size of 0.1. We will also evaluate robustness of the different methods by adjusting the parameter in the same way. We set θ=0.5 in GMAlign to balance the topological structure and self-degree, neighborhood size k to 2, and iteration number X to 5 in GMAlign to achieve good performance stably on all the network pairs. All the algorithms run on a PC with an Intel Core I7-4790 CPU at 3.6GHz with 64GB memory.We compare our algorithm GMAlign with GHOST , NETAL , SPINAL %, while the EC for NETAL [% respectively. We can see that GMAlign has significant advantage in finding a bigger size in the alignment. As [%, respectively. In addition, as Fig. %, while the LCCe are only 48.43% for HubAlign and 45.95% for NETAL. This shows that GMAlign is also capable of finding bigger and denser common connected subgraph that is biologically important for PPI networks.First, we evaluate the topological quality of the alignments on the entclass1pt{minimaor NETAL , HubAligor NETAL  and L-GRentclass1pt{minimaentclass1pt{minima3. As shown in Fig. %.L-GRAAL [% and 26.02% respectively. As we know, S3 is a penalization when aligning sparse regions with dense regions. However, such penalization is not very reasonable when it is necessary to map a sparse network to a dense network, especially when the scales and densities of the 6 evaluated PPI networks are different. Thus, we believe that S3 is only a reference to show the density similarity of the mapped regions and cannot be considered a principle measure to evaluate the topological quality. The detailed results in Figure 2-5 are given in Additional file Now we evaluate the measure S.L-GRAAL  and GMAlOverall, GMAlign, NETAL , HubAligWe evaluate the algorithms on two large networks, human (HS) and yeast (SC). Since not all the aligners can finish the alignment for these two large networks in reasonable time, we only report the results for the capable aligners.% for EC, bigger and denser common connected subgraph of 99.49% for LCC and 30.17% for LCCe. It enhances the conclusion in MI-GRAAL [% proteins in the yeast had a high-confidence PPI subnetwork that is fully contained within the human high-confidence PPI subnetwork. In this paper, we use the datasets which are far larger than those in MI-GRAAL, and GMAlign, HubAlign [%) was found for the first time by GMAlign.First, as shown in Table HubAlign  and L-GRHubAlign  finds a 3 of 16.89%, while L-GRAAL only achieves 11.91%. This is the first time that GMAlign not only produces alignment with a larger EC, LCC, and LCCe, but also finds more sub-structures with similar density. We believe that the underlying reason is HS and SC have similar densities.Second, surprisingly, Table As we can see all above, GMAlign has excellent ability in producing larger size alignment and finding bigger and denser common connected subgraphs. Moreover, GMAlign has the potential in finding same parts with similar density in the two networks, which depends on the properties of the matched networks such as degree distributions.α from 0 to 1, and compute the average value of all the pairwise alignments on each value of α.We investigate the relationship between the topology information and sequence information on the HubAlign  and L-GRentclass1pt{minimaα from 0 to 1, GMAlign is always stable while HubAlign and L-GRAAL and drastically decrease when transferring from topology information to sequence information. Figure 3, GMAlign is outperformed slightly by L-GRAAL for small α, but it outperforms L-GRAAL for large α because of its stability. In fact, there might be hidden connections between topology information and sequence information, and the difficulty is how to combine them naturally without too much conflict. We combine them at the bottom level of node similarity more naturally while the other two methods combine them at a very high level with respect to the whole node set and edge set.First, as shown in Figs. Overall, GMAlign can produce larger size alignment and find bigger and denser common connected subgraphs robustly under different parameter settings. All the algorithms achieve the best topological matching quality when we only use topology information, which is also consistent with the declaration that topology plays a more important role than sequence for uncovering functionally conserved interactions .The biological analysis is based on the alignments generated. For methods with tunable parameters between topology and sequence information, we only used topology information. The reason is that very few mapping nodes are generated when involving sequence information, and topology plays a more important role than sequence as declared in .% aligned nodes have at least one GO term shared for GMAlign, while the fraction for L-GRAAL is only 13.67%. GMAlign and HubAlign can even align some nodes that share more than 5 GO terms.We measure the Functional Consistency (FC) based on the fraction of aligned proteins sharing common GO terms. We show the FC score for alignment based on the yeast (SC) and human (HS) PPI networks in Table Similar experiments are also conducted on the Functional similarity (AFS) provides an alternative way to describe the biological quality of an alignment, which is calculated based on the semantic similarity of the GO terms associated with the mapped proteins. The AFS score in each category of BP, MF and CC in the ontology for the yeast-human network alignment is displayed in Figs. AFSCC of 1.047  and yeast (HS), which have been investigated a lot in the literature , 25, 26.The conserved part of the sce03010 and hsa03010 pathways in the alignment obtained by GMAlign is shown in Figs. The purpose of network aligners is to find functional and structural similarities between PPI networks of different species . Most exIt seems that most current aligners cannot combine the optimization of both sequence similarity and structural similarity very well . For exaGMAlign combines multiple similarities including both topological similarity and sequence similarity from the early alignment procedure to the refinement stage to get more meaningful topological and biological results. Our experimental results confirm that GMAlign can find bigger and denser common connected sub-structures Additional file 2The detailed results of Figure 2–5 for all aligners. (XLS 7 kb)Additional file 3The detailed results of Figure 13–15 for all aligners. (XLS 8 kb)Additional file 4The results produced by GMAlign. Each pathway pair has four sheets to describe alignment results. The former two sheets represent retrieving results of two species by APID dataserver  respectiAdditional file 5The results produced by HubAlign. Each pathway pair has four sheets to describe alignment results. The former two sheets represent retrieving results of two species by APID dataserver  respectiAdditional file 6The results produced by MAGNA. Each pathway pair has four sheets to describe alignment results. The former two sheets represent retrieving results of two species by APID dataserver  respectiAdditional file 7The results produced by L-GRAAL. Each pathway pair has four sheets to describe alignment results. The former two sheets represent retrieving results of two species by APID dataserver  respectiAdditional file 8The results produced by MAGNA. Each pathway pair has four sheets to describe alignment results. The former two sheets represent retrieving results of two species by APID dataserver  respecti


Aligning sequences for phylogenetic analysis  is an important, but increasingly computationally expensive step with the recent surge in DNA sequence data. Much of this sequence data is publicly available, but can be extremely fragmentary , which can compound the computational issues related to MSA. Traditionally, alignments are produced with automated algorithms and then checked and/or corrected “by eye” prior to phylogenetic inference. However, this manual curation is inefficient at the data scales required of modern phylogenetics and results in alignments that are not reproducible. Recently, methods have been developed for fully automating alignments of large data sets, but it is unclear if these methods produce alignments that result in compatible phylogenies when compared to more traditional alignment approaches that combined automated and manual methods. Here we use approximately 33,000 publicly available sequences from the hepatitis B virus (HBV), a globally distributed and rapidly evolving virus, to compare different alignment approaches. Using one data set comprised exclusively of whole genomes and a second that also included sequence fragments, we compared three MSA methods: (1) a purely automated approach using traditional software, (2) an automated approach including by eye manual editing, and (3) more recent fully automated approaches. To understand how these methods affect phylogenetic results, we compared resulting tree topologies based on these different alignment methods using multiple metrics. We further determined if the monophyly of existing HBV genotypes was supported in phylogenies estimated from each alignment type and under different statistical support thresholds. Traditional and fully automated alignments produced similar HBV phylogenies. Although there was variability between branch support thresholds, allowing lower support thresholds tended to result in more differences among trees. Therefore, differences between the trees could be best explained by phylogenetic uncertainty unrelated to the MSA method used. Nevertheless, automated alignment approaches did not require human intervention and were therefore considerably less time-intensive than traditional approaches. Because of this, we conclude that fully automated algorithms for MSA are fully compatible with older methods even in extremely difficult to align data sets. Additionally, we found that most HBV diagnostic genotypes did not correspond to evolutionarily-sound groups, regardless of alignment type and support threshold. This suggests there may be errors in genotype classification in the database or that HBV genotypes may need a revision. The multiple sequence alignment (MSA) is arguably one of the most important steps in a phylogenetic analysis , but canhttp://www.ncbi.nlm.nih.gov/genbank/statistics/).In recent decades, molecular phylogenetics has experienced a boom due to the generation of increasingly larger DNA sequence data sets for addressing difficult biological questions . This inhttps://www.ncbi.nlm.nih.gov/genome/viruses/) as a mix of full genomes and sequence fragments. In most cases, available sequences from these taxa are from regions of the genome selected for diagnostic purposes , a medically important and globally distributed virus . Every yHBV has a compact circular genome ∼3.2 kb in length, with four genes arranged across overlapping reading frames . Any attTo ameliorate these issues in virus MSA, we compared traditional automated-manual alignment approaches to fully automated methods for phylogenetic analyses on a tall and narrow data set generated from publicly available HBV sequence data. Using two different data sets, one comprised exclusively of whole genomes (and therefore with limited missing data) and a second comprised of most publicly available HBV sequences (a highly fragmentary data set) we compared three alignment methods: (1) traditional automated MSA methods , (2) the commonly used hybrid approach of MSA followed by manual adjustment of the alignment, and (3) UPP and PASTA, two modern automated MSA methods. This approach allowed us to assess the effectiveness of different methods for handling the problem of large matrices with highly fragmentary sequence data. Additionally, through MSA evaluation methods we were able to assess the phylogenetic signal of and monophyly within named strains of the virus.To obtain sequence and genotype data we downloaded all GenBank files (.gb) for hepatitis B sequences using the NCBI Taxonomy Browser (Taxid: 10407) on 20 March 2013. This included both full genome and fragmentary sequence data. This initial download yielded 55,353 sequences. Sequences from non-primate hosts, less than 100 bp in length, lab strains, and recombinant genomes were removed.https://doi.org/10.5061/dryad.nc220).Here we detail our approaches for aligning genomes only and all (genomes + fragmentary) HBV sequence data sets . The worTo generate the genomes-only data set, we selected whole genomes from our initial filtered GenBank download. Whole genomes were identified by sequence length. The HBV genome is estimated to be ca. 3.2 kb long, therefore we selected sequences ≥3,000 bp to be included in our full genome data set. In total, we identified 5,553 full genome sequences.https://github.com/tacatanach/Hepatitis_B_Virus_alignment). This script chose a universal starting point in the alignments, and removed any overhang from the end and placed it at the beginning. The “linearized” sequences were then aligned using the default gap parameters in MUSCLE  as follows. We flagged sequences with outlier branch lengths (branches whose leaf to the nearest node distance were >1.5 times the interquartile range of the other branch lengths), and removed these outliers from the alignment. We then repeated the NJ QC step two more times to remove any remaining poorly aligned sequences. The final alignment included 5,244 sequences.As a final quality check of the MUSCLE-manual alignment, we inferred a neighbor-joining (NJ) tree using the R package ape . In ordeTo compare the traditional method of MSA  with fully automated approaches, we started with the 5,244 individual sequences identified in the manual method as high quality genomes. We then aligned these sequences with several alignment methods without manually adjusting the resulting alignment. The input data were linearized and degapped prior to alignment. For alignment software we used PASTA v.1.6.3 , MAFFT vhttps://github.com/tacatanach/Hepatitis_B_Virus_alignment). Because GenBank accession numbers are assigned sequentially at submission, a cluster of successive HBV sequences is likely from the same region of the genome. As with the genome sequences, we used our custom script to “linearize” the original GenBank sequences. We also created a consensus sequence of the full HBV genome  based on the genome alignment, using majority rule (rather than ambiguity codes) for ambiguous sites. This consensus sequence served as a reference for downstream alignment steps. Each author then aligned about 150 files, using the default gap parameters in MUSCLE and checking each alignment by eye against the genome consensus sequence. To facilitate aligning by eye we used custom scripts to “ladderize” the alignments by ordering the sequences according to starting position and length  so that in each alignment sequences with similar starting points and lengths were placed next to each other. To combine two alignments we used profile-profile in MUSCLE followed by manual adjustments against the genome consensus. We iteratively repeated this process to gradually combine the sequences. This process was successful for several rounds of profile-profile alignments. However, the alignment files eventually became too large for the profile-profile function in MUSCLE to consistently align pairs of files. At this point, we began manually combining pairs of aligned sequence files using the cat Unix command followed by manual adjustments. Adjustments were made by opening gaps in each alignment subset to align with the reference.A traditional, brute force approach to align all 55,353 sequences (including full genomes and fragmentary sequences) was not feasible due to the large number of sequences and alignment gaps from the fragments. Therefore, to align the full set of sequences we first used a custom script to group sequences into 1,269 FASTA files based on their GenBank accession numbers . To align these sequences with the larger sequence matrix, we first split all singletons into files of 50–100 sequences, each file containing a consensus genome sequence. These sequences were then aligned by eye to the consensus genome sequence, and resulting aligned sequence files were combined as described above. We then manually combined all aligned sequence files as described above, using the genome consensus sequence as a reference.https://github.com/tacatanach/Hepatitis_B_Virus_alignment). We then combined all consensus sequences maintaining the alignment structure. By collapsing sets of sequences into a single consensus sequence we could visually check the entire alignment. If consensus sequences were not aligned to each other or contained many ambiguity codes, this indicated a particular portion of the alignment was misaligned. We then adjusted the corresponding alignment accordingly and repeated the process until we could not detect any misaligned regions.To further check the alignment, we created consensus sequences (with ambiguity codes) for blocks of 73  sequences (JX978431) as an outgroup.During the alignment step, 5,000 sequences could not be aligned because they were unflagged recombinants or from non-humans hosts and were subsequently removed. We also ran five iterations of the NJ QC step and removed an additional 168 sequences. Finally, we checked to ensure that sequences from unique hosts, geographic regions, ancient (more than 100 years old) samples, and all genotypes were present in the alignment. If any of these key data were removed through prior filtering steps, they were manually added back into the alignment. Including these sequences is important for having a representative sample, and warranted the additional effort required to incorporate them into our alignment. We also included a sequence of HBV from woolly monkey . We then calculated the total number of edges for each tree and the number of edges that were incompatible with the other tree in the pairwise comparison using Phylonet Modified . We alsohttps://github.com/tacatanach/Hepatitis_B_Virus_alignment). We call this metric the “genotype occupancy proportion.” We repeated this analysis for each bootstrap collapse threshold  of each tree.As a way to assess tree differences in a biologically meaningful context, we mapped genotype labels onto our tree tips. We pruned out tips that did not have any associated genotype data or were recombinant  based on GenBank metadata. For each genotype, we then identified the smallest possible clade that included all taxa of the genotype, and calculated the percentage of tips in the clade identified as that genotype using a python script mono.py . After iteratively aligning sequence files and filtering out divergent sequences , the final alignment included 32,819 sequences. “Linearizing” the full alignment and removing gap-only columns resulted in a final alignment length of 5,196 characters. This same data set was used to create two UPP alignments: (1) using the manually-aligned genomes only data set as a backbone ; and (2) using a PASTA-aligned backbone .All sequences included in the genome-only alignment were also included in the total alignment. After filtering the initial NCBI download, we had a data set of 37,788 sequences, including both full genome and fragmentary sequences  alignments had intermediate ratios. Trees from the total automated alignments (with UPP) had slightly lower ratios than the total manual alignment, but the two UPP trees had the fewest number of differences between them  of tips in the “D” clade for most genome alignment types and support thresholds. However, the S-region only illustrated a high proportion of genotype occupancy at the 0% bootstrap cutoff. Additionally, at the 90% bootstrap cutoff only the manual genome alignment had a high occupancy value, whereas the other two genome alignments (MUSCLE and PASTA) had a value of 22%. This lower value was similar to occupancy proportion values in all total alignment categories for genotype D.We compare the labor requirements for the automated alignment methods  with the fully manual MUSCLE-manual alignment. All automated alignments were run on a dedicated machine with 24 nodes. Automated methods that were parallelized completed quickly, with MAFFT requiring 4 min of wall clock time, Clustal Omega 2.25 h, and PASTA requiring 3.5 h. MUSCLE, on the other hand, is a single threaded program and required 32 h to align. An additional 72 person-hours were needed to manually hand-curate the MUSCLE alignment to produce the MUSCLE-manual alignment. It is important to note that both PASTA and UPP can result in slightly differing alignments over multiple runs due to the use of multiple cores.An additional 36 h were needed to align the total data set  using UPP and the genome backbones . Although an exact estimate of the manual alignment of this same data set is not possible, in comparison the process took >1,000 person-hours divided between nine authors over a two year period.Comparisons among phylogenetic trees of HBV indicated that sequence alignment strategy did not have a major effect on tree topology. Within the data set containing only complete genomes, all alignment methods  produced phylogenies without noticeable differences using three methods of evaluation . Additionally, when two of these whole genome alignments  served as a backbone to align genome fragments with UPP, the resulting phylogenies were not different in any biologically meaningful way based on our metrics.When considering support values for phylogenetic trees produced by different alignment methods, trees with a minimum acceptable bootstrap support threshold of 50% or greater were compatible (less than 20% of edges were incompatible). These results suggest multiple alignment approaches are effective for highly fragmented data sets. However, because manual editing of large fragmentary data sets is laborious, the fully automated approach using appropriate software  to align these types of data sets is preferred. The traditional method of checking automated alignments consumes time that could be devoted to other tasks, can be difficult to replicate, and is impractical for large data sets. Yet accuracy remains the goal of phylogenetic estimation and is dependent on the alignment step and is the driver for retention of manual curation. Here we have demonstrated that manual alignment and curation give comparable results to automated methods. This is encouraging, given that publically available data from high-throughput NGS sequencing projects is increasing exponentially and will likely drive a greater reliance on automated methods. It also suggests that findings based on completely automated methods are comparable to results from earlier studies that may have included a manual step. Integrating complete data with existing fragmentary sequences is crucial for addressing biologically relevant questions and in our data, we have shown this can be done so in a consistent manner across commonly used methodologies.Although minor differences in tree topologies are expected when multiple analytical approaches are used, these differences may not be biologically meaningful (i.e rearrangement of branches within a clade). To test the impact of alignment type on the biological meaning of the resulting phylogenies we used HBV genotypes, a feature often annotated by researchers when submitting HBV sequences to GenBank. We sought to determine if HBV genotypes where stable in their location in the tree (consistent) and if they were monophyletic (accurate with regard to evolutionary relatedness) within our tree. Our results are consistent that the genotype occupancy in a clade remain stable across alignment types for both genome and fragmentary data sets. This indicates the alignment approach for these types of data sets does not have a major effect on the biological interpretation of the inferred topologies, particularly when testing the monophyly of a particular subset of tips. This is consistent with our test of incompatible edges among topologies when considering bootstrap support. This assessment also supports using the fully automated approaches, because using considerably more time to manually adjust alignments does not appear to result in different biological interpretations.Despite genotypes exhibiting consistent clade composition across the different alignment approaches tested, the genome and fragmentary topologies generally had very different occupancy values between them. Topologies from the genome alignments tended to have higher genotype occupancy than topologies from the fragmentary alignments. However, neither data set consistently showed high occupancy. The genotypes that did have good occupancy values (>85%) were often represented by few tips (<100). This pattern of low occupancy was often consistent across support thresholds, suggesting that tree estimation error is not a primary source of the non-monophyly of genotypes. Therefore, most HBV genotypes appear to be paraphyletic or polyphyletic and do not reflect natural groups. The ten HBV genotypes are generally delimited geographically , but areOur HBV DNA alignment is “tall and narrow,” characterized by having many individual sequences but relatively few characters. In this instance, the number of sequences in the alignment matrix (height) is much greater than the number of characters (length), particularly for the data set including both genomes and fragments. This total data set has 32,819 sequences (height) and each contained at most 5,196 characters (width) including gap characters. One way to improve phylogenetic resolution of “tall and narrow” data sets is to increase the width of the alignment matrix by adding characters . HoweverAnother issue facing phylogenetic estimation of HBV is the lack of a universal sequence starting point. Although the genomes are circular, sequences are uploaded to GenBank in linear format. Without a universal starting location, publicly available HBV sequences begin at different places in the genome. Additionally, the 3′  end of one sequence may be orthologous to the 5′  end of another sequence. In a sequence alignment, the two sequences would only overlap over a fraction of their entire length, and the whole alignment would be much longer than necessary. Indeed, when we initially used PASTA to align HBV genomes downloaded from GenBank, the alignment was approximately 19,000 bp in length, or 6 times longer than the length of the HBV genome. It was therefore necessary to “linearize” the alignments by moving 3′sequences to the 5′end before aligning the sequences using a fully automated approach. A similar approach should be taken by future studies focusing on HBV phylogenetics, or for other organisms with similar data issues. Our script chooses an arbitrary cutoff point for “linearization,” but perhaps future approaches should choose alignment starting points based on genes or other biologically relevant information. Databases could also implement a standardized starting point for data deposited from these circular genomes.Here we demonstrate that UPP and PASTA, completely automated MSA approaches, resulted in alignments that produced phylogenetic trees that are topologically and biologically similar to those produced using a sequential approach that uses manual interventions. However, the fully automated approaches were completed quickly as opposed to the numerous hours spent on adjusting alignments for the traditional method. Although we used PASTA to generate the backbone for aligning the fragmentary data set with UPP, the results of our clade occupancy comparisons between different alignment methods indicate that alignments from other software will produce similar phylogenetic hypotheses for HBV. Researchers are encouraged to test multiple alignment programs before choosing a backbone in which to align fragmentary data against. Finally, phylogenetic trees estimated from both fully automated and traditional alignments indicated most HBV genotypes are not monophyletic. This result suggests traditional HBV genotype delineations should be reevaluated, and should encourage future studies to further address this issue.10.7717/peerj.6142/supp-1Figure S1Workflow undertaken to align publicly available hepatitis B virus sequences using a traditional approach . Genome alignment (top) and total  data sets are both illustrated. Blue boxes represent processes , and green shapes represent data products .Click here for additional data file.10.7717/peerj.6142/supp-2Figure S2The results show that PASTA, Clustal Omega and MAFFT result in similar tree topology for highly supported edges.Click here for additional data file.10.7717/peerj.6142/supp-3Figure S3The alignments methods PASTA (top), Manual (middle), S-region (bottom) show similar pairwise p-distance distributions.Click here for additional data file.