The emergence of viruses and their variants has made virus taxonomy more important than ever before in controlling the spread of diseases. The creation of efficient treatments and cures that target particular virus properties can be aided by understanding virus taxonomy. Alignment-based methods are commonly used for this task, but are computationally expensive and time-consuming, especially when dealing with large datasets or when detecting new virus variants is time sensitive. An alternative approach, the encoded method, has been developed that does not require prior sequence alignment and provides faster results. However, each encoded method has its own claimed accuracy. Therefore, careful evaluation and comparison of the performance of different encoded methods are essential to identify the most accurate and reliable approach for virus taxonomy classification. This study aims to address this issue by providing a comprehensive and comparative analysis of the potential of encoded methods for virus classification and phylogenetics. We compared the vectors generated for each encoded method using distance metrics to determine their similarity to alignment-based methods. The results and their validation show that K-merNV followed by CgrDft encoded methods, perform similarly to state-of-the-art multi-sequence alignment methods. This is the first study to incorporate and compare encoded methods that will facilitate future research in making more informed decisions regarding selection of a suitable method for virus taxonomy. The global impact of COVID-19 cannot be overstated and continues to evolve as new virus variants emerge. Understanding virus taxonomy can aid in virus management by allowing researchers and healthcare providers to identify and track various types of viruses. For example, if a new virus is discovered, establishing its taxonomy might help scientists understand its traits and how it may behave.COVID-19 infection primarily spreads through respiratory droplets and can cause symptoms ranging from mild such as fever and cough, to severe such as difficulty in breathing and pneumoniaVirus taxonomy can support the development of vaccines and treatments. Researchers can assess which types of vaccinations or therapies would be effective by identifying the family and species of a virus. This knowledge may potentially be used to direct the creation of novel therapies that focus on particular viral traits. By using computational techniques like alignment-based methods, it is possible to classify viruses according to their genomic sequences and deduce their evolutionary relationships.3. Once the sequences are aligned, a phylogenetic tree4 can be constructed using various algorithms, such as the neighbor-joining method5 or the maximum likelihood method6. The resulting tree reflects the evolutionary relationships between the organisms based on their genomic sequences. While accurate, these techniques are computationally expensive, which makes them unsuitable for assessing huge datasets7. To overcome these limitations, a variety of alignment-free techniques have been developed in the signal processing domain over the last two decades with promising performance8.Alignment-based methods for classifying genes rely on finding optimal alignments between sequences using scoring systems. They are often performed using software such as ClustalW or MUSCLE, which can align the sequences and calculate a score that reflects their similarity11.Alignment-free methods do not employ sequence alignments to compare and classify sequences; instead, they extract features or patterns and use them to compare and classify sequences. Because of their efficiency, scalability, and ability to handle big datasets, alignment-free approaches have grown in popularity14, each with its own stated accuracy. This study comprehensively reviews encoded methods that employ various approaches. We aim to investigate the behaviour of these encoded methods and determine how they address the uncertainty associated with generating reliable results. By identifying dependable and rapid techniques, we seek to highlight promising avenues for future research. Our work offers several important contributions to the field, including:Providing a first of its kind, comprehensive and comparative review of seventeen different encoded methods for ten different data-sets of varying lengths.Comparing the effectiveness of encoded methods with the well-established non-encoded methods. By doing so, we have identified the strengths and weaknesses of encoded methods and provided insights into their respective performances.Identifying the most reliable and fast encoded method, which could be used as an alternative to the computationally expensive alignment method.Publishing the datasets and codes used in this study online, to enable other researchers to replicate and build upon the findings of the study.Offering supplementary documents that provide phylogenetic trees and metrics results for each method and dataset. This information will be useful to researchers who want to delve further into the data to gain a more detailed understanding of the results.There are several alignment-free  approaches available3 and MUSCLE15, were implemented on the software package MEGA 1116. The other two methods, MAFFT17 and ClustalOmega18, were implemented on an online tool called NGphylogeny19.This study investigated a total of twenty different methods: four non-encoded multi-aligned methods and seventeen encoded methods. We employed ten different datasets using three separate software tools - Matlab, MEGA, and NGphylogeny (online). The similarity of encoded methods is compared to four state-of-the-art multi-sequence alignment methods. Two of these methods, ClustalWThis comparison allowed us to rank the encoded methods based on their similarity to the alignment method. It is worth noting that the choice of sequence alignment method may affect the comparison results. However, there are commonly used methods for multiple sequence alignment that are well-respected in the field. Additionally, use of two different software tools (MEGA11 and NGphylogeny) help to ensure that the results are robust and not influenced by a specific software implementation.20 was used to construct the matrix for each alignment  method to ensure that the results obtained from these methods were comparable. When comparing different encoding methods, one potential issue is that some methods may produce matrices with large values. In contrast, others may produce matrices with small values. We have normalized our matrix over a range of 0 and 1 where the minimum value is set to 0 and the maximum value is set to 1 since it is likely that the absolute value of the matrix does not reflect the differences between methods . By doing this, the matrix values are transformed into a consistent scale, which allows for fair and unbiased comparisons between different methods.We used a funnel approach to evaluate each non-encoded method Fig. . First, Next, we compare the distance matrix generated by each encoded method with the distance matrix generated by each non-encoded method using Euclidean distance. The method with the smallest Euclidean distance to the non-encoded method will considered to be the most similar. This comparison allowed us to rank the encoded methods based on their similarity to the alignment method. Finally, in order to validate the results obtained in the previous step, we utilised distance metrics at an arbitrary non-binary phylogenetic tree level. We then excluded any encoded methods that failed to meet the similarity criteria. To provide additional validation, we conducted a visual comparison of the phylogenetic trees. This enabled us to determine which encoded method had the least amount of difference from the multi-sequence alignment method. Through these steps, we were able to determine the effectiveness and accuracy of each encoded method and identify the most similar method to the non-encoded one.21, where virus genomes were collected from sources such as GenBank22 and GISAID23. To prevent any potential biases from the datasets used in previous studies, a new dataset, Dataset0 is also included in this analysis. Dataset0 has not been previously used in any encoding techniques, ensuring a fair comparison between the different encoding methods being tested. The Table In this study, datasets were incorporated from previous studiesClustalW uses a progressive alignment to align protein or nucleotide sequences. It involves constructing a guide tree based on pairwise distances between the sequences and then aligning the sequences based on the order of the tree.Clustal Omega uses a combination of progressive and iterative methods to align protein or nucleotide sequences. It constructs a guide tree based on pairwise distances between sequences and then aligns the sequences based on the order of the tree. It then iteratively refines the alignment to improve its accuracy.MUSCLE (Multiple Sequence Comparison by Log-Expectation) constructs an initial alignment of the most similar sequences and then iteratively refines the alignment to incorporate additional sequences. It uses a progressive alignment method, which starts with a rough alignment of the most similar sequences and then adds in the remaining sequences one by one.MAFFT (Multiple Alignment using Fast Fourier Transform) uses a variety of algorithms to align sequences, including progressive pairwise alignment, iterative refinement, and consistency-based alignment. It also employs a fast Fourier transform algorithm to improve the accuracy of the alignment.24. These numerical representations offer the ability to perform counting the occurrences of specific sequences within a larger sequence and comparing the similarity between two sequences25. This approach has been applied in the analysis of Rubisco protein genes, where a direct mapping using atomic numbers was employed to calculate sequence fluctuation26.The atomic number method of gene encoding assigns each nucleotide base in DNA a corresponding atomic number. The nucleotide bases are represented by A = 70, T = 66, C = 58, and G = 78, which correspond to the number of protons in the nucleus of an atom27. These values characterize the distribution of energies associated with the pseudopotentials of free electrons across the DNA sequence. The utilization of EIIP values has found practical applications in various domains, including neural networks, wavelet transform, and graph signal processing (GSP)28. By reflecting the pseudopotential feature of nucleotide sequences, EIIP values have proven to be valuable in fields such as bioinformatics, genomics, and molecular biology29.The Electron-Ion Interaction Pseudopotential (EIIP) technique is a computational physics method employed to investigate the interactions between electrons and ions in materials. In this technique, specific values  represent the relative frequency of the four nucleotides  within a genetic sequence3031. By employing these encoded nucleotide sequences, various mathematical techniques, such as clustering algorithms, can be applied to analyze and identify patterns or relationships between the sequences.Molecular mass quantifies the total mass of all atoms present in a molecule. To represent molecular mass numerically, the individual atoms within the molecule are assigned values based on their atomic masses, typically expressed in atomic mass units (amu). In the context of gene sequence encoding, each nucleotide  is assigned a specific numerical code, 110, 125, 134, and 150, respectively32. The encoding representation of each of the four nucleotides is cytosine = 0.27215, thymine = 0.20576, adenine = 0.24300, and guanine = 0.2790933.The fractional occurrence of nucleotides and their frequencies are key parameters used in various bioinformatics analyses of DNA sequences. It can be statistically calculated based on the frequencies of their occurrence in specific regions of the genome, such as exons and introns34. The real numbers used in the PAM scheme are not meant to represent the biological or chemical properties of the bases. Instead, they are meant to provide a convenient way to quantify differences between genomes. PAM has been utilized in comparative genomics, particularly in the analysis of native and synthetic enzymes35. It provides a quick and effective way to compare genomes, determine relatedness, and track genome evolution.Pulse Amplitude Modulation (PAM) is a computational method employed in genomics to compare genomic sequence similarity. It is used to compare two genome sequences and quantify their differences in mutations. The specific real numbers assigned to denote the bases, A = -1.5, G = -0.5, T = 1.5, and C = 0.5, are arbitrary and were chosen to represent the differences between the bases in a way that is easily computable7.The Fourier power spectrum, represents the power or energy distribution of a signal in the frequency domain. The periodic patterns or repeated motifs that are present in the sequence can be identified using the Fourier Power Spectrum. Due to a variety of aspects, including repeating elements, coding regions, or structural characteristics, DNA sequences can display specific patterns or periodicities. This is achieved by breaking down the sequences into overlapping substrings and calculating the Fourier spectrum for each base36. The mathematical equations for Chaos Game Representation of a DNA sequence can be defined as follows:Chaos Game Representation (CGR) is a graphical representation method used in genomics to visualize the structure of genomic sequences proposed by JefferyIn the CGR method, a DNA sequence is divided into overlapping triplets of nucleotides (codons), and the positions of the codons are plotted on a two-dimensional plane according to their corresponding amino acids. This allows the DNA sequence structure to be visualized as a pattern on the plane. Regions of the sequence that code for similar amino acids appear as clusters.37. The DFT coefficients provide information about the distribution of different frequencies in the sequence. They can be used to generate a spectrogram, which visualizes DNA sequence frequencies.The Discrete Fourier Transform (DFT) transforms signals from the time domain to the frequency domain and represents them as a sum of sinusoids of different frequencies. The DFT provides the coefficients of these sinusoids. In genome encoding, DFT can be employed to analyze and compare DNA sequences by transforming them from their original form into a frequency-based representation38. CgrDft is a hybrid method that uses Chaos Game Representation with Discrete Fourier Transform (CgrDft) to visualize DNA sequence structure by mapping them onto a two-dimensional plane12.DFT can also be used to detect motifs and patterns in DNA sequences by looking for peaks in the spectrogram that correspond to specific frequencies. This can provide insights into the underlying structure and functional regions of DNA sequences39. The sixteen dinucleotides are AA, AC, AG, AT, CA, CC, CG, CT, GA, GC, GG, GT, TA, TC, TG, and TT. Once the dinucleotides are mapped to the unit circle, neighboring nucleotides in the DNA sequence are encoded as points on a two-dimensional plot. It can also be used for machine learning applications such as predicting genomic features or classifying DNA sequences.Dinucleotide DNA encoding is a method of representing DNA sequences using a two-dimensional plot. In this method, sixteen different dinucleotides (two nucleotide pairs) are mapped to a unit circle, with each dinucleotide represented by a distinct position on the circle40. Each hexagram in the I Ching can be assigned its own four-digit binary code based on the arrangement of solid and broken lines. These binary codes represent the 64 codons. Codons are mapped to hexagrams whose binary codes correspond to their own binary representations. For example, the codon AUG, which codes for the amino acid methionine, can be expressed as 0100 in binary. This binary code corresponds to hexagram 23 in the I Ching composed of two solid lines at the bottom and third positions and four broken lines in the middle. Therefore, in this encoding scheme, AUG would be represented as hexagram 23.In gene sequence encoding, the 64 codons that make up the genetic code can be expressed through binary codes. To map these binary codes to the 64 codons, one approach is to use the I Ching42. Integer number encoding can be useful in DNA sequence analysis, as it allows for efficient storage and manipulation of large datasets. It also enables the use of mathematical operations and algorithms designed for working with integers43. However, it is imperative to use a consistent encoding scheme to ensure that different systems and programs can interpret the data correctly44.Integer number encoding is a method of representing data using integers instead of characters or symbols. In the context of DNA sequence encoding, integer number encoding involves mapping each nucleotide  to a corresponding integer value 45. One way to encode the distance between pairs of nucleotides that are a fixed length apart in the sequence is with a fixed distance of k46 i.e., i+k, i+2k,.., i+nk can be used to represent between nucelotides and S(i), S(i+k), can be encodes as k, k1 if the same nucelotides occur at each position. Inter-nucleotide distance encoding can be useful in some applications47, as it can reduce the dimensionality of the data and facilitate certain types of analysis. However, it may not be appropriate for all types of gene sequence analysis, as it discards some information about the specific nucleotides in the sequence48.In the inter-nucleotide encoding scheme the sequence is represented as a series of inter-nucleotide sequences rather than as a series of nucleotides themselves49. The entropy of a gene sequence can be calculated using the formula:Minimum entropy refers to the minimum amount of information needed to represent the sequence or the level of compression achieved for the sequence50. The DNA double helix structure is stable due to interactions between nucleotide bases. The base pairs A-T and G-C form hydrogen bonds that stabilize the double helix structure51. The enthalpy change of hydrogen bonding interactions between DNA strands can be calculated using thermodynamic principles. The enthalpy values of these interactions can be used to encode sequence information in a way that is more resistant to errors and mutations.Thermodynamic encoding of gene sequences is a method of encoding gene sequences based on enthalpy values. The idea is to use the thermodynamic stability of DNA’s double helix structure to encode sequence information in a way that is more robust to errors and noiseK-mer encoding simplifies long DNA sequences into smaller chunks. For example, sequence ATCGAT turned into pieces like AT, TC, CG, GA, and AT when K=2. These chunks serve as DNA fingerprints for various applications, such as database creation or genome assembly. The choice of K affects the trade-off between simplicity and complexity in the chunks. A smaller K yields more fragments that are simpler but may lack detail. A larger K gives fewer, more complex fragments that encapsulate more information about the original sequence.52. A repeat function then maps each nucleotide to its corresponding triplet identifier. However, triplet encoding also has limitations. For instance, the method relies on a predetermined list of 64 triplets, which may not be comprehensive enough to cover all possible DNA sequences. Moreover, it is not highly robust to errors or mutations. Even minor changes in the DNA sequence can significantly alter the resulting triplet identifiers, making the encoding less reliable compared to other schemes.Triplet encoding focuses on encoding DNA sequences using triplets of codons based on the genetic code’s 64 possible codons. Unlike K-mer encoding, where the value of K can vary, triplet encoding fixes K at 3, so that the sequence is always read three nucleotides at a time. For example, a DNA sequence like ATCGAT would yield non-overlapping triplets ATC and CGA. Each of the 64 possible codon triplets is assigned a unique identifier. These identifiers are then organized in a specific order, such as alphabetical or numerical order14. Therefore, while K-mer encoding is simple but limited in its applications, K-mer natural vector provides greater versatility.K-mer natural vectors represent a DNA or RNA sequence that quantifies the composition of k-mers (short contiguous substrings of length k) in the sequence. It is designed to overcome the deficiencies of previous k-mer models and provide a one-to-one mapping between a virus genome and its k-mer natural vector. This representation encodes the sequence into a high-dimensional vector, where each dimension corresponds to the frequency of each k-mer in the sequence53. Developed by Jeffrey Voss in the 1990s, it is a way to represent genomic sequence complexity using a simple binary code. A DNA sequence must first be broken up into individual nucleotides to be represented with the Voss representation. Following that, each nucleotide is assigned to the corresponding binary string. Concatenating the resulting binary strings creates a single, lengthy binary string that represents the whole DNA sequence. The Voss representation approach to encoding gene sequences has the benefit of being straightforward and user-friendly. Compact and effective binary codes can express lengthy and complex DNA sequences. It has certain drawbacks, though, namely its sensitivity to errors and mutations in the DNA sequence.Voss representation encodes gene sequences using a series of binary stringsThe similarity between encoded and non-encoded procedures is measured by distance metrics. A small difference between the encoded and non-encoded techniques suggests that they are similar, whereas a significant difference suggests that the encoded method does not capture the necessary characteristics of the non-encoded approach.A genetic sequence can be thought of as a multidimensional vector where a different position in the sequence is represented by a unique dimension. The following equation is used to compute the Euclidean distance54 is a popular metric for measuring evolutionary relationships and has been widely used in similar domains56.The equation calculates the square of the difference between each position in the two sequences. It sums these values, and then takes the square root of the result to get the final distance value. The Euclidean distance57 is a way to evaluate the accuracy of a phylogenetic tree in reconstructing evolutionary relationships between a set of taxa. A phylogenetic tree depicts the evolutionary history of a taxa and phylogentic inferences uses molecular or morphological data to reconstruct the branching pattern of such a tree.. The triplets metric evaluates the ability of a phylogenetic tree to correctly group three taxa together in a branching pattern based on their pairwise distances58.The triple metric60 metric is a popular method for comparing topological differences between two phylogenetic trees. The RF distance is based on the number of bipartitions present in one tree but not in the other. A bipartion divides a set of taxas into two groups such that are the taxa in one group are more similar to each other than any other taxas of the other group. The RF distance between tree A and tree B is the sum of bipartions present in tree A and not tree B, divided by two. Division by two is necessary to ensure RF distance is a metric. This means that it satisfies symmetry, non-negativity, and triangle inequality.The Robinson-Foulds61 is used to calculate the distance or similarity between two paired taxa in a phylogenetic tree. It can also be used to compare evolutionary relationships between two closely related taxas and to identify tree regions where different taxa groups are more related to each other.A matching pair metric62, the tree topology and branch lengths are estimated by minimizing the sum of weighted distances between the observed sequences and the reconstructed sequences at internal nodes of the tree. Each node’s weight is dependant on the number of sequences contained in it. The least squares method is employed to estimate branch lengths. In addition to be computionally efficient and scalable to massive datasets, it offers more accuracy than other distance based methods when number of sequences is large or with sequences with considerable evolutionary distances between them.In Nodal splitted weighted61 is a distance metric used in phylogenetic tree construction. MCD is based on pairwise distances between clusters of sequences rather than pairwise distances between individual sequences.Matching cluster distance63, or known as MAST is a distance metric used to compare phylogenetic trees, specifically the similarity between two trees. This metric measures the distance between two trees based on the size of their maximum agreement subtrees. A maximum agreement subtree is a subtree that appears in both trees and has the maximum number of nodes. The MAST distance is the difference between the total number of nodes in the two trees and twice the size of their maximum agreement subtree. In other words, it measures the number of nodes pruned from one tree to obtain the other.Maximum Agreement Subtree64 distance is a metric used to compare the cophenetic distance matrices of two trees.Cophenetic L265 metric is used in unrooted phylogenetic tree reconstruction to evaluate the similarity or dissimilarity between different trees. It is a distance metric that measures the difference between two trees based on the number of quartet trees they share. A quartet tree has four taxas and the branching pattern joins two taxa pairs. For instance a quartet tree with taxa W, X, Y, Z could have , ) or , ) branching patterns.. The quartet distance metric calculates the number of quartet trees shared between two trees.The quartet distance66 metric assesses the robustness of branches in a phylogenetic tree. This is done by calculating the path difference between the original tree and a reference tree with a particular branch removed. If the path difference is small, the branch is considered well-supported and robust, while a larger path difference indicates a less robust branch.The path differenceThe encoded methods are put to the test using various datasets belonging to viruses like SARS-CoV-2 and influenza, which include both short and long genomes. To evaluate and compare the different genomic data, moment vectors were computed on each method. These vectors represent the statistical properties of the sequence data and are used to compare the similarity between different sequences. A matrix was created showing the pairwise distances between these vectors, which was used to cluster the data into biological groups to construct phylogenetic trees. Further process involves comparing the encoded and non-encoded methods to determine their similarities. This is achieved by creating a normalised matrix for each method and using the Euclidean distance for comparison. Accordingly, this comparison enables understanding of how the encoded and non-encoded methods relate to each other and identifies any similarities between them.Figure Further analysis on the performance of encoded method shows more than 80% of the time, CgrDft and K-merNV methods have similarity with popular non-encoded methods ClustalW Fig. A,Clustal67 package for distance metrics tests on arbitrary non-binary phylogenetic trees generated by each encoded method. Here, the reference trees to which each encoded method tree is compared are generated by non-encoded methods. The marked points in Fig. To further validate these results, we applied the visual TreeCmpFigures  and MAFFT and ClustalOmega (implemented on NGphylogeny), we determine the K-merNV followed by CgrDft encoded methods are similar with the current state of the art-multi sequence alignment methods. To the best of our knowledge, this is a novel approach to incorporation and comparison for encoded methods. In the future, examining the behaviour of encoded methods when tested on other distance vectors, such as those generated using Kimura and Tamura models, might be of interest. Further, it would be interesting to see some advanced algorithms to improve these encoded methods. Another interesting avenue could be to compare alignment-based methods with the latest alignment-free methods to see which ones provide the most accurate results. It would also be insightful to explore the use of encoded methods in other areas of genomics research and compare their performance to existing methods in those domains. Furthermore, making these methods faster and more accurate could be a game-changer for getting important information more quickly.Supplementary Figures.


