25 #ifndef DATATYPES_HPP__
26 #define DATATYPES_HPP__
32 #include <boost/shared_ptr.hpp>
64 static const char insstate_enc[5];
79 static const char *ori_conv[4];
139 void write(std::ostream &str,
const char *
const sep)
const;
172 typedef bool(*compare_type)(
const read &,
const read &);
181 static bool cmp_id_str(
const std::string &id1,
const std::string &id2);
207 static const char strandconv_dp[5];
237 static const char insstate_enc[10];
279 static const int MAP_QUAL_NA=255;
313 void write(std::ostream &os,
const char *
const sep)
const;
329 char get_qual_std_char(
const size_t pos)
const;
333 char get_qual_aux_char(
const size_t pos)
const;
338 int get_qual_std(
const size_t pos)
const;
342 int get_qual_aux(
const size_t pos)
const;
351 bool is_firstread()
const;
353 bool is_lastread()
const;
356 bool is_fwd_frag()
const;
358 bool is_rev_frag()
const;
361 bool partner_mapped()
const;
365 typedef bool(*cmp_type)(
const alignment &,
const alignment &);
368 static bool cmp_coor(
const alignment &f1,
const alignment &f2);
370 static bool cmp_id(
const alignment &f1,
const alignment &f2);
372 static bool cmp_null(
const alignment &f1,
const alignment &f2);
389 std::string m_header;
393 std::string m_supplement;
395 std::string m_md5sum;
398 std::string m_sequence_str;
402 boost::shared_ptr<shore::mmapping> m_sequence_mmpp;
403 std::streamoff m_mmpp_off;
404 std::streamsize m_mmpp_size;
408 const char *m_cbegin;
428 const std::string &
get_id()
const;
445 void substr(std::string &res,
const size_t ofs,
size_t size=0)
const;
447 std::string
substr(
const size_t ofs,
const size_t size=0)
const;
451 bool compare(
const size_t ofs,
const size_t size,
const std::string &str)
const;
458 std::string
md5sum()
const;
487 uint32_t index_length;
604 uint16_t clip_qual_right;
605 uint16_t clip_adapter_left;
606 uint16_t clip_adapter_right;
728 static const double SCORE_NA;
729 static bool is_score_NA(
const double&
score);
767 static const std::string ATTR_ID;
768 static const std::string ATTR_NAME;
769 static const std::string ATTR_ALIAS;
770 static const std::string ATTR_PARENT;
771 static const std::string ATTR_TARGET;
772 static const std::string ATTR_GAP;
773 static const std::string ATTR_DERIVES_FROM;
774 static const std::string ATTR_NOTE;
775 static const std::string ATTR_DBXREF;
776 static const std::string ATTR_ONTOLOGY_TERM;
777 static const std::string ATTR_IS_CIRCULAR;
847 std::string delta_type;
849 std::string ref_seqid;
850 std::string qry_seqid;
875 std::vector<int> deltas;
890 strand(shore::STR_NA_OPT),score(0.0)
909 strand(shore::STR_NA_OPT),
910 min_coverage(-1),max_coverage(-1),p(-1)
914 typedef bool(*cmp_type)(
const segment &,
const segment &);
917 static bool cmp_coor(
const segment &f1,
const segment &f2);
929 std::string supplement;
940 std::string chromosome;
945 unsigned int support;
947 double repetitiveness;
956 std::string ref_seqid;
957 std::string qry_seqid;
973 void init(
const int idnum,
const std::string &refid,
const std::string &qryid);