projects
/
mussa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move strand into seqspan
[mussa.git]
/
alg
/
sequence.hpp
diff --git
a/alg/sequence.hpp
b/alg/sequence.hpp
index 4b93ef132d81b93e924e153965407b32585c7851..80aa49f75e17bcf9ca572de2d9b8c53658ea31af 100644
(file)
--- a/
alg/sequence.hpp
+++ b/
alg/sequence.hpp
@@
-103,13
+103,14
@@
public:
typedef SeqString::const_reference const_reference;
typedef SeqString::size_type size_type;
static const size_type npos = SeqString::npos;
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,
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,
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&);
Sequence(const Sequence& seq);
Sequence(const Sequence *);
Sequence(const SeqSpanRef&);
@@
-125,10
+126,10
@@
public:
//! set sequence to a (sub)string containing nothing but AGCTN
void set_filtered_sequence(const std::string& seq,
//! 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,
size_type start=0,
size_type count=npos,
-
strand_type strand=Unknown
Strand);
+
SeqSpan::strand_type strand=SeqSpan::Plus
Strand);
//! retrive element at specific position
const_reference at(size_type i) const { return seq->at(i); }
//! retrive element at specific position
const_reference at(size_type i) const { return seq->at(i); }
@@
-159,7
+160,9
@@
public:
size_type stop() const { return seq->parentStop(); }
//! return a subsequence, copying over any appropriate annotation
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?)
//! reverse a character
std::string create_reverse_map() const;
//! return a reverse compliment (this needs to be improved?)
@@
-234,8
+237,6
@@
public:
protected:
SeqSpanRef seq;
protected:
SeqSpanRef seq;
- //! strand orientation
- strand_type strand;
//! fasta header
std::string header;
//! species name
//! fasta header
std::string header;
//! species name
@@
-259,7
+260,6
@@
protected:
template<class Archive>
void serialize(Archive& ar, const unsigned int /*version*/) {
ar & BOOST_SERIALIZATION_NVP(seq);
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);
ar & BOOST_SERIALIZATION_NVP(header);
ar & BOOST_SERIALIZATION_NVP(species);
ar & BOOST_SERIALIZATION_NVP(annots);