Loading...
Searching...
No Matches
structure_file/record.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <seqan3/io/record.hpp>
namespace seqan3
{
template <typename field_types, typename field_ids>
class structure_record : public record<field_types, field_ids>
{
using base_t = record<field_types, field_ids>;
using tuple_base_t = typename base_t::base_type;
template <field f>
using field_constant = typename base_t::template field_constant<f>;
using base_t::get_impl;
public:
structure_record() = default;
structure_record(structure_record const &) = default;
structure_record & operator=(structure_record const &) = default;
structure_record(structure_record &&) = default;
structure_record & operator=(structure_record &&) = default;
~structure_record() = default;
using base_t::base_t;
decltype(auto) id() &&
{
return get_impl(field_constant<seqan3::field::id>{}, static_cast<tuple_base_t &&>(*this));
}
decltype(auto) id() const &&
{
return get_impl(field_constant<seqan3::field::id>{}, static_cast<tuple_base_t const &&>(*this));
}
decltype(auto) id() &
{
return get_impl(field_constant<seqan3::field::id>{}, static_cast<tuple_base_t &>(*this));
}
decltype(auto) id() const &
{
return get_impl(field_constant<seqan3::field::id>{}, static_cast<tuple_base_t const &>(*this));
}
decltype(auto) sequence() &&
{
return get_impl(field_constant<seqan3::field::seq>{}, static_cast<tuple_base_t &&>(*this));
}
decltype(auto) sequence() const &&
{
return get_impl(field_constant<seqan3::field::seq>{}, static_cast<tuple_base_t const &&>(*this));
}
decltype(auto) sequence() &
{
return get_impl(field_constant<seqan3::field::seq>{}, static_cast<tuple_base_t &>(*this));
}
decltype(auto) sequence() const &
{
return get_impl(field_constant<seqan3::field::seq>{}, static_cast<tuple_base_t const &>(*this));
}
decltype(auto) sequence_structure() &&
{
return get_impl(field_constant<seqan3::field::structure>{}, static_cast<tuple_base_t &&>(*this));
}
decltype(auto) sequence_structure() const &&
{
return get_impl(field_constant<seqan3::field::structure>{}, static_cast<tuple_base_t const &&>(*this));
}
decltype(auto) sequence_structure() &
{
return get_impl(field_constant<seqan3::field::structure>{}, static_cast<tuple_base_t &>(*this));
}
decltype(auto) sequence_structure() const &
{
return get_impl(field_constant<seqan3::field::structure>{}, static_cast<tuple_base_t const &>(*this));
}
decltype(auto) energy() &&
{
return get_impl(field_constant<seqan3::field::energy>{}, static_cast<tuple_base_t &&>(*this));
}
decltype(auto) energy() const &&
{
return get_impl(field_constant<seqan3::field::energy>{}, static_cast<tuple_base_t const &&>(*this));
}
decltype(auto) energy() &
{
return get_impl(field_constant<seqan3::field::energy>{}, static_cast<tuple_base_t &>(*this));
}
decltype(auto) energy() const &
{
return get_impl(field_constant<seqan3::field::energy>{}, static_cast<tuple_base_t const &>(*this));
}
decltype(auto) base_pair_probability_matrix() &&
{
// this is computed
return get_impl(field_constant<seqan3::field::bpp>{}, static_cast<tuple_base_t &&>(*this));
}
decltype(auto) base_pair_probability_matrix() const &&
{
return get_impl(field_constant<seqan3::field::bpp>{}, static_cast<tuple_base_t const &&>(*this));
}
decltype(auto) base_pair_probability_matrix() &
{
return get_impl(field_constant<seqan3::field::bpp>{}, static_cast<tuple_base_t &>(*this));
}
decltype(auto) base_pair_probability_matrix() const &
{
return get_impl(field_constant<seqan3::field::bpp>{}, static_cast<tuple_base_t const &>(*this));
}
// decltype(auto) reactivity(); // unused
// decltype(auto) reactivity_errors(); // unused
// decltype(auto) comment(); // unused
// decltype(auto) base_qualities(); // unused
};
} // namespace seqan3
namespace std
{
template <typename field_types, typename field_ids>
struct tuple_size<seqan3::structure_record<field_types, field_ids>> :
tuple_size<typename seqan3::structure_record<field_types, field_ids>::base_type>
{};
template <size_t elem_no, typename field_types, typename field_ids>
struct tuple_element<elem_no, seqan3::structure_record<field_types, field_ids>> :
tuple_element<elem_no, typename seqan3::structure_record<field_types, field_ids>::base_type>
{};
} // namespace std
seqan3::structure_record::structure_record
structure_record()=default
Defaulted.
seqan3::structure_record::base_pair_probability_matrix
decltype(auto) base_pair_probability_matrix() &&
Base pair probability matrix of interactions, usually a matrix of float numbers.
Definition structure_file/record.hpp:139
seqan3::structure_record::energy
decltype(auto) energy() &&
Energy of a folded sequence, represented by one float number.
Definition structure_file/record.hpp:118
seqan3::structure_record::operator=
structure_record & operator=(structure_record &&)=default
Defaulted.
seqan3::structure_record::energy
decltype(auto) energy() &
Energy of a folded sequence, represented by one float number.
Definition structure_file/record.hpp:128
seqan3::structure_record::sequence
decltype(auto) sequence() const &
The "sequence", usually a range of nucleotides or amino acids.
Definition structure_file/record.hpp:91
seqan3::structure_record::sequence_structure
decltype(auto) sequence_structure() &
Fixed interactions, usually a string of structure alphabet characters.
Definition structure_file/record.hpp:107
seqan3::structure_record::base_pair_probability_matrix
decltype(auto) base_pair_probability_matrix() &
Base pair probability matrix of interactions, usually a matrix of float numbers.
Definition structure_file/record.hpp:150
seqan3::structure_record::sequence_structure
decltype(auto) sequence_structure() const &&
Fixed interactions, usually a string of structure alphabet characters.
Definition structure_file/record.hpp:102
seqan3::structure_record::structure_record
structure_record(structure_record &&)=default
Defaulted.
seqan3::structure_record::base_pair_probability_matrix
decltype(auto) base_pair_probability_matrix() const &
Base pair probability matrix of interactions, usually a matrix of float numbers.
Definition structure_file/record.hpp:155
seqan3::structure_record::base_pair_probability_matrix
decltype(auto) base_pair_probability_matrix() const &&
Base pair probability matrix of interactions, usually a matrix of float numbers.
Definition structure_file/record.hpp:145
seqan3::structure_record::~structure_record
~structure_record()=default
Defaulted.
seqan3::structure_record::sequence
decltype(auto) sequence() &&
The "sequence", usually a range of nucleotides or amino acids.
Definition structure_file/record.hpp:76
seqan3::structure_record::sequence_structure
decltype(auto) sequence_structure() const &
Fixed interactions, usually a string of structure alphabet characters.
Definition structure_file/record.hpp:112
seqan3::structure_record::sequence_structure
decltype(auto) sequence_structure() &&
Fixed interactions, usually a string of structure alphabet characters.
Definition structure_file/record.hpp:97
seqan3::structure_record::energy
decltype(auto) energy() const &&
Energy of a folded sequence, represented by one float number.
Definition structure_file/record.hpp:123
seqan3::structure_record::energy
decltype(auto) energy() const &
Energy of a folded sequence, represented by one float number.
Definition structure_file/record.hpp:133
seqan3::structure_record::operator=
structure_record & operator=(structure_record const &)=default
Defaulted.
seqan3::structure_record::sequence
decltype(auto) sequence() &
The "sequence", usually a range of nucleotides or amino acids.
Definition structure_file/record.hpp:86
seqan3::structure_record::structure_record
structure_record(structure_record const &)=default
Defaulted.
seqan3::structure_record::sequence
decltype(auto) sequence() const &&
The "sequence", usually a range of nucleotides or amino acids.
Definition structure_file/record.hpp:81
seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
std
SeqAn specific customisations in the standard namespace.
record.hpp
Provides the seqan3::record template and the seqan3::field enum.
seqan3::record::base_type
detail::transfer_template_args_onto_t< field_types, std::tuple > base_type
A specialisation of std::tuple.
Definition record.hpp:193
seqan3::record::record
record()=default
Defaulted.
Hide me