Abstract : We have developed SortMeRNA, a software designed to filter ribosomal reads from metatranscriptomic or metagenomic data. It is capable of handling large data sets and sorting out all fragments matching to a database of annotated ribosomal RNA sequences from the three-domain system with high sensitivity and a low running time. We propose a new version, SortMeRNA2, with extended functionalities for improved data analysis. Most importantly, it can now perform sequence alignments to any ribosomal RNA database, which allows the user to study the taxonomic content of a microbial sample. For that, we have developed an alignment strategy based on approximate seeds and seed extension using a variant of the Longest Increasing Subsequence. SortMeRNA2 also applies statistical analysis to evaluate the significance of an alignment, based on the E-value, which confers a great accuracy to the program.