/****
DIAMOND protein sequence aligner
Copyright (C) 2012-2026 Benjamin J. Buchfink

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
****/
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once
#include "output/output.h"
#include "daa_file.h"
#include "data/sequence_file.h"

void init_daa(File& f);
size_t write_daa_query_record(TextBuffer& buf, const char* query_name, const Sequence& query);
void finish_daa_query_record(TextBuffer& buf, size_t seek_pos);
void write_daa_record(TextBuffer& buf, const IntermediateRecord& r);
void write_daa_record(TextBuffer& buf, const Hsp& match, uint32_t subject_id);
void finish_daa(File& f, SequenceFile& db);
void finish_daa(File& f, DAAFile& daa_in);
void finish_daa(File& f, DAAFile& daa_in, const StringSet& seq_ids, const std::vector<uint32_t>& seq_lens, int64_t query_count);