Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
The samtools-1.9.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
Samtools mpileup VCF and BCF output is now deprecated. It is still functional, but will warn. Please use bcftools mpileup instead. (#884)
Samtools mpileup now handles the '-d' max_depth option differently. There is no longer an enforced minimum, and '-d 0' is interpreted as limitless (no maximum - warning this may be slow). The default per-file depth is now 8000, which matches the value mpileup used to use when processing a single sample. To get the previous default behaviour use the higher of 8000 divided by the number of samples across all input files, or 250. (#859)
Samtools stats new features:
The '--remove-overlaps' option discounts overlapping portions of templates when computing coverage and mapped base counting. (#855)
When a target file is in use, the number of bases inside the target is printed and the percentage of target bases with coverage above a given threshold specified by the '--cov-threshold' option. (#855)
Samtools faidx new features:
Now takes long options. (#509, thanks to Pierre Lindenbaum)
Now warns about zero-length and truncated sequences due to the requested range being beyond the end of the sequence. (#834)
Gets a new option (--continue) that allows it to carry on when a requested sequence was not in the index. (#834)
It is now possible to supply the list of regions to output in a text file using the new '--region-file' option. (#840)
New '-i' option to make faidx return the reverse complement of the regions requested. (#878)
faidx now works on FASTQ (returning FASTA) and added a new fqidx command to index and return FASTQ. (#852)
Samtools collate now has a fast option '-f' that only operates on primary pairs, dropping secondary and supplementary. It tries to write pairs to the final output file as soon as both reads have been found. (#818)
Samtools bedcov gets a new '-j' option to make it ignore deletions (D) and reference skips (N) when computing coverage. (#843)
Small speed up to samtools coordinate sort, by converting it to use radix sort. (#835, thanks to Zhuravleva Aleksandra)
Samtools idxstats now works on SAM and CRAM files, however this isn't fast due to some information lacking from indices. (#832)
Compression levels may now be specified with the level=N output-fmt-option. E.g. with -O bam,level=3.
Various documentation improvements.
Various test improvements.
Fixed failures in the multi-region iterator (view -M) when regions provided via BED files include overlaps (#819, reported by Dave Larson).
Samtools stats now counts '=' and 'X' CIGAR operators when counting mapped bases. (#855)
Samtools stats -F now longer negates an earlier -d option. (#830)
Fix samtools stats crash when using a target region. (#875, reported by John Marshall)
Samtools sort now keeps to a single thread when the -@ option is absent. Previously it would spawn a writer thread, which could cause the CPU usage to go slightly over 100%. (#833, reported by Matthias Bernt)
Fixed --version when built from a Git repository. (#844, thanks to John Marshall)
Use noenhanced mode for title in plot-bamstats. Prevents unwanted interpretation of characters like underscore in gnuplot version 5. (#829, thanks to M. Zapukhlyak)
blast2sam.pl now reports perfect match hits (no indels or mismatches). (#873, thanks to Nils Homer)
Fixed bug in fasta and fastq subcommands where stdout would not be flushed correctly if the -0 option was used.
Fixed invalid memory access in mpileup and depth on alignment records where the sequence is absent.
samtools calmd now has a quiet mode. This can be enabled by passing
-Qto calmd. (Thanks to Colin Davenport)
In samtools depth
-d 0will effectively remove the depth limit. (#764)
Improvements made to samtools collate's interface and documentation. It is now possible to specify an output file name using
-o, instead of deriving it from the prefix used for temporary files. The prefix itself is now optional if
-O(to stdout) is used. (#780)
Make samtools addreplacerg choose output format by file extension. (#767; reported by Argy Megalios)
Merge tests now work on ungzipped data, allowing tests to be run against different deflate libraries.
samtools markdup error messages about missing tags have been updated with the suggestion that samtools fixmate is run beforehand. (#765; reported by Yudong Cai)
--referenceoption for samtools fastq. Now works like other programs when a reference sequence is needed for CRAM files. (#791, reported by Milana Kaljevic)
The samtools-1.8.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
samtools quickcheckwill now write a warning to stderr if it finds any problems. These messages can be suppressed with a new
samtools markdupcan now mark supplementary alignments of reads where the primary alignment is found to be a duplicate. Supplementary marking can be turned on by passing the
-Soption to markdup. When this option is enabled, all the alignment data will be written to a temporary file so that supplementary alignments that occur before a duplicated primary can be correctly marked in the final output. The location of this temporary file can be influenced using the new
samtools viewnow supports HTSlib's new multi-region iterator. This can be enabled by passing the
-Moption to view. When using this option:
- The BED filter (
-Loption) will use the index to skip through the file
- Reads from overlapping regions will only be output once
- The BED filter (
samtools bedcovwill now ignore BED comment and header lines (#571; thanks to Daniel Baker).
samtools collatenow updates the
GO:tags, and sort will remove a
GO:tag if present. (#757; reported by Imran Haque).
maq2samnow checks for input files that end early. (#751; patch supplied by Alexandre Rebert of the Mayhem team, via Andreas Tille from Debian.)
- Fixed incorrect check when looking up header tags that could lead to a crash in
samtools stats. (#208; thanks to Dave Larson.)
- Fixed bug in
-Ooption where it would fail if the
OQtag in the input file had an unexpected type. (#758; reported by Taejeong Bae)
- The MD5 calculations in
md5fadid not handle non-alphabetic characters in the same way as the CRAM MD5 function. They have now been updated to match. (#704; reported by Chris Norman).
- Fix possible infinite loop in
bam_tview_cursesshould no longer fail if a curses header file cannot be found.
The samtools-1.7.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
fixmate. Used together,they allow duplicates to be marked and optionally removed. This fixes a number of problems with the old
example issue #497.
rmdupis kept for backwards compatibility but
markdupshould be used in preference.
Sort is now much better at keeping within the requested memory limit. It should also be slightly faster and need fewer temporary files when the file to be sorted does not fit in memory. (#593; thanks to Nathan Weeks.)
Sort no longer rewrites the header when merging from files. It can also now merge from memory, so fewer temporary files need to be written and it is better at sorting in parallel when everything fits in memory.
Both sort and merge now resolve ties when merging based on the position in the input file(s). This makes them fully stable for all ordering options. (Previously position sort was stable, but name and by tag
sorts were not).
Support for building on Windows using msys2/mingw64 or cygwin has been improved.
The samtools-1.6.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
Samtools fastq now has a -i option to create a fastq file from an index tag, and a -T option (similar to -t) to add user specified aux tags to the fastq header line.
Samtools fastq can now create compressed fastq files, by giving the output filenames an extention of .gq, .bgz, or .bgzf
Samtools sort has a -t TAG option, that allows records to be sorted by the value of the specified aux tag, then by position or name. Merge gets a similar option, allowing files sorted this way to be merged. (#675; thanks to Patrick Marks of 10xgenomics).
The samtools-1.5.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they [don't bundle HTSlib and] are missing some generated files.
This is primarily a security bug fix update.
Added options to fastq to create fastq files from BC (or other)
Samtools view has gained a -G option to exclude on all bits
set. For example to discard reads where neither end has been
mapped use "-G 12".
Samtools cat has a -b option to ease concatenation of many
Added misc/samtools_tab_completion for bash auto-completion of
samtools sub-commands. (#560)
Samtools tview now has J and K keys for verticale movement by 20
Various compilation / portability improvements.
Fixed issue with more than 65536 CIGAR operations and SAM/CRAM files.
The samtools-1.4.1.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they [don't bundle HTSlib and] are missing some generated files.
Release 1.4 (13 March 2017)
Noteworthy changes in samtools: * Fixed Issue #345 - out-by-one error in insert-size in samtools stats * bam_split now add a @PG header to the bam file * Added mate cigar tag support to fixmate * Multi-threading is now supported for decoding BAM and CRAM (as well as the previously supported encoding). Most commands that read BAM or CRAM have gained an -@ or --threads arguments, providing a significant speed bonus. For commands that both read and write files the threads are shared between decoding and encoding tasks. * Added -a option to samtools mpileup to show all locations, including sites with zero depth; repeating the option as -aa or -a -a additionally shows reference sequences without any reads mapped to them (#496). * The mpileup text output no longer contains empty columns at zero coverage positions. Previously it would output "...0\t\t..." in some circumstances (zero coverage due to being below a minumum base quality); this has been fixed to output as "...0\t*\t*..." with placeholder '*' characters as in other zero coverage circumstances (see PR #537). * To stop it from creating too many temporary files, samtools sort will now not run unless its per-thread memory limit (-m) is set to at least 1 megabyte (#547). * The misc/plot-bamstats script now has a -l / --log-y option to change various graphs to display their Y axis log-scaled. Currently this affects the Insert Size graph (PR #589; thanks to Anton Kratz). * Fixmate will now also add and update MC (mate CIGAR) tags. --- _The **[foo-1.x].tar.bz2** download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they [don't bundle HTSlib and] are missing some generated files._
sortcommand creates any needed temporary files alongside the final output file (similarly to the pre-1.3 behaviour), and now aborts when it detects a collision with another
sortinvocation's temporary files.
-T PREFIXoption specified is a directory (or when sorting to standard output), a random component is now added to temporary filenames to try to avoid collisions (#432, #523, #529, #535, PR #530).
Build fixes for 32-bit systems; be sure to run configure on such systems to enable large file support and access to 2GiB+ files.
bam2fqcommand no longer ignores reads when the
-soption is used (#532).
fastq -Ooption no longer crashes on reads that do not have an
OQtag field (#517).
Sorting files containing
@COheaders no longer duplicates the comment headers, which previously happened on large sorts for which temporary files were needed (#563).
view -lcommands no longer crash on
@RGheaders that do not have a
The samtools-1.3.1.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
- The obsolete
samtools sort in.bam out.prefixusage has been removed. If you are still using
out.prefix, convert to use
-o FILEinstead. (#295, #349, #356, #418, PR #441; see also discussions in #171, #213.)
bamshufcommand has been renamed to
collate(hence the term bamshuf no longer appears in the documentation, though it still works on the command line for compatibility with existing scripts).
mpileupcommand now outputs the unseen allele in VCF/BCF as
<X>as previously, and now has AD, ADF, ADR, INFO/AD, INFO/ADF, INFO/ADR
--output-tagsannotations that largely supersede the existing DV, DP4, DPR annotations.
mpileupcommand now applies BAQ calculations at all base positions, regardless of which
‑roptions are used (previously with
-lit was not applied to the first few tens of bases of each chromosome, leading to different mpileup results with
-r; #79, #125, #286, #407).
- Samtools now has a configure script which checks your build environment and facilitates choosing which HTSlib to build against. See INSTALL for details.
- Samtools's Makefile now fully supports the standard convention of allowing CC/CPPFLAGS/CFLAGS/LDFLAGS/LIBS to be overridden as needed. Previously it listened to
$(LDLIBS)instead; if you were overriding that, you should now override LIBS rather than LDLIBS.
- A new
addreplacergcommand that adds or alters
RG:Zrecord tags has been added.
rmdupcommand no longer immediately aborts (previously it always aborted with bam_get_library() not yet implemented), but remains not recommended for most use (#159, #252, #291, #393).
- Merging files with millions of headers now completes in a reasonable amount of time (#337, #373, #419, #453; thanks to Nathan Weeks, Chris Smowton, Martin Pollard, Rob Davies).
index's optional index output path argument works again (#199).
targetcut, and potential
mpileupsegfaults when given broken alignments with POS far beyond the end of their reference sequences.
- If you have source code using bam_md.c's
bam_prob_realn_core()functions, note that these now take an additional
ref_lenparameter. (The versions named without
tviewcommand's colour scheme has been altered to be more suitable for users with colour blindness (#457).
depadcommand now handles CIGAR N operators and accepts CRAM files (#201, #404).
statsnow outputs separate "N" and "other" columns in the ACGT content per cycle section (#376).
samtools depthto show all locations, including zero depth sites (#374).
samtools dictcommand, which creates a sequence dictionary (as used by Picard) from a FASTA reference file.
--target-regionsoption works again.
- Added legacy API sam.h functions
bam_fetch()-style iteration over either BAM or CRAM files. (In general we recommend recoding against the htslib API directly, but this addition may help existing libbam-using programs to be CRAM-enabled easily.)
- Fixed legacy API's
samopen()to write headers only with
"wh"when writing SAM files. Plain
"w"suppresses headers for SAM file output, but this was broken in 1.2.
samtools fixmate - -works in pipelines again; with 1.0 to 1.2, this failed with [bam_mating] cannot determine output format.
- Restored previous
samtools calmd -ubehaviour of writing compression level 0 BAM files. Samtools 1.0 to 1.2 incorrectly wrote raw non-BGZF BAM files, which cannot be read by most other tools. (Samtools commands other than
calmdwere unaffected by this bug.)
bam_nt16_nt4_tableto legacy API header bam.h.
- Fixed bugs #269, #305, #320, #328, #346, #353, #365, #392, #410, #445, #462, #475, and #495.
The samtools-1.3.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.
Noteworthy changes in samtools:
flagstatnow works on SAM, BAM, or CRAM files (rather than BAM only)
statscalculates mismatches per cycle for unclipped length
mergecan now merge SAM input files
- CRAM reference files are now cached by default (see HTSlib release notes and samtools(1) man page)
- Tested against Intel-optimised zlib (https://github.com/jtkukunas/zlib; see README for details)
- Fixed bugs #302, #309, #318, and #327 and many other improvements and bugs fixed in HTSlib—see the HTSlib release notes
The samtools-1.2.tar.bz2 download is the full source code release. The “Source code” downloads are generated by GitHub and are incomplete as they don't bundle HTSlib and are missing some generated files.