hts_detect_format2

extern (C) @system nothrow @nogc
int
hts_detect_format2
(,
const(char)* fname
,)

Meta

History

! @abstract Determine format primarily by peeking at the start of a file @param fp File opened for reading, positioned at the beginning @param fname Name of the file, or NULL if not available @param fmt Format structure that will be filled out on return @return 0 for success, or negative if an error occurred. @since 1.15

Some formats are only recognised if the filename is available and has the expected extension, as otherwise more generic files may be misrecognised. In particular: - FASTA/Q indexes must have .fai/.fqi extensions; without this requirement, some similar BED files would be misrecognised as indexes.