7 #ifndef VALUE_MAP_ACCESS_SINGLE_HPP_ 8 #define VALUE_MAP_ACCESS_SINGLE_HPP_ 18 typedef Seq_record::sequence seq_type;
29 Value_names::single_read_names
const& names
39 std::string
const& description()
const {
return value<std::string>(ids_.description());}
40 void description(std::string
const& descr) {(*this)[ids_.description()] = descr;}
41 seq_type
const& sequence()
const {
return value<std::string>(ids_.sequence());}
42 void sequence(seq_type
const& seq) {(*this)[ids_.sequence()] = seq;}
43 qual_type
const& quality()
const {
return value<qual_type>(ids_.quality());}
44 void quality(qual_type
const& qual) {(*this)[ids_.quality()] = qual;}
47 sequence_interval
interval()
const {
return value<sequence_interval>(ids_.trim());}
50 void interval(sequence_interval
const& si) {(*this)[ids_.trim()] = si;}
51 void set_empty() {(*this)[ids_.trim()] = sequence_interval::empty();}
53 void trim(sequence_interval
const& si) {
54 (*this)[ids_.trim()] = intersect(
interval(), si);
60 if( ids_.direction() )
return boost::get<bool>((*
this)[ids_.direction()]);
61 }
catch(std::exception
const&) {
62 BOOST_THROW_EXCEPTION(
64 << Err::msg_t(
"wrong type for current sequence direction")
65 << Err::nested_t(boost::current_exception())
68 return ids_.is_reverse();
71 void set_reverse(
const bool rev) {(*this)[ids_.direction()] = rev;}
81 const bool reverse_compl
83 return Value_map::sequence(
93 const bool reverse_compl
95 return Value_map::quality(
103 std::string
const& sequence_path()
const {
104 return value<std::string>(ids_.sequence_path());
107 void sequence_path(std::string
const& s) {(*this)[ids_.sequence_path()] = s;}
109 std::string
const& quality_path()
const {
110 return value<std::string>(ids_.quality_path());
113 void quality_path(std::string
const& s) {(*this)[ids_.quality_path()] = s;}
void interval(sequence_interval const &si)
Definition: value_map_access_single.hpp:50
Definition: sequence_record.hpp:35
Definition: value_map_access_single.hpp:16
sequence_interval interval() const
Definition: value_map_access_single.hpp:47
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
static Value_ids_single create(Value_map &vm, Value_names::single_read_names const &names)
Provides access to standard values for single read pipeline.
Definition: value_names.hpp:33
Definition: exception.hpp:23
std::string sequence(const bool trimmed, const bool reverse_compl) const
Definition: value_map_access_single.hpp:79
static Value_ids_single ensure(Value_map const &vm, Value_names::single_read_names const &names)
Definition: value_map_access_single.hpp:21
Store values mapped against name strings and value IDs.
Definition: value_map.hpp:23
bool is_reverse() const
Definition: value_map_access_single.hpp:58