<p>The obvious answer is that different people wrote them. It's fairly common in bioinformatics for people with a computer science background to get frustrated with existing tools and create their own alternative tool (rather than improving an existing tool). Over time, tools with similar initial aims will have popular functionality implemented in them (and eventually have bugs fixed), such that it matters less which particular tool is used for common methods.</p>

<p>Here's my impression of the tools:</p>

<ol>
<li><p><a href="https://github.com/samtools/" rel="noreferrer">samtools</a> -- originally written by Heng Li (who also wrote BWA). The people who now work on samtools also maintain the alignment file format specification for <a href="https://samtools.github.io/hts-specs/SAMv1.pdf" rel="noreferrer">SAM, BAM, and CRAM</a>, so any new file format features are likely to be implemented in samtools first.</p></li>
<li><p><a href="https://github.com/pezmaster31/bamtools" rel="noreferrer">bamtools</a> -- this looks like it was written by Derek Barnett, Erik Garrison, Gabor Marth, Michael Stromberg to mirror the samtools toolkit, but using C++ instead of C</p></li>
<li><p><a href="http://broadinstitute.github.io/picard/" rel="noreferrer">picard</a> -- Java tools written by the Broad Institute for manipulating BAM/SAM files. Being written in Java makes it easier to port to other operating systems, so it may work better on Windows systems. I'm more familiar with picard being used at a filtering level (e.g. removing PCR duplicates), and for statistical analysis, but it links in with the Java HTS library from samtools, so probably shares a lot of the functionality.</p></li>
<li><p><a href="https://github.com/lomereiter/sambamba" rel="noreferrer">sambamba</a> -- a GPL2-licensed toolkit written in the D programming language (presumably by Artem Tarasov and Pjotr Prins). I haven't used it (and don't know people who have used it), but the github page suggests "For almost 5 years the main advantage over samtools was parallelized BAM reading. Finally in March 2017 samtools 1.4 was released, reaching parity on this."</p></li>
<li><p><a href="https://github.com/gt1/biobambam2" rel="noreferrer">biobambam</a> -- written by German Tischler in C++. I also have no experience with this toolkit. This seems to have some multithreading capability, but is otherwise similar to other toolkits.</p></li>
</ol>

CC BY-SA 3.0
2018-02-20T18:59:41.657Z
A comparison of sorting speed between SAMtools (version 1.2) and sambamba (version 0.6.3) [here](https://www.basepairtech.com/blog/sorting-bam-files-samtools-vs-sambamba/).
user5359531
CC BY-SA 3.0
2018-02-20T19:01:38.203Z
In light of older versions of Samtools being slower than Sambamba, sometimes you also have to consider the needs of the overall pipeline. For example, some older software requires old versions of Samtools to run, which may make it hard to gain the speed advantages from newer Samtools and lead to choosing to use a different program entirely instead of having to support different versions of the same tool in your pipeline.
user5359531
CC BY-SA 3.0
2017-06-03T01:50:55.283Z
2017-06-03T01:50:55.283Z
gringer
<p>After some google searches, I found multiple tools with overlapping functionality for viewing, merging, pileuping, etc. I have not got time to try these tools, so will just see if anyone already know the answer: what is the difference between them? Performance? Features? Or something else? Which one is generally preferred? Samtools?</p>

CC BY-SA 3.0
2017-06-03T01:53:46.800Z
This question is likely to inspire an opinionated debate about the merits (or otherwise) of different tools, which is discouraged on StackExchange. It would be helpful if a single question were asked, preferably one that tries to stay away from people's preferences.
gringer
CC BY-SA 3.0
2017-06-03T11:40:51.777Z
In the "something else" you could add the quality of the documentation, which may be an important factor coming into play when deciding which tool to adopt.
bli
<phylogenetics><sam>
What is the difference between samtools, bamtools, picard, sambamba and biobambam?
# What is the difference between samtools, bamtools, picard, sambamba and biobambam?

(Asked by: username_0 on 2017-06-02)

After some google searches, I found multiple tools with overlapping functionality for viewing, merging, pileuping, etc. I have not got time to try these tools, so will just see if anyone already know the answer: what is the difference between them? Performance? Features? Or something else? Which one is generally preferred? Samtools?

**Tags:** phylogenetics, sam
> **Comments:**
> **username_1**: This question is likely to inspire an opinionated debate about the merits (or otherwise) of different tools, which is discouraged on StackExchange. It would be helpful if a single question were asked, preferably one that tries to stay away from people's preferences.  
> **username_2**: In the "something else" you could add the quality of the documentation, which may be an important factor coming into play when deciding which tool to adopt.  

---

## 1 answers

### Answer by username_1 on 2017-06-03. Score: 17

The obvious answer is that different people wrote them. It's fairly common in bioinformatics for people with a computer science background to get frustrated with existing tools and create their own alternative tool (rather than improving an existing tool). Over time, tools with similar initial aims will have popular functionality implemented in them (and eventually have bugs fixed), such that it matters less which particular tool is used for common methods.

Here's my impression of the tools:

1. [samtools](https://github.com/samtools/) -- originally written by Heng Li (who also wrote BWA). The people who now work on samtools also maintain the alignment file format specification for [SAM, BAM, and CRAM](https://samtools.github.io/hts-specs/SAMv1.pdf), so any new file format features are likely to be implemented in samtools first.
2. [bamtools](https://github.com/pezmaster31/bamtools) -- this looks like it was written by Derek Barnett, Erik Garrison, Gabor Marth, Michael Stromberg to mirror the samtools toolkit, but using C++ instead of C
3. [picard](http://broadinstitute.github.io/picard/) -- Java tools written by the Broad Institute for manipulating BAM/SAM files. Being written in Java makes it easier to port to other operating systems, so it may work better on Windows systems. I'm more familiar with picard being used at a filtering level (e.g. removing PCR duplicates), and for statistical analysis, but it links in with the Java HTS library from samtools, so probably shares a lot of the functionality.
4. [sambamba](https://github.com/lomereiter/sambamba) -- a GPL2-licensed toolkit written in the D programming language (presumably by Artem Tarasov and Pjotr Prins). I haven't used it (and don't know people who have used it), but the github page suggests "For almost 5 years the main advantage over samtools was parallelized BAM reading. Finally in March 2017 samtools 1.4 was released, reaching parity on this."
5. [biobambam](https://github.com/gt1/biobambam2) -- written by German Tischler in C++. I also have no experience with this toolkit. This seems to have some multithreading capability, but is otherwise similar to other toolkits.

> **Comments:**
> **username_3**: A comparison of sorting speed between SAMtools (version 1.2) and sambamba (version 0.6.3) [here](https://www.basepairtech.com/blog/sorting-bam-files-samtools-vs-sambamba/).  
> **username_3**: In light of older versions of Samtools being slower than Sambamba, sometimes you also have to consider the needs of the overall pipeline. For example, some older software requires old versions of Samtools to run, which may make it hard to gain the speed advantages from newer Samtools and lead to choosing to use a different program entirely instead of having to support different versions of the same tool in your pipeline.  

---

