53 m_bNegativeStrand(b_neg_strand),
90 const CSeq_graph* raw_graphs[5] = { 0, 0, 0, 0, 0 };
101 chgr_handle =
m_Handle.GetScope().GetBioseqHandle(trace_chgr_id);
117 int type = it->second;
118 raw_graphs[
type + 1] = &graph;
129 for (
CGraph_CI graph_iter(chgr_handle, sel); graph_iter; ++graph_iter ) {
130 const CSeq_graph& graph = graph_iter->GetOriginalGraph();
140 int type = it->second;
141 raw_graphs[
type + 1] = &graph;
150 int len = 0, sig_len = 0;
152 bool b_conf = raw_graphs[0] !=
NULL;
156 len = (
int) values.size();
160 for( ;
i < 5 && raw_graphs[
i] ==
NULL;
i++ ) {};
163 double A = raw_graphs[
i]->
GetA();
166 sig_len = (
int) values.size();
179 for(
i = 0;
i <
len;
i++ ) {
183 for(
i = 1 ;
i < 5 && b_ch;
i++) {
184 bool b_calc_pos =
false;
196 for(
int j = 0; j < sig_len; j++ ) {
197 positions[j] = K_pos * j;
203 for(
int j = 0; j < sig_len; j++ ) {
204 data_values[j] =
K * ((
unsigned char) values[j]);
217 _ASSERT(to >= from && samples >= 0);
258 vector<TConfidence>::const_iterator it = max_element(
m_Confs.begin(),
m_Confs.end());
User-defined methods of the data storage class.
CTraceDataProxy(const objects::CBioseq_Handle &handle, bool b_neg_strand)
CTraceDataProxy.
const objects::CBioseq_Handle & m_Handle
bool m_bNegativeStrand
handle to Bioseq with traces
TTitleToType m_TitleToType
void Init(TSignedSeqPos from, TSignedSeqPos to, int samples, bool negative)
CTraceData.
TSignalValue GetMax(EChannel signal) const
TConfidence m_MaxConfidence
TValues & GetValues(EChannel signal)
TConfidence GetMaxConfidence() const
vector< TConfidence > m_Confs
TPositions & GetPositions()
vector< TFloatSeqPos > TPositions
vector< TSignalValue > TValues
TSignedSeqPos GetSeqLength() const
void SetConfidence(TSignedSeqPos pos, TConfidence conf)
container_type::iterator iterator
const_iterator end() const
const_iterator find(const key_type &key) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
int TSignedSeqPos
Type for signed sequence position.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
SAnnotSelector & SetSearchExternal(const CTSE_Handle &tse)
Set all flags for searching standard GenBank external annotations.
const CSeq_graph & GetOriginalGraph(void) const
Get original graph with unmapped location/product.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
const TTag & GetTag(void) const
Get the Tag member data.
bool IsId(void) const
Check if variant Id is selected.
const TDb & GetDb(void) const
Get the Db member data.
TId GetId(void) const
Get the variant data.
bool IsGeneral(void) const
Check if variant General is selected.
const TGeneral & GetGeneral(void) const
Get the variant data.
const TGraph & GetGraph(void) const
Get the Graph member data.
const TTitle & GetTitle(void) const
Get the Title member data.
bool CanGetTitle(void) const
Check if it is safe to call GetTitle method.
const TByte & GetByte(void) const
Get the variant data.
bool CanGetLoc(void) const
Check if it is safe to call GetLoc method.
const TValues & GetValues(void) const
Get the Values member data.
E_Choice Which(void) const
Which variant is currently selected.
TA GetA(void) const
Get the A member data.
unsigned int
A callback function used to compare two keys in a database.