htsfile(1)
β¨ htsfile(1) β identify high-throughput sequencing data files β¨
okay so this is from the Bioinformatics tools manual set, and bestie, it's genuinely one of the most useful little gremlins in the toolbox π
πΈ SYNOPSIS πΈ
htsfile [-chHv] FILE...
htsfile --copy [-v] FILE DESTFILE
π¦ DESCRIPTION π¦
The htsfile utility attempts to identify what kind of high-throughput sequencing data files the specified files are, and provides minimal viewing capabilities for some kinds of data file. That's it, that's the whole vibe β it's the "what even are you" tool π«Ά
It can identify sequencing data files such as SAM, BAM, and CRAM; variant calling data files such as VCF and BCF; index files used to index these data files; and compressed versions of many of them. lowkey iconic range ngl π
For each FILE given, htsfile prints a description of the file format determined, using similar keyword conventions to file(1): "text" indicates a textual file that can probably be viewed on a terminal; "data" indicates binary data; "sequence", "variant calling", and "index" indicate different categories of data file. And when it can be identified, the name of the particular file format (such as "BAM" or "VCF") is printed at the start of the description. cute right π
When used to view file contents as text, htsfile can optionally show only headers or only data records, but has no other filtering capabilities. So like... it's giving chill. Use samtools or bcftools if you need more extensive viewing or filtering capabilities β that's a whole different main character energy π€
Alternatively, when --copy is used, htsfile takes exactly two arguments and performs a byte-for-byte copy from FILE to DESTFILE. This is similar to cp(1), but HTSlib's remote file access facilities are available for both source and destination. remote-to-remote glow-up fr fr β¨
The following options are accepted:
π OPTIONS π
-c,--viewβ Instead of identifying the specified files, display a textual representation of their contents on standard output.
By default, --view refuses to display files in unknown formats. When --verbose is also given, the raw contents of such files are displayed, with non-printable characters shown via C-style "\x" hexadecimal escape sequences. so chaotic, so useful π
-C,--copyβ Instead of identifying or displaying the specified files, copy the source FILE to the destination DESTFILE. Only--verbosemay be used in conjunction with--copy. that's a hard limit bestie, don't mix and match π-h,--header-onlyβ Display data file headers only. Implies--view. headers girlies rise πΈ-H,--no-headerβ When viewing files, display data records only. skip the intro, straight to the content π-v,--verboseβ Display additional warnings and diagnostic messages. Using--verboserepeatedly further raises the verbosity. yes you can stack it. yes it gets louder. π£οΈπ₯
π SEE ALSO π
bcftools(1), file(1), samtools(1)
fr go read those too, they're the besties this one hangs out with π«Ά
and that's the whole page bestie, no notes π
htslib-1.24 π 9 July 2026 β mwah, that's the version and the date, catch you in the next manpage πβ¨π
π¦ where this page comes from
- epel 10: htslib-tools 1.24-1.el10_3 Β· MIT AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: htslib 1.24
- Copyright (C) 2015, 2017-2018 Genome Research Ltd
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms