fastq_to_fasta
A template for creation of SeqAn3 apps, with a FASTQ to FASTA example app.
store_index.hpp
Go to the documentation of this file.
1// --------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md
6// --------------------------------------------------------------------------------------------------
7
8#pragma once
9
10#include <filesystem>
11
12#include <seqan3/search/dream_index/interleaved_bloom_filter.hpp>
13
14#include <raptor/index.hpp>
16
17namespace raptor
18{
19
20template <typename data_t, typename arguments_t>
21static inline void
22store_index(std::filesystem::path const & path, raptor_index<data_t> const & index, arguments_t const &)
23{
24 std::ofstream os{path, std::ios::binary};
25 cereal::BinaryOutputArchive oarchive{os};
26 oarchive(index);
27}
28
29template <seqan3::data_layout layout, typename arguments_t>
30static inline void store_index(std::filesystem::path const & path,
31 seqan3::interleaved_bloom_filter<layout> && ibf,
32 arguments_t const & arguments)
33{
34 raptor_index<seqan3::interleaved_bloom_filter<layout>> index{window{arguments.window_size},
35 arguments.shape,
36 arguments.parts,
37 arguments.compressed,
38 arguments.bin_path,
39 std::move(ibf)};
40
41 std::ofstream os{path, std::ios::binary};
42 cereal::BinaryOutputArchive oarchive{os};
43 oarchive(index);
44}
45
46} // namespace raptor
seqan3::interleaved_bloom_filter< seqan3::data_layout::uncompressed > ibf
Definition: index.hpp:22
Definition: adjust_seed.hpp:13