objects::SAnnotSelector& sel,
79sel,
ctx.GetVisSeqRange(),
ctx.GetScale(), fixed_scale, y_limits,
108 const CSeq_id&
id=
dynamic_cast<const CSeq_id&
>(
object.object.GetObject());
109 return new CSGGraphDS(
object.scope.GetObject(),
id);
115 static stringsid(
"seqgraphic_graph_ds_type");
122 static stringslabel(
"Graphical View Graph Data Source Type");
138objects::SAnnotSelector& sel,
141sel.SetCollectNames();
146 if(iter->IsNamed()) {
147 if(iter->GetName().find(
"@@") == string::npos) {
157 CGraph_CIgraph_iter(handle, range, sel);
160 if(iter->IsNamed()) {
164 if(iter->GetName().find(
"@@") == string::npos &&
165iter->GetName().find(
"pileup graphs") == string::npos) {
181objects::SAnnotSelector& sel,
185handle.GetRangeSeq_loc(range.
GetFrom(), range.
GetTo());
186 CAnnot_CIit(handle.GetScope(), *loc, sel);
190 boolvalid_graph =
false;
193CSeq_annot::TDesc::Tdata::const_iterator d_iter = descs.begin();
194 for(; d_iter != descs.end(); ++d_iter) {
195 if((*d_iter)->IsUser()) {
209valid_graph = col_span.
IsSet(annot, 0)
210&& col_pos.
IsSet(annot, 0)
211&& col_val.
IsSet(annot, 0);
212}
catch(
constexception&) {
218 if(it->
GetName().find(
"@@") == string::npos) {
241 data->GetData(the_map);
251 result->m_ObjectList.emplace_back(hist.GetPointer());
305 void Map(
int& from,
int& to)
349 boolvalid_graph =
false;
353CSeq_annot::TDesc::Tdata::const_iterator d_iter = descs.begin();
354 for(; d_iter != descs.end(); ++d_iter) {
355 if(!(*d_iter)->IsUser())
449 throwruntime_error(
"SeqTable is not initialized");
459 value= (double)val_i;
477 intto = from + span - 1;
481range.
Set(from, to);
523 if(!table_reader.
Init())
541TDMaps::iterator iter = d_maps.find(g_title);
542 if(iter == d_maps.end()) {
544iter = d_maps.insert(
552g_desc, g_name))).first;
569 if(!table_reader.
GetRange(0, curr_range))
571 if(curr_range.
GetFrom() > to)
573 if(!table_reader.
GetRange(
static_cast<int>(rows - 1), curr_range))
575 if(curr_range.
GetTo() < from)
581 intr_end =
static_cast<int>(rows - 1);
584 row= (r_start + r_end) / 2;
592}
while((
TSeqPos)pos != from && r_start < r_end - 1);
593 row= (r_start + r_end) / 2 ;
595 intfirst_row =
row;
596 for(; (size_t)
row< rows; ++
row) {
605 intlast_row =
min(
row, (
int)rows - 1);
611 if(table_reader.
GetRange(first_row,
r)) {
612 lb.Init(
r.GetTo(), table_reader.
GetValue(first_row));
614 if(table_reader.
GetRange(last_row,
r)) {
637}
catch(exception& e) {
640 tmp.push_back(fref);
659 result->m_ObjectList.swap(glyphs);
676 result->m_ObjectList.swap(glyphs);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
const TAnnotNames & GetAnnotNames(void) const
CSeq_annot_Handle GetAnnot(void) const
CAppJobError Default implementation for IAppJobError - encapsulates a text error message.
CRef< TData > GetData(const string &data_key)
Retrieves TData from in-memory cache or if not found calls TData::Init to initialize new TData instan...
static CGraphCache & GetInstance()
static int GetNearestLevel(const set< int > &levels, double zoom)
static void CalcGraphLevels(const string &annotName, objects::CScope &scope, const objects::CSeq_loc &loc, set< int > &levels)
static EType TypeStrToValue(const string &type)
void SetInterpolationMethod(EInterpolationMethod interpolation_method)
void InitDataPoints(const TModelPoint &first_point, const TModelPoint &last_point)
@ eInterpolation_Piecewise
void SetAnnotName(const string &name)
void SetAxisMaxFixed(TDataType max)
void SetFixedScale(bool value)
void SetDesc(const string &desc)
CRef< CHistParams > GetHistParams() const
void SetConfig(const CSeqGraphicConfig &config)
void SetAxisMinFixed(TDataType min)
void Map(int &from, int &to)
CPosMapper(TSeqPos src_f, TSeqPos src_t, TSeqPos target_f, bool reversed)
CRenderingContext offers the basic context and utility methods for rendering layout objects in featur...
objects::SAnnotSelector m_Sel
our annotation selector
objects::CScope & GetScope(void) const
CSGAnnotJob inline methods.
int m_GraphLevel
coverate graph level
int GetGraphLevel() const
TSeqRange m_Range
target range
IAppJob::EJobState x_CreateHistFromGraph(CSeqGlyph::TObjects &glyphs, const objects::SAnnotSelector &sel, TModelUnit window, bool fixed_scale, const TAxisLimits &y_limits)
objects::CBioseq_Handle m_Handle
target sequence
IAppJob::EJobState x_LoadCoverageGraph(CSeqGlyph::TObjects &glyphs, int level, TModelUnit window, const string &title, bool fixed_scale, const TAxisLimits &y_limits)
TJobID x_LaunchJob(IAppJob &job, int report_period=1, const string &pool="ObjManagerEngine")
Launch either a background or foreground job.
bool m_Adaptive
adaptive/exact annot selector
int m_Depth
annotation resolving depth
objects::CBioseq_Handle m_Handle
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual ISGDataSource * CreateDS(SConstScopedObject &object) const
create an instance of the layout track type using default settings.
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual bool IsSharable() const
check if the data source can be shared.
void LoadSeqGraphs(const string &annotName, objects::SAnnotSelector &sel, CRenderingContext &ctx, bool fixed_scale, const TAxisLimits &y_limits, CConstRef< CSeqGraphicConfig > config)
void GetSeqtableAnnots(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names) const
CSGGraphDS(objects::CScope &scope, const objects::CSeq_id &id)
CSGGraphDS.
bool m_SeqTable
create graph from seq-table
void GetAnnotNames(objects::SAnnotSelector &sel, const TSeqRange &range, TAnnotNameTitleMap &names, bool seq_table=false) const
CSGJobResult â the data structure holding the seqgraphic job results.
CConstRef< CSeqGraphicConfig > m_Config
bool m_FixedScale
use global scale or dynamic scale
IAppJob::EJobState x_LoadGraph()
bool m_SeqTable
create graph from seq-table
IAppJob::EJobState x_LoadSeqTable()
TModelUnit m_Window
current window for smear bars
static void GetAnnotNames(const objects::CBioseq_Handle &handle, const TSeqRange &range, objects::SAnnotSelector &sel, TAnnotNameTitleMap &names, bool seq_table=false)
CSGSeqGraphJob.
IAppJob::EJobState x_LoadGraphFromCoverageGraph()
virtual EJobState x_Execute()
method truly doing the job.
static void GetSeqtableAnnots(const objects::CBioseq_Handle &handle, const TSeqRange &range, objects::SAnnotSelector &sel, TAnnotNameTitleMap &names)
list< CRef< CSeqGlyph > > TObjects
virtual void SetTaskName(const string &name)
virtual void SetTaskCompleted(int completed)
set total finished task number.
TJobToken m_Token
Job token recognizable by job listener.
CRef< CAppJobError > m_Error
CTableFieldHandle< double > m_col_val_real
CRef< CPosMapper > m_mapper
void SetMapper(CPosMapper *mapper)
CHistogramData::EInterpolationMethod m_InterpolationMethod
const string & GetGraphStyle() const
CSeqTableReader(CSeq_annot_Handle &annot)
CTableFieldHandle< int > m_col_val_int
bool GetRange(int row, TSeqRange &range)
CSeq_annot_Handle m_annot
vector< char > m_byte_vals
const CHistogramData::EInterpolationMethod GetInterpolationMethod() const
CTableFieldHandle< int > m_col_span
CTableFieldHandle< int > m_col_pos
bool IsSet(const CFeat_CI &feat_ci) const
bool TryGet(const CFeat_CI &feat_ci, Value &v) const
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Return a field reference representing the tokenized key, or a NULL reference if the key doesn't exist...
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
container_type::value_type value_type
static const struct name_t names[]
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
static string GetAnnotName(const objects::CSeq_annot_Handle &annot_handle)
static const string & GetUnnamedAnnot()
Get the commonly used symbol representing a unnnamed annotation.
static string GetAnnotComment(const objects::CSeq_annot_Handle &annot_handle)
static void SetResolveDepth(objects::SAnnotSelector &sel, bool adaptive, int depth=-1)
help function for setting selector resolve depth.
virtual void AddRange(TSeqRange range, CntType score=1, bool expand=false)
EJobState
Job states (describe FSM)
ENa_strand GetStrand(void) const
Get the location's strand.
TRange GetTotalRange(void) const
bool IsSeq_table(void) const
size_t GetSeq_tableNumRows(void) const
const CSeq_annot::TDesc & Seq_annot_GetDesc(void) const
bool Seq_annot_CanGetDesc(void) const
const string & GetName(void) const
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
const CSeq_loc & GetOriginalLocation(void) const
const CSeq_loc & GetMappedLocation(void) const
bool IsMapped(void) const
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
TObjectType * Release(void)
Release a reference to the object and return a pointer to the object.
TThisType & Set(position_type from, position_type to)
static TThisType GetWhole(void)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
bool IsStr(void) const
Check if variant Str is selected.
@ eField_id_location_from
interval from
const Tdata & Get(void) const
Get the member data.
list< CRef< CAnnotdesc > > Tdata
double value_type
The numeric datatype used by the parser.
const GenericPointer< typename T::ValueType > T2 value
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static SLJIT_INLINE sljit_ins lb(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
CHistogramGlyph::TMap m_Map
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4