This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can't get samtools version: "unrecognized command"

The docs say to use --version, but I'm getting uncrecognized command

balter@exalab3:~$ which samtools
/usr/local/bin/samtools
balter@exalab3:~$ samtools --version
[main] unrecognized command '--version'
balter@exalab3:~$ samtools --version-only
[main] unrecognized command '--version-only'
samtools

You probably have an older version of samtools (likely v.0.1.1x) otherwise you should see this with newer samtools

$ samtools --version
samtools 1.3.1
Using htslib 1.3.1
Copyright (C) 2016 Genome Research Ltd.

You can confirm this by using @Brice's method below.

Indeed. Understanding --version and --version-only was something we added on the way from 0.1.19 to 1.0 (in c4d398b9).

1 answer

Type samtools without any arguments. It will display the version at the top.

Log in to answer this question.