expose mm_idx_is_idx, mm_idx_load and mm_idx_dump

This commit is contained in:
Ilya Kolpakov 2018-06-06 16:26:23 +02:00 committed by Heng Li
parent 4c66b689c3
commit 57f37551f8
1 changed files with 27 additions and 0 deletions

View File

@ -219,6 +219,33 @@ void mm_idx_reader_close(mm_idx_reader_t *r);
int mm_idx_reader_eof(const mm_idx_reader_t *r);
/**
* Check whether the file contains a minimap2 index
*
* @param fn index file name
* @return 1 if file can be opened and is a minimap2 index; 0 otherwise
*/
int64_t mm_idx_is_idx(const char *fn);
/**
* Load an index
*
* Unlike mm_idx_reader_read this function specifically loads an existing
* index.
*
* @param fp pointer to FILE object
* @return minimap2 index read from fp
*/
mm_idx_t *mm_idx_load(FILE *fp);
/**
* Save an index
*
* @param fp pointer to FILE object
* @param mi minimap2 index
*/
void mm_idx_dump(FILE *fp, const mm_idx_t *mi);
/**
* Create an index from strings in memory
*