DCAlign is a new alignment method able to cope with the conservation and the co-evolution signals that characterize the columns of multiple sequence alignments of homologous sequences. However, the pre-processing steps required to align a candidate sequence are computationally demanding. We show in v1.0 how to dramatically reduce the overall computing time by including an empirical prior over an informative set of variables mirroring the presence of insertions and deletions.https://github.com/infernet-h2020/DCAlign.DCAlign v1.0 is implemented in Julia and it is fully available at  Bioinformatics is to cast evolutionary-related biological sequences into a multiple sequence alignment (MSA). The objective of this task is to identify and align conserved regions of the sequences by maximizing the similarity among the columns of the MSA. State-of-the-art alignment methods, like HMMER for proteins . Whereas for proteins, HMMER builds the Hidden Markov Model (HMM) by using only the seed alignment, Infernal needs also secondary structure information to generate a Covariance Model (CM). In both cases, HMM (for proteins) or CM (for RNAs) are used to align query sequences. However, homologous sequences show signals of correlated mutations (epistasis) undetected by profile models.A common task in proteins  and InfeInfernal  for RNAsDCAlign, returns the ordered sub-sequence of a query unaligned sequence which maximizes an objective function related to the DCA model of the seed. In this latter case, standard DCA models fail to adequately describe the statistics of insertions and gaps. To alleviate this limitation, we added to the objective function gap and insertion penalties learned from the seed alignment. While for the insertions, the computational complexity is negligible, inferring gap penalties is a time-consuming problem [see .Conservation and co-evolution signals are at the basis of Direct Coupling Analysis (DCA)-based statistical models  by alignN, and L (which is the length of the seed MSA). We only consider the i is a gap ‘-’ .Our alignment algorithm estimates the optimal ordered sub-sequence compatible with a DCA model and empirical knowledge of insertions and gaps of the seed. Let i (in red), we compute the j, the lighter the color, the larger is j. In Together with a DCA model of the aligned seed (see Z is a normalization factor, and i. The informed prior will guide the optimization process toward solutions that, among those that maximize the Boltzmann distribution associated with Z cannot be efficiently computed. Similarly to the first DCAlign version, we use an approximate message-passing algorithm coupled with an annealing scheme over We can express the alignment problem in terms of the following optimization problem: We can classify the type of tests performed to assess the performance of our computational strategy into three different categories:Comparison with the previous implementation: As in Leave-one-out experiment: As a stress test for DCAlign v1.0 we also compared our results to 25 ground-truth MSAs either extracted from benchmark sets (ark sets . HoweverDivergent sequence alignment: Finally, to assess our algorithm’s remote homology detection performance, we considered three RNA benchmark sets (the seed of Rfam RF00162 ( RF00162  from (Wi RF00162 . ResultsDCAlign, and probably to other computational strategies taking into account epistasis (From a computational efficiency point of view, the time needed to train the algorithm is significantly smaller than both our old implementation and CM-Infernal (see Supplementary text and pistasis .DCAlign v1.0 is a new implementation of the DCA-based alignment technique, DCAlign, which conversely to the first implementation, allows for a fast parametrization of the seed alignment. The new modeling significantly drops the pre-processing time and guarantees a qualitatively equivalent alignment of a set of target sequences.btad537_Supplementary_DataClick here for additional data file.


