10 #include "boost/assert.hpp" 20 explicit Read_info(
const boost::string_ref name)
21 : name_(name.to_string()),
24 trim_(sequence_interval::whole())
28 const boost::string_ref name,
29 const Path_id seq_file,
33 : name_(name.to_string()),
39 const std::string& name()
const {
return name_;}
40 unsigned size()
const {
return width(trim_);}
41 bool empty()
const {
return boost::numeric::empty(trim_);}
42 Path_id seq_file()
const {
return seq_file_;}
43 bool is_reverse()
const {
return reverse_;}
44 sequence_interval
const& trim()
const {
return trim_;}
52 BOOST_ASSERT((! seq_file_) || (seq_file_ == pid));
57 Read_info& trim(
const unsigned lo,
const unsigned hi) {
58 return trim(sequence_interval(lo,hi));
61 Read_info& trim(sequence_interval
const& si) {
62 trim_ = intersect(trim_, si);
67 BOOST_ASSERT( name_ == si.name_ );
68 reverse_ |= si.is_reverse();
69 if( si.seq_file() ) seq_file(si.seq_file());
70 trim_ = intersect(trim_, si.trim());
77 sequence_interval trim_;
80 template<
class Ostr>
inline Ostr& operator<<(Ostr& ostr,
const Read_info si) {
81 ostr << si.name() <<
'[' << si.size() <<
']';
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: read_info.hpp:18