Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow fai index to be in a different location to the indexed file.
Convert bgzf_index_load, bgzf_index_dump, fai_load, fai_build, fai_read and fai_save to use hfile instead of stdio. This allows access to remote indexes via http, ftp etc. and the plugin infrastructure. Add new API interfaces fai_build3() and fai_load3() which take separate names for the fai and gzi index files. If an index file name is passed in as NULL, it is derived from the name of the file being indexed as with fai_build() and fai_load(). As a result, fai_build() and fai_load() are replaced by simple wrappers that call fai_build3() and fai_load3() with NULL index file names. The download_and_open() function which made local copies of remote index files is removed. The side effect of creating local files was not desirable in some cases, and download_and_open() suffered from race conditions if two processes tried to access the same index simultaneously. It was also not called for .gzi files. fai_build3() and fai_load3() can directly access remote files for both indexed, .fai and .gzi files. This removes fai_save() as a public symbol in libhts.so, but this function does not appear in a public header file so is not part of the official HTSlib API or ABI.
- Loading branch information
1 parent
ff71a31
commit 3dc96c5
Showing
5 changed files
with
257 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.