Double-stranded RNAs (dsRNAs) are potent triggers of innate immune responses upon recognition by cytosolic dsRNA sensor proteins. Identification of endogenous dsRNAs helps to better understand the dsRNAome and its relevance to innate immunity related to human diseases.in silico, leveraging the power of long-read RNA-sequencing (RNA-seq) and molecular traits of dsRNAs. Using models trained with PacBio long-read RNA-seq data derived from Alzheimer’s disease (AD) brain, we show that our approach is highly accurate in predicting dsRNA regions in multiple datasets. Applied to an AD cohort sequenced by the ENCODE consortium, we characterize the global dsRNA profile with potentially distinct expression patterns between AD and controls. Together, we show that dsRID provides an effective approach to capture global dsRNA profiles using long-read RNA-seq data.Here, we report dsRID (double-stranded RNA identifier), a machine-learning-based method to predict dsRNA regions https://github.com/gxiaolab/dsRID.Software implementation of dsRID, and genomic coordinates of regions predicted by dsRID in all samples are available at the GitHub repository:  Cytosolic double-stranded RNAs (dsRNAs), upon recognition by dsRNA sensor proteins, can trigger innate immune responses . AccumulIdentification of endogenous dsRNAs related to immunogenicity remains a major challenge. Since ADAR is a dsRNA-binding protein, A-to-I editing sites have been used as indicators of the existence of dsRNA regions. To this end, methods have been developed to leverage editing-enriched regions (EERs) to define endogenous dsRNA structures . This tyin-silico identification of dsRNA regions independent of editing with high accuracy. We applied this method to a few long-read RNA-seq data derived from Alzheimer’s disease (AD) and control samples, which predicted novel dsRNAs with low RNA editing levels.In this work, we developed a new approach, named double-stranded RNA Identifier (dsRID), to detect dsRNA regions in an editing-agnostic manner. This method is built upon a previous observation made by us and others that dsRNA structures may induce region-skipping in RNA-sequencing (RNA-seq) reads, an artifact likely reflecting intramolecular template switching in reverse transcription (https://www.pacb.com/connect/datasets/). Long-read RNA-seq data of GM12878 cells and nine samples of human mid-frontal cortex (AD or controls) were downloaded from the ENCODE project . Reads in the fastq files were aligned using minimap2 according to the ENCODE standard parameters with the additional—cs flag for downstream analysis  : The number of reads that contained internal skipping divided by the total number of reads mapped to the region.Len_skip (i.e. skipping length): Average length of skipped regions among reads with internal skipping. In the minimap2-generated bam file, the start and end of continuous cs tags indicating “∼”  were considered as the start and end sites of the skipped region. In alignments where the cs tag was not available, we used “N”s in the CIGAR strings as an indication of a skipped region. Following the determination of the start and end sites, we calculated their genomic distance in each read, and used the average value of this distance metric among all reads of a skipped region as the skipping length feature.Group_num (i.e. number of skipping groups): The number of distinct skipping groups. The start and end sites of skips were grouped together when the sites were within 100 bp of each other. We assigned all sites to a group so that the left most site and right most site in each group were <100 bp away from the median of the same group. If the numbers of groups for the start sites and end sites were different, we took their average as the overall number of skipping groups from both ends.Std_start, std_end: Standard deviation of the genomic coordinates corresponding to the start and end sites of skipped regions, respectively. For each skipping group identified above, we calculated the standard deviation of the start and end positions, respectively, across all reads. Standard deviations are then averaged across different skipping groups of each region.Gc_skip: Average GC content of the skipped region across all mapped reads of the region.Bp_start_*, bp_end_*: Occurrence frequency of two bases prior to and after each end of the skipped region, aiming to differentiate stochastic skipping from splicing that has specific splicing donor and acceptor sequences. All 16 di-nucleotides were tested for the start and end sites, respectively. Only the top five are shown in We used TPOT . The sciR2) using a held-out validation dataset. Next, for each feature, we permuted its feature vector and recomputed R2 in the validation set. The decrease in the recomputed R2 relative to the original R2 was defined as the contribution score of the feature. We used the python package scikit-learn to conduct this procedure , novel long dsRNAs were required to have a stem length of ≥200 bp with ≤20% mismatches and an adjusted MFE ≤ −0.35. Candidates that did not meet the above requirements were called structured RNAs.G nucleotides divided by the sum of the numbers of A and G nucleotides.To analyze A-to-I RNA editing levels for each region we identified, we used editing sites published in the REDIportal database . We trained the model on 13 469 positive regions and the same number of randomly selected negative regions. We carried out 20-fold cross-validation and observed an accuracy of 89% . Next, wWe carried out 20-fold cross-validation for each dataset using two different models, the model trained using the same dataset and the one derived from the PacBio AD data that had the largest sequencing depth. When trained with each respective dataset, the average cross-validation accuracy was 84.1%. In contrast, this accuracy was 88.3% using the PacBio AD-trained model for each dataset . The enhTo analyze how sequencing depth affects the performance of dsRID, we randomly subsampled the PacBio AD data  to mimic lower sequencing depth. We then trained the dsRID model using the subsampled datasets. As shown in We further evaluated the performance of our model on each dataset using receiver-operator curve (ROC) analysis and calculated the area under the curve (AUC). The average AUC across all datasets was 0.95 . In addiR2 value). This variance was then compared to that calculated by permuting each feature vector respectively. The reduction in R2 upon the permutation was defined as the contribution score of the corresponding feature. We observed that the skipping ratio had the highest contribution score (75.4%), followed by the length of skipping (15.9%) . We first computed the variance explained by the model ( (15.9%) . Specifi (15.9%) . This ob (15.9%) . Indeed,A total of 82 266 candidate dsRNA regions (not present in the positive set for training) were identified across all 11 datasets (PacBio AD and 10 ENCODE datasets). As shown in P < 2.2e-16). This observation indicates that there may exist more dsRNA structures in 5′-UTRs than appreciated previously, which may have regulatory impacts, such as translational regulation , novel dsRNAs most frequently overlapped with intronic regions compared to other regions. Interestingly, the novel dsRNAs were more enriched in 5′-UTRs relative to EER-based dsRNAs (P < 2.2e-16), likely due to the editing-independent identification enabled by dsRID. Notably, structured RNAs also had enrichment in repetitive sequences, supporting that such RNAs have repeat-generated structures. The structures of a few example novel long dsRNAs are shown in Furthermore, we analyzed the overlap of dsRNAs with different types of repetitive regions. As expected, most EER-based dsRNAs overlapped with SINE elements , reflectin vivo are more likely predicted as dsRNAs by our method. Nonetheless, compared to that of EER-based dsRNAs, the RNA editing index of novel dsRNAs is slightly lower  profiles were distinct between AD and controls. Among all candidate regions that were tested in both AD and control samples, 76.3% were identified as long dsRNAs in both groups, whereas 14.2% were specific to AD samples and 9.3% specific to controls. Proportion of AD-specific dsRNAs were significantly higher compared to control-specific dsRNAs  showed a bimodal distribution, similar to the distribution of exon inclusion levels of splicing. In addition, compared to EER-based dsRNAs, the random regions were significantly closer to or directly overlapped with spliced junctions. In contrast, the skipping length of EER-based dsRNAs is larger than that of random controls. For random controls, a region of 2500 nt in length was considered, which is shorter than typical introns in human genes. Based on the above observations, the set of random controls may be enriched with both alternatively spliced events with relatively short introns and other skipping events due to sequencing errors/genetic variants or other reasons.More than 73% of J2 fCLIP-captured regions were also included in dsRID (EER-based on novel predictions), supporting the effectiveness of our approach. Nonetheless, the immunogenic nature of dsRID-predicted dsRNAs need to be experimentally tested in the future. Many dsRNAs identified in our study are located in intronic regions that may not be exported into the cytoplasm, thus may not have any immunogenic effects through cytoplasmic sensors. Previous studies showed that immunogenic dsRNAs are generally depleted and under negative selection in a wide range of species (In this study, we focused on developing and applying dsRID using PacBio long-read sequencing data. In general, dsRID can be applied to data generated by other long-read sequencing technologies or short-read RNA-seq data, since the features used in the model can be derived from the other data types as well. However, the impact of different sequencing protocols and RT enzymes on the features and performance of the method should be investigated thoroughly.in silico. Our method featured novel dsRNA regions that are lowly edited and may be missed by EER-based approaches. Future studies highlighting long-read sequencing data in different contexts can be analyzed by dsRID to better understand the landscape of dsRNA, its regulation and function.Together, we showed that dsRID is an effective method to detect dsRNA regions btad649_Supplementary_DataClick here for additional data file.


