Skip to content
samtools release 1.14:

Notice:

 * Samtools mpileup VCF and BCF output (deprecated in release 1.9)
   will be removed in the next release.  Please use bcftools mpileup
   instead.

New work and changes:

 * The legacy samtools API (libbam.a, bam_endian.h, sam.h and
   most of bam.h) has been removed.  We recommend coding against
   the HTSlib API directly. The legacy API had not been actively
   maintained since 2015. (#1483)

 * New "samtools samples" command to list the samples used in a
   SAM/BAM/CRAM file. (#1432; thanks to Pierre Lindenbaum)

 * "mpileup" now supports base modifications via the SAM Mm/MM
   auxiliary tag.  Please see the "--output-mods" option. (#1311)

 * Added "mpileup --output-BP-5" option to output the BP field in 5'
   to 3' order instead of left to right. (#1484; fixes #1481)

 * Added "samtools view --rf" option as an additional FLAG filtering
   method.  This keeps records only if (FLAG & N) != 0. (#1508; fixes
   #1470)

 * New "samtools import -N" option to use the second word on a FASTQ
   header line, matching the SRA/ENA FASTQ variant. (#1485)

 * Improve "view -x" option to simplify specifying multiple tags,
   and added the reverse "--keep-tag" option to include rather than
   exclude. (#516)

 * Switched the processing order of "view" -x (tag filtering) and
   -e (expression) handling.  Expressions now happen first so we
   can filter on tags which are about to be deleted.  This is now
   consistent with the "view -d" behaviour too. (#1480; fixes
   #1476. Reported by William Rowell)

 * Added filter expression "endpos" keyword. (#1464.  Thanks to
   John Marshall)

 * "samtools view" errors now appear after any SAM output, improving
   their visibility. (#1490.  Thanks to John Marshall)

 * Improved "samtools sort" use of temporary files, both tidying up
   if it fails and recovery when facing pre-existing temporary files.
   (#1510; fixes #1035, #1503.  Reported by Vivek Rai and
   Maarten Kooyman)

 * Filtering in "samtools markdup" now sets the UNMAP BAM flag when
   given the "-p" option. (#1512; fixes #1469)

 * Make CRAM references shared during "samtools merge" so merging
   many files has a lower memory usage. (#471)

Bug fixes:

 * Prevent "samtools depth" from closing stdout when outputting to
   terminal, avoiding a bad interaction with PySam. (#1465.  Thanks
   to John Marshall)

 * In-place "samtools reheader" now works on CRAMs produced using a
   higher than default compression level. (#1479)

 * Fix setting of the dt tag in "markdup".  Optical duplicates
   were being marked too early, negating the tagging and counting
   elsewhere. (#1487; fixes #1486.  Reported by Kevin Lewis)

 * Reinstate the "samtools stats -I" option to filter by sample.
   (#1496; fixes #1489.  Reported by Matthias Bernt)

 * Fix "samtools fastq" handling of dual index tags on single-ended
   input. (#1474)

 * Improve "samtools coverage" documentation. (#1521; fixes #1504.
   Reported by Peter Menzel)

Non user-visible changes and build improvements:

 * Replace Curses mvprintw() with va_list-based equivalent. (#1509.
   Thanks to John Marshall and Andreas Tille)

 * Fixed some clang-13 warning messages. (#1506)

 * Improve quoting of options in "samtools import" tests. (#1466.
   Thanks to John Marshall)

 * Fixed a faulty test which caused test harness failures on NetBSD.
   (#1520)