typedef SeqString::const_reference const_reference;
typedef SeqString::size_type size_type;
static const size_type npos = SeqString::npos;
- enum strand_type { UnknownStrand, PlusStrand, MinusStrand, BothStrand };
- Sequence(AlphabetRef a = reduced_nucleic_alphabet);
+ Sequence(AlphabetRef a = reduced_dna_alphabet);
Sequence(const char* seq,
- AlphabetRef a = reduced_nucleic_alphabet);
+ AlphabetRef a = reduced_dna_alphabet,
+ SeqSpan::strand_type strand = SeqSpan::PlusStrand);
Sequence(const std::string& seq,
- AlphabetRef a = reduced_nucleic_alphabet);
+ AlphabetRef a = reduced_dna_alphabet,
+ SeqSpan::strand_type strand = SeqSpan::PlusStrand);
Sequence(const Sequence& seq);
Sequence(const Sequence *);
Sequence(const SeqSpanRef&);
//! set sequence to a (sub)string containing nothing but AGCTN
void set_filtered_sequence(const std::string& seq,
- AlphabetRef a,
+ AlphabetRef a=reduced_dna_alphabet,
size_type start=0,
size_type count=npos,
- strand_type strand=UnknownStrand);
+ SeqSpan::strand_type strand=SeqSpan::PlusStrand);
//! retrive element at specific position
const_reference at(size_type i) const { return seq->at(i); }
size_type stop() const { return seq->parentStop(); }
//! return a subsequence, copying over any appropriate annotation
- Sequence subseq(size_type start=0, size_type count = npos) const;
+ Sequence subseq(size_type start=0,
+ size_type count = npos,
+ SeqSpan::strand_type strand = SeqSpan::SameStrand) const;
//! reverse a character
std::string create_reverse_map() const;
//! return a reverse compliment (this needs to be improved?)
protected:
SeqSpanRef seq;
- //! strand orientation
- strand_type strand;
//! fasta header
std::string header;
//! species name
template<class Archive>
void serialize(Archive& ar, const unsigned int /*version*/) {
ar & BOOST_SERIALIZATION_NVP(seq);
- ar & BOOST_SERIALIZATION_NVP(strand);
ar & BOOST_SERIALIZATION_NVP(header);
ar & BOOST_SERIALIZATION_NVP(species);
ar & BOOST_SERIALIZATION_NVP(annots);