Arabidopsis thaliana, by detecting sequence similarity between intron-flanking regions. We demonstrate that applying EASTR before transcript assembly substantially reduces false positive introns, exons, and transcripts, improving the overall accuracy of assembled transcripts. Additionally, we show that EASTR’s application to reference annotation databases can detect and correct likely cases of mis-annotated transcripts.Accurate alignment of transcribed RNA to reference genomes is a critical step in the analysis of gene expression, which in turn has broad applications in biomedical research and in the basic sciences. We reveal that widely used splice-aware aligners, such as STAR and HISAT2, can introduce erroneous spliced alignments between repeated sequences, leading to the inclusion of falsely spliced transcripts in RNA-seq experiments. In some cases, the ‘phantom’ introns resulting from these errors make their way into widely-used genome annotation databases. To address this issue, we present EASTR (Emending Alignments of Spliced Transcript Reads), a software tool that detects and removes falsely spliced alignments or transcripts from alignment and annotation files. EASTR improves the accuracy of spliced alignments across diverse species, including human, maize, and  The study reveals limitations in widely used RNA-seq aligners, which create 'phantom' introns in reference databases. The authors introduce EASTR, a computational tool that not only enhances alignment accuracy but also uncovers existing annotation errors. This improvement bolsters the dependability of subsequent RNA-seq analyses. Arabidopsis thaliana genome1, 53% of the human genome2, and 85% of the Zea mays genome3. Repeated elements frequently occur in close proximity; for example, Alu elements, a primate-specific transposable element (TE), appear in over a million copies in the human genome, with an average frequency of once every 3000 bases4. The close proximity of repeat elements complicates distinguishing spliced and contiguous alignments, particularly in tissues and organisms with high TE expression.RNA sequencing (RNA-seq) is a widely used method for quantifying gene expression and characterizing transcriptome diversity. However, repetitive sequences can in some circumstances induce splice-aware aligners, such as STAR and HISAT2, to create spurious introns spanning two nearby repeats. Repeat elements constitute a significant portion of many genomes, comprising 21% of the 5, RefSeq6, and GENCODE7.Repeat elements pose challenges not only due to their proximity but also due to their high degree of polymorphism. The variations among individuals and between loci can confound computational methods attempting to distinguish correct and incorrect spliced alignments. As we will show below, this can result in the inclusion of transcripts with spurious junctions in human gene catalogs such as CHESS8 addresses this by prioritizing spliced alignments over contiguous alignments if the spliced alignment has no mismatches compared to the contiguous alignment , a computation tool designed to address the issue of incorrect spliced alignment associated with repeated sequences. EASTR effectively detects and removes erroneous spliced alignments by examining the sequence similarity between the flanking upstream and downstream regions of an intron and the frequency of sequence occurrence in the reference genome. Our results indicate that EASTR substantially improves the quality of spliced alignments across a wide range of species, thereby enhancing the reliability of downstream analyses that rely on accurate spliced alignment, such as transcript assembly. In addition, our findings show that EASTR is effective at detecting inaccuracies in existing reference annotations.EASTR employs a multi-step strategy to identify and eliminate spurious splice junctions, focusing on the similarity of sequences flanking a given splice junction as well as the occurrence frequency of these sequences within the reference genome. The algorithm’s workflow is visually outlined in Fig. Alu elements. Rather than differentiating between these global and local origins of repetitive elements, EASTR categorizes alignments as either “two-anchor” or “one-anchor” as depicted in Fig. The similarity between flanking sequences can have multiple origins, from local elements like tandem repeats to more global features like 9, Zea mays (maize) leaves10 and pollen11, and Arabidopsis thaliana12. Our objective was to highlight the effectiveness of EASTR in enhancing alignment accuracy across a broad range of organisms and experimental designs.To demonstrate the versatility and applicability of EASTR, we applied it to three model organisms with distinct genomic repeat content and to samples with different library preparation methods. The organisms and tissues we selected were human brain13 to assemble transcripts from both HISAT214 and STAR15 alignments, as well as from the EASTR-filtered alignments. Our results described below demonstrate that filtering with EASTR prior to assembly improved both sensitivity and precision, and reduced the number of non-reference introns, exons, and transcripts, which are more likely to represent transcriptional noise16.To evaluate the impact of EASTR alignment filtering on downstream analyses, we assessed the accuracy of transcript assembly before and after filtering the alignments. We used StringTie2In addition to filtering alignment files, we also used EASTR to identify potentially erroneous transcripts in reference annotation databases for each of the selected model organisms. By examining the sequence similarity between the flanking upstream and downstream regions of introns, EASTR was able to detect transcripts in the annotation that may have been incorrectly annotated due to spliced alignment errors between repeat elements.9.We evaluated EASTR’s performance on paired RNA-seq datasets from developing and mature human dorsolateral prefrontal cortex (DLPFC). The datasets were obtained using both poly(A) selection and rRNA-depletion (ribo-minus) library preparation methods from cytoplasmic and nuclear fractions from three prenatal and three adult samplesFocusing initially on alignment accuracy, we applied EASTR to identify putative erroneous junctions in the alignment files of 23 DLPFC samples. Our analysis revealed that the vast majority of the alignments flagged for removal by EASTR corresponded to junctions that were not present in the RefSeq reference annotation. On average, EASTR removed 3.4%  and 2.7%  of all HISAT2 and STAR spliced alignments, respectively. Of the removed alignments, only 0.2%  in HISAT2 and 0.3%  in STAR supported 114 and 119 reference-matching junctions, respectively. EASTR marked these as erroneous in the RefSeq reference annotation, and this small subset is discussed in more detail later. Nearly all of the alignments targeted for removal by EASTR were at non-reference junctions: 99.8%  in HISAT2 and 99.7%  in STAR, corresponding to 138,111 and 75,273 non-reference junctions, respectively. This reduction in the number of non-reference junctions was consistent across all 23 samples. More details are provided in Supplementary Data Having demonstrated EASTR’s effectiveness in identifying spurious alignments, we further examined the influence of library preparation methods. We found that the ribo-minus library method had a higher proportion of spuriously spliced alignments compared to the poly(A) selection method. Of the 23 samples, 11 pairs were processed using both library selection methods. In ribo-minus samples, EASTR flagged 8.0%  and 6.4%  of HISAT2 and STAR alignments as erroneous, respectively, compared to only 1.0%  and 1.2%  in poly(A) samples. Furthermore, our findings suggest that the developmental stage may be a relevant factor to consider during alignment and downstream RNA-seq analysis. Comparing ribo-minus adult to ribo-minus neonatal samples revealed that, in general, prenatal samples had a higher rate of removed spliced alignments in comparison to adult samples . Identifying spurious splicing events within transcribed repetitive regions, such as human endogenous retroviruses (HERVs), presents a complex challenge due to the abundance of highly similar copies that frequently result in multiple alignments or spuriously spliced alignments. However, not all spliced alignments in these regions are erroneous, emphasizing the need for EASTR to carefully discern between valid and spurious splice sites. To assess EASTR’s robustness in differentiating between genuine and spurious junctions in this context, we used SpliceAITo assess the impact on transcript assembly, we utilized StringTie2 to assemble transcripts from both unfiltered and EASTR-filtered HISAT2 and STAR alignments. We compared the resulting transcript assemblies to the RefSeq human reference annotation and found that filtering with EASTR improved transcript assembly quality, as summarized in Table 18. EASTR detected 365 potentially spurious introns across 581 transcripts and 237 genes in RefSeq, 192 introns across 319 transcripts and 124 genes in CHESS, and 411 introns across 475 transcripts and 344 genes in GENCODE , CHESS (version 3.0), GENCODE (version 41), and MANE (version 1.0), CHESS , displays sequence homology between exons 125_1 and 126_1, as well as the “intronic” region between them, suggesting they form two halves of a repeated exon. A comparison of shortened exons 125_1 and 126_1 in transcript NM_001278267 with their full-length counterparts in exons 124_2 and 126_2 in transcript NM_001397211 supports this assertion. As a result, spliced alignments supporting exons 125_1 and 126_1 also align contiguously to exons 124_2 or 126_2. Additionally, a sharp drop in coverage of spliced alignments drops abruptly at the break in sequence homology between the two paralogous exons, further indicating inaccurately spliced alignments , EASTR identified a 54 bp intron that matches the periodicity of the VNTR region , coinciding with regions containing a variable number of tandem repeat (VNTR) polymorphisms. For example, the ion Fig. . Only 4 TCEANC gene transcript  containing an intron that appears erroneous , shortening it substantially . This analysis flagged 412 potentially spurious introns within 539 transcripts and 261 genes  were generated by knocking out all DNA methyltransferases , which play an important role in maintaining DNA methylation patterns and regulating gene expression, including the silencing of transposable elements (TEs)12. All datasets were generated using ribo-minus library preparation and consisted of three biological replicates for each condition. Our findings supported our hypothesis that the loss of DNA methylation leads to increased TE expression levels and a higher proportion of spurious spliced alignment events detected by EASTR.We evaluated EASTR’s performance on paired RNA-seq datasets from wild-type (WT) and DNA methylation-free mutant Z. mays analyses, we applied EASTR to the A. thaliana datasets to identify potentially erroneous spliced alignments. EASTR flagged between 0.1% to 1.4% of spliced alignments in the assembled A. thaliana RNA-seq data as erroneous  erroneous alignments in HISAT2 and 257,794/18,652,175 (1.4%) in STAR, compared to 0.1%  and 0.2%  for the wild-type data. EASTR flagged a higher number of non-reference junctions in the mddcc alignments  than in the wild-type alignments . These observations were consistent across all samples . Within the polyubiquitin family, which contains tandem repeats of 228 bp encoding a ubiquitin monomer, we identified annotation errors in UBQ4, UBQ10, UBQ11, and UBQ1424.Lastly, we applied EASTR to scrutinize the TAIR10.1 reference annotation for EASTR is a new computational tool that effectively identifies incorrect spliced alignments caused by repeat elements in RNA-seq datasets. By utilizing sequence similarity between the downstream and upstream sequences flanking a given splice junction, EASTR can identify and remove spuriously spliced alignments and also highlight potential errors in genome annotation, thereby improving the accuracy of downstream analyses that rely on alignment and annotation data.Z. mays, likely due to the different levels of TE expression in these two tissue types. Our findings underscore the importance of considering library preparation methods and tissue types when interpreting spliced alignment results and demonstrate EASTR’s broad applicability in improving the accuracy of RNA-seq data alignment.In this study, we analyzed RNA-seq data from three species representing different tissue types and library preparation methods. Our analysis revealed that spurious alignments can account for up to 20% of the spliced alignments in the datasets we examined. The ribo-minus library preparation method had a higher proportion of spurious junctions and alignments compared to poly(A) selection, possibly because it captures nascent transcripts containing intronic sequences, which are typically enriched for repeat elements. In some samples, as many as 99.97% of the alignments that EASTR flagged for removal were not found in the reference annotation, suggesting they were likely spurious. Additionally, we observed a stark contrast in spurious alignments of reads sequenced from germline and somatic tissues of Our experiments also show that pre-filtering RNA-seq alignment files with EASTR can improve the accuracy of transcriptome assembly. We observed an increase in transcript assembly precision and a reduction in the count of novel (non-annotated) exons, introns, and transcripts in all samples. As detailed in Supplementary Note Alu elements, an unlikely event requiring two consecutive exonization events  in either direction from the splice site. The exonic portion of each sequence is called an “exon overhang”. The upstream and downstream sequences, designated as the reference and query, respectively, are aligned to each other with mappy. If more than one good alignment is detected, EASTR selects the primary mappy alignment. The alignment is scored using a matrix that assigns 3 points for a match, 4 points penalty for a mismatch, 12 points penalty for opening a short gap, 32 points penalty for opening a long gap, 2 points penalty for extending a short gap, and 1 point penalty for extending a long gap. This scoring matrix is designed to be permissive in order to capture diverged homologous sequences, such as TE families, that may have sufficient homology to be erroneously splice-aligned due to stretches of exact matching bases. An analysis exploring the sensitivity of EASTR in detecting spurious splicing, by varying combinations of match score and overhang length, is detailed in Supplementary Note The input to EASTR is a set of alignments produced by a spliced aligner such as HISAT2 or STAR. For every intron identified in the input file, EASTR computes an alignment to discern similarity between an upstream “reference” sequence (centered on the 5’ splice site) and a downstream “query” sequence (centered on the 3’ splice site). EASTR utilizes the mappy Python wrapper of minimap2Classification of alignments as two- or one-anchor alignmentsEASTR examines the mappy alignment generated in step 1 (if present), and classifies it as either a “two-anchor alignment” or a “one-anchor alignment”  back to the reference genome. This step is essential for detecting repetitive sequences whose high occurrence increases the likelihood of them causing erroneously spliced alignments. To perform this alignment, we extract three 30 bp sequences: two from the center of the mappy alignment for the upstream and the downstream sequences and one hybrid sequence obtained by concatenating the 15 bp upstream of the 5’ splice site with the 15 bp downstream of 3’ splice site. Using bowtie2 with parameters “-k 10 --–end-to-end -D 20 -R 5 -L 20 -N 1 -i S,1,0.50” we map all three sequences back to the reference genome and count the number of times each aligns.Following the initial mappy alignment, EASTR uses bowtie2Evaluation of two-anchor alignmentsFor sequence pairs classified as two-anchor alignments, EASTR uses bowtie2 to further assess the uniqueness of the reference, query and hybrid sequences as described in step 3. If either the upstream or downstream alignment is unique and the hybrid sequence does not align elsewhere, the spliced alignment is deemed non-spurious. Conversely, if mappy finds an alignment and bowtie2 aligns both the reference and query sequences to more than one genomic location, EASTR marks the splice junction as spurious.Evaluation of one-anchor alignmentsIdentifying duplicated exons:EASTR initially determines whether an alignment corresponds to a duplicated exon, which is not considered a spurious spliced alignment. In these cases, the alignment between the query and the reference sequences is primarily confined to exonic regions flanking the splice sites, leading to a shifted alignment of the query and reference sequences Fig. . EASTR eIdentifying spurious one-anchor alignments:If the alignment does not meet the criteria for a duplicated exon, EASTR examines whether the upstream and downstream partially aligned sequences appear more than 10 times in the reference genome. If this is the case, the partial alignment is deemed spurious.One-anchor alignment between the reference and query flanking sequences could suggest a spurious spliced alignment. For instance, such cases can occur when there is sequence similarity between the 5’ ends of the reference and query sequences, but not between the 3’ ends , and reference annotations (GTF files). Details on the runtime and memory requirements for different input options can be found in Supplementary Note GCF_000001405.39) after excluding pseudoautosomal regions and alternative scaffolds. The accuracy of the human transcriptome assemblies generated using StringTie2, as well as the non-reference and reference junction counts, were evaluated by comparing them to the GRCh38.p8 release of the RefSeq annotation, filtered to include only full-length protein-coding and long non-coding RNA transcripts. The filtered RefSeq annotation can be downloaded from the following FTP link: ftp://ftp.ccb.jhu.edu/pub/EASTR. A. thaliana reads were aligned to TAIR10.1 (RefSeq accession GCF_000001735.4), and the accuracy of the transcriptome assemblies and junction counts were assessed by comparing them to the corresponding annotation27. Z. mays reads were aligned to the B73 NAM 5.0 assembly (RefSeq accession GCF_902167145.1) and the accuracies of the transcriptome assembly and junction counts were evaluated by comparing them to the corresponding NAM 5.0 Zm00001eb.1 annotation obtained from MaizeGDB22 [https://www.maizegdb.org/]. The transposon annotation for Z. Mays was also retrieved from MaizeGDB [https://www.maizegdb.org/].Human reads were aligned to the GRCh38 genome assembly 28.A HISAT2 index was built using the following command: hisat2-build -p 16 –-exon genome.exon –-ss genome.ss genome.fa hisat_index. All RNA-seq datasets were aligned using HISAT2 with default parameters using the following command: hisat2 -x hisat_index −1 R1.fastq −2 R2.fastq -S aligned.sam. For A STAR index was built using: STAR –-runThreadN 12 –-runMode genomeGenerate –-genomeDir star_index –-genomeFastaFiles genome.fa –-sjdbOverhang [read_length-1] –-sjdbGTFfile reference.gtf. RNA-seq datasets were aligned and sorted by STAR using the following command: STAR –-runThreadN 12 –-genomeDir star_index –-readFilesIn R1.fastq R2.fastq –-outSAMstrandField intronMotif –-twopassMode Basic –-outSAMtype BAM SortedByCoordinate –-limitBAMsortRAM 16000000000 –-outSAMunmapped Within–-outFileNamePrefix sampleID.Transcriptome assembly was performed using StringTie2 (version 2.0), utilizing HISAT2 (version 2.2.1) and STAR (version 2.7.8a_2021-03-08) alignments, with the following command: stringtie2 aligned.bam -o sample.gtf.29 to count TP, FN, and FP as well as to profile the sensitivity and precision at the exon, intron, and transcript levels.Sensitivity was quantified as the ratio of true positives (TP) to the sum of true positive and false negative (FN) exons, introns, or transcripts that match the reference annotation. Precision was quantified as the ratio of TP to the sum of TP and false positives (FP). True positives were defined as exons, introns, transcripts, or loci that match the reference annotation, and false negatives as exons, introns, transcripts, or loci in the annotation that were missing from the assembly. We used gffcomparexi represents the count of introns, exons, or transcripts before applying EASTR to alignment files and xf represents the count after assembly using EASTR-filtered alignments. We employed the same percent change metric to evaluate the relative changes in transcript-level precision and sensitivity.To assess the impact of EASTR on the number of novel (non-annotated) and reference-matching introns, exons, and transcripts in each StringTie2 assembly, we calculated the percent change using the formula:Further information on research design is available in the Supplementary InformationPeer Review FileDescription of Additional Supplementary FilesSupplementary Data 1-17Reporting Summary


