Sequence alignment data is often ordered by coordinate (id of the reference sequence plus position on the sequence where the fragment was mapped) when stored in BAM files, as this simplifies the extraction of variants between the mapped data and the reference or of variants within the mapped data. In this order paired reads are usually separated in the file, which complicates some other applications like duplicate marking or conversion to the FastQ format which require to access the full information of the pairs. In this paper we introduce biobambam, a set of tools based on the efficient collation of alignments in BAM files by read name. The employed collation algorithm avoids time and space consuming sorting of alignments by read name where this is possible without using more than a specified amount of main memory. Using this algorithm tasks like duplicate marking in BAM files and conversion of BAM files to the FastQ format can be performed very efficiently with limited resources. We also make the collation algorithm available in the form of an API for other projects. This API is part of the libmaus package. In comparison with previous approaches to problems involving the collation of alignments by read name like the BAM to FastQ or duplication marking utilities our approach can often perform an equivalent task more efficiently in terms of the required main memory and run-time. Our BAM to FastQ conversion is faster than all widely known alternatives including Picard and bamUtil. Our duplicate marking is about as fast as the closest competitor bamUtil for small data sets and faster than all known alternatives on large and complex data sets.
B. Heckmann, I. Stengel, A. Phippen, und G. Turetschek. ESM'2009 The 2009 European Simulation and Modelling Conference, Seite 175--180. Leicester, United Kingdom, EUROSIS-ETI, (Oktober 2009)
B. Heckmann, G. Turetschek, und A. Phippen. Proceedings of the Fourth Collaborative Research Symposium on Security, E-learning, Internet and Networking, Seite 155--165. Wrexham, UK, (2008)
B. Heckmann. Proceedings of the Third Collaborative Research Symposium on Security, E-Learning, Internet and Networking, Seite 185--198. Plymouth, UK, Lulu.com, (Juni 2007)
A. Felfernig, M. Mairitsch, M. Mandl, M. Schubert, und E. Teppan. Proceedings of the 22nd International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems: Next-Generation Applied Intelligence, Seite 162--171. Berlin, Heidelberg, Springer-Verlag, (2009)