Skip to content
samtools release 1.16:

New work and changes:

 * samtools reference command added.  This subcommand extracts the
   embedded reference out of a CRAM file. (PR#1649, addresses #723. 
   Requested by Torsten Seemann)

  * samtools import now adds grouped by query-name to the header.
    (PR#1633, thanks to Nils Homer)

 * Made samtools view read error messages more generic.  Former
   error message would claim that there was a "truncated file or
   corrupt BAM index file" with no real justification.  Also
   reset errno in stream_view which could lead to confusing error
   messages. (PR#1645, addresses some of the issues in #1640. 
   Reported by Jian-Guo Zhou)

 * Make samtools view -p also clear mqual, tlen and cigar. (PR#1647,
   fixes #1606.  Reported by eboyden)

 * Add bedcov option -c to report read count. (PR#1644, fixes #1629. 
   Reported by Natchaphon Rajudom)

 * Add UMI/barcode handling to samtools markdup. (PR#1630, fixes
   #1358 and #1514.  Reported by Gert Hulselmans and Poshi)

 * Add a new template coordinate sort order to samtools sort and
   samtools merge.  This is useful when working with unique molecular
   identifiers (UMIs). (PR#1605, fixes #1591.  Thanks to Nils Homer)

 * Rename mpileup --ignore-overlaps to --ignore-overlaps-removal or
   --disable-overlap-removal.  The previous name was ambiguous and
   was often read as an option to enable removal of overlapping
   bases, while in reality this is on by default and the option
   turns off the ability to remove overlapping bases. (PR#1666,
   fixes #1663.  Reported by yangdingyangding)

 * The dict command can now read BWA's .alt file and add AH:* tags
   indicating reference sequences that represent alternate loci.
   (PR#1676.  Thanks to John Marshall)

 * The "samtools index" command can now accept multiple alignment
   filenames with the new -M option, and will index each of them
   separately. (Specifying the output index filename via out.index
   or the new -o option is currently only applicable when there is
   only one alignment file to be indexed.) (PR#1674.  Reported by
   Abigail Ramsøe and Nicola Romanò. Thanks to John Marshall)

 * Allow samtools fastq -T "*". This allows all tags from SAM records
   to be written to fastq headers. This is a counterpart to samtools
   import -T "*". (PR#1679.  Thanks to cjw85)

Bug Fixes:

 * Re-enable --reference option for samtools depth.  The reference is
   not used but this makes the command line usage compatible with
   older releases. (PR#1646, fixes #1643.  Reported by Randy Harr)

 * Fix regex coordinate bug in samtools markdup. (PR#1657, fixes
   #1642.  Reported by Randy Harr)

 * Fix divide by zero in plot-bamstats -m, on unmapped data.
   (PR#1678, fixes #1675.  Thanks to Shane McCarthy)

 * Fix missing RG headers when using samtools merge -r. (PR#1683,
   addresses htslib#1479.  Reported by Alex Leonard)

 * Fix a possible unaligned access in samtools reference. (PR#1696)

Documentation:

 * Add documentation on CRAM compression profiles and some of the
   newer options that appear in CRAM 3.1 and above. (PR#1659, fixes
   #1656.  Reported by Matthias De Smet)

 * Add "sclen" filter expression keyword documentation. (PR#1661, see
   also htslib#1441)

 * Extend FILTER EXPRESSION man page section to match the changes
   made in HTSlib. (PR#1687, samtools/htslib#1478)

Non user-visible changes and build improvements:

 * Ensure generated test files are ignored (by git) and cleaned (by
   make testclean) (PR#1692, Thanks to John Marshall)