Biotite is a program library for sequence and structural bioinformatics written for the Python programming language. It implements widely used computational methods into a consistent and accessible package. This allows for easy combination of various data analysis, modeling and simulation methods.This article presents major functionalities introduced into Biotite since its original publication. The fields of application are shown using concrete examples. We show that the computational performance of Biotite for bioinformatics tasks is comparable to individual, special purpose software systems specifically developed for the respective single task.The results show that Biotite can be used as program library to either answer specific bioinformatics questions and simultaneously allow the user to write entire, self-contained software applications with sufficient performance for general application.The online version contains supplementary material available at 10.1186/s12859-023-05345-6. Python is a general purpose programming language that is popular for its easy usage and rapid development. However that ease of usage comes at the cost of computational speed: Due to Python’s code interpretation at runtime and its convenient features such as dynamic typing and garbage collection, the execution requires significant overhead compared to most compiled programming languages.C using a pythonic foreign-language interface. This feature has been harnessed by the Numerical Python (NumPy) package [n-dimensional arrays, or ndarrays in short, to store numerical data. Numerical operations on an ndarray are vectorized, i.e. they are applied to each of the array’s elements using underlying extension modules, which renders the computation speed on large datasets orders of magnitude faster than in pure Python.One way of mitigation is to run code written in  package , which iPython with these fast vectorized numerical operations has lead to an increasing attention by various areas of science: Today the Python scientific computing ecosystem comprises program librariesThe combination of the advantages of Biotite (https://www.biotite-python.org/) aims to fill this role for the realm of computational molecular biology. It provides editing and analysis tools for sequences and 3D molecular models. In contrast to other comparable bioinformatics libraries like Biopython [NumPy, Biotite integrates NumPy arrays directly into its data model for sequences and structures. The vectorization substantially accelerates operations like geometric measurements on structure models or DNA sequence translation into protein. Where vectorization with NumPy is not applicable, Biotite employs extension modules written in Cython [NumPy, handling objects in Biotite is intuitive: filtering for particular atoms in a structure or regions in a sequence accepts the same indexing semantics as NumPy and functions return ndarrays for pure numerical values.The open-source package iopython , which on Cython  to speedBiotite [Since its initial publication of Biotite , a multiBiotite comprises four subpackages: biotite.database contains functions to search in and fetch data from RCSB PDB [NCBI Entrez [UniProt KB [Biotite with analysis of external software biotite.application provides seamless interfaces to programs like Clustal Omega [DSSP [RCSB PDB , NCBI EnI Entrez  and UniPiProt KB  via theial Omega  or DSSP ga [DSSP .Biotite project follows the paradigm, that only established methods in computational molecular biology are implemented in Biotite. Functionality that is tailored for rather uncommon tasks, uses novel algorithms or requires additional dependencies is therefore released as an extension package. The functionalities in these packages integrate tightly with the data model used by Biotite, but are developed and distributed independently.The Biotite uses ndarrays to store data where possible. Hence, a Sequence object internally uses an ndarray to store its symbols. Although in the biological context the set of allowed symbols in the sequence, the alphabet, comprises typically ASCII characters representing nucleobases or amino acids, Biotite defines sequences in a broader sense, by allowing any object to be part of an alphabet. To make this decision compatible with the numerical nature of ndarrays, Biotite harnesses the fact, that most alphabets are relatively short: Each symbol is translated into a unambiguous integer, its symbol code, based on the position in the underlying alphabet. For example in the alphabet A would be translated into 0, C into 1, etc. This approach yields performance advantages in accessing substitution matrices and indexing k-mers. The symbol codes for each symbol in a sequence are stored in an internal ndarray of the Sequence.As already outlined, Biotite fulfill this purpose. They store the Sequence objects corresponding to the aligned sequences and a trace: a 2-dimensional ndarray, where each row contains the respective sequence positions in the alignment column.A sequence alignment depicts which positions in one sequence correspond to positions in one or multiple other sequences. Alignment objects in NumPy. Thus Biotite implements a structure model as collection of ndarrays, wrapped by an AtomArray object. An AtomArray contains an n atoms and one n-dimensional array for each annotation. For multi-model structures, such as NMR models or trajectories from molecular dynamics simulations, an AtomArrayStack can be used, where the coordinates are m models.Macromolecular structures can be thought of as a list of atoms, where each atom is defined by its position and further annotations, like its name, its element, the residue it is part of, etc. The straightforward solution to represent structure data as such a list would impede proper vectorization with BLAST [k-mer based alignment searches became the prevalent method for rapid identification of homologs in a sequence database. In modern software such as DIAMOND [MMseqs2 [Biotite maps these stages to separate functions and objects, forming a modular toolkit for alignment searches: The user can choose between different alternatives of methods for each stage, and can optionally introduce a custom implementation for parts of the alignment search.With the release of BLAST , k-mer b DIAMOND  or MMseq[MMseqs2 , alignmek-mers of each sequence in a database, i.e. all contiguous subsequences of length k are indexed into a table that maps each k-mer to the sequence positions where it appears. For this purpose Biotite provides the KmerTable class, which uses an internal ndarray of C-arrays for mapping k-mers to positions.In the beginning of a typical workflow, the k-mer is unambiguously mapped into a code q is the length of the sequence alphabet. This mapping is performed for each k-mer in a sequence, resulting in another sequence containing the values for d. Spaced k-mers including ‘don’t care’ positions [ndarray counts the number of occurrences of each possible d, resulting in ndarray replaces each count with a pointer to a new C-array containing the sequence positions. As the size of each C-array is known from the first pass, time consuming array resizing is prevented. In addition, the ability of a KmerTable to be combined from multiple KmerTable instances and to be serialized, makes the class suitable for multiprocessing on multiple cores.Each ositions  can be uositions : In the tantan program [To prevent the appearance of spurious homologies, low-complexity regions can be masked in the KmerTable creation. Low-complexity regions are typically identified using the  program , interfak-mer positions between the database and the query sequence are found by lookup in the KmerTable. The result is a ndarray containing the n matches as tuple of query sequence position, database sequence id and database sequence position. To find matches of similar k-mers instead of strictly equal ones, a substitution score threshold can be given to relax the matching condition [ndarray of matches may be subjected to further custom filtering, such as a two-hit strategy [In the first stage of an alignment search, matching ondition . The ndastrategy , before k-mer matching is usually followed by an ungapped alignment stage and finally a gapped alignment stage, where each remaining match position is used as alignment seed. Local ungapped seed extensions [Biotite now also offers the X-drop [The fast tensions  are perftensions , 19  programs interfaced in the application subpackage [Unix-based operating systems. As alternative Biotite offers the align_multiple function, that implements the simple original progressive alignment algorithm [Although the bpackage , 24, 25 lgorithm  to alignNewick notation. Besides UPGMA which is available as upgma function, Biotite provides the neighbor-joining method [The progressive alignment procedure requires a guide tree, that determines in which order the sequences are aligned. By default, the guide tree is created using the UPGMA hierarchical clustering method from pairwise sequence distances . Howeverg method  , a Position Probability Matrix (PPM) or a Probability Weight Matrix (PWM) [C of each symbol S in the used alphabet is stored. In a PPM, the probability P of each S in the PFM is calculated for each position ask the number of symbols in the alphabet. In a PWM, for each position a log-odds score W is assigned to every symbol withB denotes background frequencies.In the literature, there are a lot of ambiguous terms describing the same matrices used: a sequence profile can be either represented as a ix (PWM) . In a PFndarray, where n is the sequence length of the aligned sequences and k is the number of symbols in the alphabet. It also saves the number of gaps at each position in an ndarray with length n. The PFM, the gaps and the alphabet used in a SequenceProfile object are directly accessible attributes of the class. from_alignment can be used to create a SequenceProfile object from an indefinite number of aligned sequences.The SequenceProfile class stores information about a sequence profile of aligned sequences. This class saves a PFM of the occurrences of each alphabet symbol at each position using a The method to_consensus gives the consensus sequence of a SequenceProfile object. In case there is more than one symbol with maximum occurrences in a profile position, nucleotide sequence profiles use IUPAC ambiguity symbols. For other sequence types, the first symbol with maximum count in the alphabet is chosen.W of the respective symbol over all sequence positions.probability_matrix gives the PPM of the profile with optional pseudocount. This is used for sequence_probability and sequence_score. With the first method, the sequence probability can be calculated. The sequence probability is the product of the probability of the respective symbol over all sequence positions. With the second one the score for a sequence can be calculated: The score is the sum of weights ndarray that represents the vectors of the unit cell or, in the context of an molecular dynamics simulation, the simulation box. For an AtomArrayStack the box accommodates a ndarray, since each model may have a different box. The box is automatically read from structure file, if available, and can be used for geometric measurements, that take periodic boundary conditions into account. Furthermore, a number of box-related functions is available, for example to reassemble chains separated by periodic boundaries (remove_pbc) or to add periodic copies to the structure (repeat_box).AtomArray objects have a box attribute, a PDBx/mmCIF files provide instructions, how the coordinates of molecular chains need to be copied and transformed, to obtain a certain macromolecular assembly. This information can be read from PDBx/mmCIF format by get_assembly, returning an AtomArray representing the respective assembly.Macromolecular assemblies represent the putative functional form of a protein (complex). However, the atom coordinates in structure files from for example the PDB are related to the experiment: For instance, in X-ray crystal structures the coordinates describe the asymmetric unit of the protein crystal, but not necessarily the active conformation of a complex. Biotite’s capabilities with the computation of partial charges of various molecule classes, ranging from biological macromolecules such as proteins and nucleic acids to small molecules such as ligands. The function represents an implementation of the Partial Equalization of Orbital Electronegativity (PEOE) algorithm [The introduction of the partial_charges command extended lgorithm . Partiallgorithm , to achiBiotite focused on macromolecular structures, the support for small molecules improved in recent releases. With the MOLFile class, small molecule structures can be read from MOL as well as SDF files [chemical components dictionary (CCD) [Biotite provides an interface to AutoDock Vina [Biotite does not require an additional installation of AutoDockTools [Vina and to parse its output.While previously DF files . Using iry (CCD) , an Atomock Vina  (VinaAppockTools  to prepaPDB and MMTF [AtomArray and AtomArrayStack objects are able to store atom connectivity including the bond order. Bonding information can be read from and MMTF  files. Aand MMTF . HoweverHydrogen bond detection (hbond) employs the Baker-Hubbard algorithm . Possiblentclass1pt{minimaThe algorithm returns a Biotite contains a broad range of methods for nucleic acid secondary structure analysis which generally support canonical as well as non-canonical bases and base pairings.PDB atom names and mapped to the canonical base with the lowest RMSD. Bases are only mapped if the given PDB residue name is classified as a DNA/RNA polymer according to the CCD, there is a match of at least three atom names, and the RMSD is below a threshold of 0.28 Å, recommended in the literature [RMSD threshold are customizable.Mapping of non-canonical to canonical bases allows for approximation of geometric information by superimposition of canonical structural features. For this purpose the function map_nucleotide is introduced to the structure subpackage. Bases are superimposed based on matching terature . Given aThe function base_stacking allows for the detection of aromatic base stacking according to the following criteria : StackinDSSR criteria [Sarcin-Rycin loop of E. coli (PDB 6ZYB [The function base_pairs detects base pairs according to the criteria . A base criteria  is \docuPDB 6ZYB ) is showBoth base_stacking and base_pairs take the structure to be analyzed (an AtomArray) as input. base_pairs also allows constraining interactions such that each base is only paired to one other base, preferring pairings with a higher number of hydrogen bonds. Both functions return a The dot-bracket-letter notation  describetRNA mimic from the turnip yellow mosaic virus  visualiet al. [The Leontis-Westhof Nomenclature  distinguet al. .RNAfold, RNAalifold and RNAplot of the ViennaRNA package [RNAfold or for a given alignment using RNAalifold, respectively. Likewise, the RNAplotApp class can be used to generate coordinates for a 2D plot of a given secondary structure.Furthermore, the application subpackage was extended with interfaces to the programs  package . The RNARNAplot to create highly customizable two dimensional plots from a given sequence and corresponding base pair matrix. Figure plot_nucleotide_secondary_structure takes advantage of the interface to Springcraft (https://springcraft.biotite-python.org/) is the dedicated Biotite extension for normal mode analysis (NMA) with coarse-grained elastic network models (ENMs) of proteins. In ENMs, amino acid residues are abstracted as nodes, which are commonly assigned to positions of C springs –51. They springs  as well  springs –55.Springcraft [Both gaussian network models (GNMs) and anisotropic network models (ANMs) are implemented in ingcraft , 56. A vM, eANM) –60. ForcM, eANM) .With an AtomArray and a ForceField object as input for the GNM/ANM classes, NMA is conducted with separate instance methods: It is possible to compute the covariance matrices, eigenvectors and commonly derived quantities, such as residue displacements, fluctuations for a given mode or dynamical cross-correlations between residues. Another method of the ANM class allows the prediction of structural changes in proteins upon ligand binding by applying linear response theory .PyMOL software suite [Ammolite extension package (https://ammolite.biotite-python.org/). The structure migration uses the Python API of PyMOL, eliminating the need of intermediate structure files and the associated potential loss of information. For each transferred AtomArray, Ammolite creates a PyMOLObject that links the AtomArray to the newly created PyMOL object. Commands, like coloring atoms and changing representations, can be called from this PyMOLObject with the benefit, that NumPy based atom selections can be used as alternative to string-based PyMOL selection algebra. Finally, Ammolite provides convenience functions to create compiled graphics objects, facilitating the addition of 3D shapes, such as balls and cylinders, into molecular visualizations.To create publication-ready molecular visualizations AtomArray objects can be transferred to the popular re suite  with theGecos (https://gecos.biotite-python.org/) [Further extension packages have been published in recent years: on.org/)  is a sofHydride (https://hydride.biotite-python.org/) [on.org/)  is a pachttps://github.com/biotite-dev/article-notebooks. Alternatively, the raw Python source code is available in Additional file Biotite functionalities can be viewed in the example gallery on the Biotite documentation website.For demonstration purposes we applied a selection of the methods described above for the sequence and structure analysis of human hemoglobin. The corresponding source code is found as Jupyter notebooks in Additional file Swiss-Prot dataset from UniProtKB [To exemplify the usage of modular alignment search toolkit, we created a workflow to find homologs of the human hemoglobin UniProt accessions and gene names were extracted. Sequences that belong to uncharacterized proteins or have viral origin were excluded. Furthermore the human k-mer based alignment search was conducted. The spaced 6-mers of the Swiss-Prot sequences were indexed into a KmerTable. Repeat masking was omitted, to decrease the computation time for the sake of easy and fast reproducibility on commodity hardware. The spacing pattern was adapted from MMseqs2 [BLOSUM62 [Swiss-Prot sequences with at least two matches on the same diagonal were considered in the downstream alignment search stages.First the dataset was downloaded as FASTA file and its sequences along with the corresponding  MMseqs2 . Then maBLOSUM62  was usedBLOSUM62 : Only SwX-drop [BLOSUM62 was used as substitution matrix and the gap penalty was taken from the MMseqs2 default. The gapped alignments were sorted by their E-value, computed using an EValueEstimator and reported . The structure model was fetched from the PDB in . The strSpringcraft. For this purpose the CThe normal modes of the tetramer were analyzed by means of an ANM using  (sdENM)  were useAutoDock Vina [Next, molecular docking with ock Vina  was usedAutoDock Vina. Since the correct binding mode is known, the suggested poses were assessed in terms of the root-mean-square deviation (RMSD) between the respective pose and the binding mode from the crystal structure . The Snakemake [In order to assess the performance, different tasks were chosen and computed with both, nakemake  workflowBiotite and its extension packages exhibit a computational performance on a similar time scale as dedicated popular software for the respective task. Solely the MSA computation is an order of magnitude slower than via Clustal W [Biotite focuses on seamlessly interfacing to them and only provides a simple fallback solution for cases where the use of such software is not applicable.Note that in case of alignment search, MSA computation and hydrogen prediction, the compared implementations use different methods for the same problem and hence comparability is limited in terms of computation time and output of the software. Still, the benchmarks show that lustal W . Since, MMseqs2 and Gromacs for alignment search and hydrogen bond identification, respectively.An advantage of a program library compared to standalone programs in terms of performance becomes evident in cases were the workflow comprises multiple methods with little run time. Chaining multiple programs for such a workflow requires file input and output at the start and end of each program. In addition to the system-dependent read/write operation time the internal data representation needs to be converted into the respective file format and back again, which can take a notable portion of run time, if the remaining task is relatively fast. In contrast, when using a program library, the data can be kept in memory for multiple workflow steps. The additional file input and output operations may be a reason for the slower computation time of Biotite’s flexibility can be harnessed to tackle a wide range of problems, without the need to write ‘glue’ code for communication between different programs. For most tasks the implementation in Biotite performs similar or is even faster than dedicated software.Biotite offers a modern alternative to apply such methods to current biological questions, that can be easily installed using the pip and Conda package managers.For some of the implemented methods, the implementation of the original publication is not (freely) available anymore, installation is cumbersome on modern architecture and operating systems, or the method description was purely theoretic. Here Project name: Biotite. Project home page:http://www.biotite-python.org/. Operating system(s): Windows, OS X, Linux. Programming language: Python. Other requirements: At least Python 3.8 and the packages requests, numpy, msgpack and networkx need to be installed. For plotting purposes matplotlib and for molecular visualization PyMOL is additionally required. License: BSD 3-Clause. Any restrictions to use by non-academics: NoneAdditional file 1. Application example Juypter notebooks.Additional file 2. Application example Python scripts.Additional file 3. Benchmark workflow.Additional file 4. Supplementary benchmarks.