36 #include <wx/dirdlg.h>
37 #include <wx/filename.h>
39 #include <wx/stattext.h>
40 #include <wx/statbox.h>
80 const wxString &input_vcf, wxWindowID
id,
const wxPoint& pos,
const wxSize&
size,
long style )
81 : m_VCFReader(vcf_reader), m_InputVcf(input_vcf)
93 wxWindowID
id,
const wxPoint& pos,
const wxSize&
size,
long style )
96 SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY);
97 wxPanel::Create( parent,
id, pos,
size, style );
102 GetSizer()->SetSizeHints(
this);
145 wxStaticBox* itemStaticBoxSizer2Static =
new wxStaticBox(itemPanel1,
wxID_ANY,
_(
"Assembly Options"));
146 wxStaticBoxSizer* itemStaticBoxSizer2 =
new wxStaticBoxSizer(itemStaticBoxSizer2Static, wxVERTICAL);
147 itemPanel1->SetSizer(itemStaticBoxSizer2);
149 wxStaticBox* itemStaticBoxSizer3Static =
new wxStaticBox(itemStaticBoxSizer2->GetStaticBox(),
wxID_ANY,
_(
"VCF File Assembly Identifier"));
150 wxStaticBoxSizer* itemStaticBoxSizer3 =
new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxHORIZONTAL);
151 itemStaticBoxSizer2->Add(itemStaticBoxSizer3, 0, wxGROW|wxALL, 5);
153 m_VcfAssembly =
new wxStaticText( itemStaticBoxSizer3->GetStaticBox(), wxID_STATIC,
_(
"N/A"), wxDefaultPosition, wxSize(213, -1), wxALIGN_LEFT|wxSTATIC_BORDER );
154 itemStaticBoxSizer3->Add(
m_VcfAssembly, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
157 wxBoxSizer* itemBoxSizer5 =
new wxBoxSizer(wxHORIZONTAL);
158 itemStaticBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxLEFT|wxRIGHT, 5);
161 itemBoxSizer5->Add(
m_AssemblyPanel, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
182 catch (
const exception& e) {
193 "Retrieve Assembly name/accession present in VCF file");
285 if (!vcf_assembly.empty()) {
299 catch (
const exception&) {
CMapAssemblyParams & GetData()
Data access.
void SetData(const CMapAssemblyParams &data)
void SetUseMapping(bool mapping=true)
virtual bool TransferDataFromWindow()
virtual bool TransferDataToWindow()
void EnableUseMapping(bool enable=true)
Class responsible to read VCF files.
const string & GetAssembly() const
bool ReadHeader(CNcbiIstream &in, ICanceled *canceled=nullptr, objects::ILineErrorListener *listener=nullptr)
Reads only the header section of the file.
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.
void LoadSettings(CRegistryReadView &view)
void SaveSettings(CRegistryWriteView &view) const
void SetSearchTerm(string value)
void SetUseMapping(bool value)
class CRegistryReadView provides a nested hierarchical view at a particular key.
bool Create(wxWindow *parent, wxWindowID id=ID_VCFASSEMBLYSELPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxTAB_TRAVERSAL)
Creation.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CVcfAssemblySelectionPanel()
Constructors.
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
~CVcfAssemblySelectionPanel()
Destructor.
void OnIdle(wxIdleEvent &event)
wxEVT_IDLE event handler for ID_VCFASSEMBLYSELPANEL
CAssemblySelPanel * m_AssemblyPanel
virtual void LoadSettings()
CColumnarVCFReader * m_VCFReader
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void SetNewFile(const wxString &input_vcf)
job_future< string > m_VcfAssemblyFuture
wxStaticText * m_VcfAssembly
virtual void SaveSettings() const
static bool ShowToolTips()
Should we show tooltips?
Interface for testing cancellation request in a long lasting operation.
static const char * str(char *buf, int n)
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
virtual bool IsCanceled(void) const =0
job_function_traits< _Fty >::future job_async(const _Fty &_Fnarg, const string &descr)
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
static const char * kMappingAssembly
static string s_ReadVCFAssembly(CColumnarVCFReader *reader, const wxString &input_vcf, ICanceled &canceled)
wxString ToWxString(const string &s)