projects
/
mussa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix problems with motif changes not showing up in sequencebrowser
[mussa.git]
/
alg
/
sequence.cpp
diff --git
a/alg/sequence.cpp
b/alg/sequence.cpp
index 608ddd3b2059ba808c283e7726b181bfb27e0ce2..ecbc633f80141b32fc5ea2f8ee7d512c149bf415 100644
(file)
--- a/
alg/sequence.cpp
+++ b/
alg/sequence.cpp
@@
-90,7
+90,8
@@
Sequence::~Sequence()
Sequence::Sequence(const char *seq, AlphabetRef alphabet_, SeqSpan::strand_type strand_)
: header(""),
Sequence::Sequence(const char *seq, AlphabetRef alphabet_, SeqSpan::strand_type strand_)
: header(""),
- species("")
+ species(""),
+ motif_list(new MotifList)
{
set_filtered_sequence(seq, alphabet_, 0, npos, strand_);
}
{
set_filtered_sequence(seq, alphabet_, 0, npos, strand_);
}
@@
-99,7
+100,8
@@
Sequence::Sequence(const std::string& seq,
AlphabetRef alphabet_,
SeqSpan::strand_type strand_)
: header(""),
AlphabetRef alphabet_,
SeqSpan::strand_type strand_)
: header(""),
- species("")
+ species(""),
+ motif_list(new MotifList)
{
set_filtered_sequence(seq, alphabet_, 0, seq.size(), strand_);
}
{
set_filtered_sequence(seq, alphabet_, 0, seq.size(), strand_);
}
@@
-134,7
+136,8
@@
Sequence::Sequence(const SequenceRef o)
Sequence::Sequence(const SeqSpanRef& seq_ref)
: seq(seq_ref),
header(""),
Sequence::Sequence(const SeqSpanRef& seq_ref)
: seq(seq_ref),
header(""),
- species("")
+ species(""),
+ motif_list(new MotifList)
{
}
{
}
@@
-637,7
+640,7
@@
Sequence::clear()
header.clear();
species.clear();
annots.clear();
header.clear();
species.clear();
annots.clear();
- motif_list.
clear(
);
+ motif_list.
reset(new MotifList
);
}
void
}
void
@@
-755,18
+758,21
@@
void Sequence::add_motif(const Sequence& a_motif)
motif_start_i != motif_starts.end();
++motif_start_i)
{
motif_start_i != motif_starts.end();
++motif_start_i)
{
- motif_list
.
push_back(motif(*motif_start_i, a_motif.get_sequence()));
+ motif_list
->
push_back(motif(*motif_start_i, a_motif.get_sequence()));
}
}
void Sequence::clear_motifs()
{
}
}
void Sequence::clear_motifs()
{
- motif_list.clear();
+ if (motif_list)
+ motif_list->clear();
+ else
+ motif_list.reset(new MotifList);
}
}
-const
std::list<motif>
& Sequence::motifs() const
+const
Sequence::MotifList
& Sequence::motifs() const
{
{
- return motif_list;
+ return
*
motif_list;
}
std::vector<int>
}
std::vector<int>