,
74 "Show tabular information about matches and mismatches",
75 "The Alignment Span View provides a tabular break-down of matches, " 76 "mismatches and gaps in bounded regions within an alignment",
106 static boolinitialized =
false;
109 if( ! initialized ){
131wxMenu* view_menu =
newwxMenu();
134view_menu->Append( wxID_SEPARATOR,
wxT(
"Actions") );
137wxMenu* bar_menu =
newwxMenu();
138bar_menu->Append(
wxID_ANY,
wxT(
"&View"), view_menu );
147 m_Panel=
newwxPanel( parent );
150wxBoxSizer* main_sizer =
newwxBoxSizer( wxVERTICAL );
151 m_Panel->SetSizer( main_sizer );
174 m_Panel->PopEventHandler(
true);
274TIdExtract id_extract;
275TAlnIdMap aln_id_map( id_extract, container.size() );
276ITERATE( CAlnContainer, aln_it, container ){
278aln_id_map.push_back( **aln_it );
280} catch( CAlnException e ){
281LOG_POST( Error << "Skipping this alignment: " << e.what() );
286TAlnStats aln_stats( aln_id_map );
289if ( !aln_stats.CanBeAnchored() ) {
290LOG_POST( Error << "Input alignments cannot be anchored because they don't share at least one common sequence." );
296CAlnUserOptions aln_user_options;
299TAnchoredAlnVec anchored_aln_vec;
300CreateAnchoredAlnVec( aln_stats, anchored_aln_vec, aln_user_options );
302BuildAln( anchored_aln_vec, m_AnchoredAln, aln_user_options );
304if( m_AnchoredAln.GetDim() == 1 ){
305m_AnchoredAln = CAnchoredAln();
307aln_user_options.m_MergeAlgo = CAlnUserOptions::ePreserveRows;
309BuildAln( anchored_aln_vec, m_AnchoredAln, aln_user_options );
313CRef<CSparseAln> sparse_aln;
314sparse_aln.Reset( new CSparseAln( m_AnchoredAln, *GetScope() ) );
316m_Model.reset( new CAlnSpanVertModel( *sparse_aln ) );
338 m_Model->SetMarkIndels( aln_type );
339 m_Model->SetThreshold( 1000000 );
400 const CObject*
object= cso_it->object.GetPointer();
415ref.
Reset( align );
494 if((*iter)->IsEmpty()) {
495 if(ranges.find(idh) == ranges.end()) {
499 TSeqRangerange = (*iter)->GetTotalRange();
500ranges[idh] += range;
504 ITERATE(TRangeMap, iter, ranges) {
506loc->
SetInt().SetFrom(iter->second.GetFrom());
507loc->
SetInt().SetTo(iter->second.GetTo());
508loc->
SetId(*iter->first.GetSeqId());
525 TSeqRangerange = (*iter)->GetTotalRange();
527ranges[idh] += range;
530 ITERATE(TRangeMap, iter, ranges) {
594 inttotal_rows =
m_Model->GetNumRows();
596 if( total_rows != 1 ){
601 if( rows_shown != total_rows ){
603status_msg +=
" shown";
607 if( rows_selected > 0 ){
609status_msg +=
" selected";
626 static stringsid(
"align_span_view_factory");
633 static stringslabel(
"Align Span View Factory");
670 boolfound_good =
false;
671 boolfound_bad =
false;
672 for(
size_t i= 0;
i<
objects.size();
i++ ){
674 consttype_info&
type=
typeid(*obj);
void Init(objects::CScope &scope, const objects::CSeq_align &align)
initial data set from which an alignment will be build
void SetSyncCreate(bool sync)
CRef< IAlnMultiDataSource > CreateDataSource()
void PreCreateDataSource(bool sparse)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
virtual void OnProjectChanged()
virtual void x_UpdateContentLabel()
virtual CRef< objects::CScope > GetScope() const
unique_ptr< const wxMenu > m_MenuBarMenu
virtual bool x_HasProject() const
EEventSubtype GetSubtype() const
CProjectViewTypeDescriptor - holds description of a project view type.
virtual void OnWidgetSelChanged()
class CRegistryReadView provides a nested hierarchical view at a particular key.
CSelectionEvent CSelectionEvent is used for broadcasting selection between views.
void AddRangeSelection(const objects::CSeq_id &id, const TRangeColl &segs)
bool HasObjectSelection()
Object Selection - represents select Objects (such as features, alignments, etc)
Template class for iteration on objects of class C (non-medifiable version)
EEventType GetType() const
CViewTypeDescriptor - holds description of a view type.
void AddLocation(const objects::CSeq_loc &loc)
IwxTableModel * GetModel() const
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
int GetNumRowsVisible() const
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
IView - represents a standard visual part of Workbench UI.
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CAlnSpanWidget * m_AlnWidget
virtual int TestInputObjects(TConstScopedObjects &objects)
tests input objects (not using object conversion) and returns a combination of ETestResult flags bett...
CRef< IAlnMultiDataSource > m_DataSource
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual void RegisterIconAliases(wxFileArtProvider &provider)
called by the framework to give Factory a chance to register images used by view
virtual objects::CScope * x_PreAttachToProject(TConstScopedObjects &objects)
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
vector< CConstRef< CSeq_align > > m_InputAligns
virtual void SetRegistryPath(const string ®_path)
virtual void GetSelection(CSelectionEvent &evt) const
get selection for broadcasting
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
virtual IView * CreateInstance() const
creates a view instance
virtual void x_OnSetSelection(CSelectionEvent &evt)
override in derived classes in order to handle selection broadcast
virtual void DestroyViewWindow()
destroy Window corresponding to the view
virtual void LoadSettings()
virtual const CObject * x_GetOrigObject() const
CConstRef< CSeq_annot > m_OrigAnnot
original data object passed to the view
virtual void OnWidgetSelChanged()
virtual void x_CreateMenuBarMenu()
initializes m_MenuBarMenu; override in derived classes
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
CConstRef< CBioseq > m_OrigBioseq
virtual const CProjectViewTypeDescriptor & GetProjectViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
virtual void SaveSettings() const
virtual void x_UpdateStatusMessage()
CConstRef< CSeq_align > m_OrigAlign
void x_InitMenuResources()
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
virtual void OnWidgetRangeChanged()
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
static CProjectViewTypeDescriptor m_TypeDescr
wxStatusBar * m_StatusBar
unique_ptr< CAlnSpanVertModel > m_Model
virtual void x_PostAttachToProject()
virtual void GetVisibleRanges(CVisibleRange &vrange) const
populate a visible range event for broadcasting
virtual const string & GetIconAlias() const
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
vector< SConstScopedObject > TConstScopedObjects
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
CSeq_id_Handle GetIdHandle(const CSeq_loc &loc, CScope *scope)
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
bool NotNull(void) const THROWS_NONE
Check if pointer is not null â same effect as NotEmpty().
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
#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.
@ eSimilarObjectsAccepted
wxString ToWxString(const string &s)
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