=
"Raw";
89wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
90: m_TopSeqEntry(seh), m_WizardType(wizard_type)
96 Create(parent,
id, caption, pos,
size, style);
104 bool CSeqTechDlg::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
107SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
108wxFrame::Create( parent,
id, caption, pos,
size, style );
113GetSizer()->SetSizeHints(
this);
157wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
158itemDialog1->SetSizer(itemBoxSizer2);
161itemBoxSizer2->Add(
m_PanelSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
163wxStaticBox* itemStaticBoxSizer4Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"These sequence(s) are"));
164wxStaticBoxSizer* itemStaticBoxSizer4 =
newwxStaticBoxSizer(itemStaticBoxSizer4Static, wxHORIZONTAL);
165itemBoxSizer2->Add(itemStaticBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
167 m_RawBtn=
newwxRadioButton( itemDialog1,
ID_RAW_BTN,
_(
"raw sequence reads (not assembled)"), wxDefaultPosition, wxDefaultSize, 0 );
169itemStaticBoxSizer4->Add(
m_RawBtn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
173itemStaticBoxSizer4->Add(
m_AssembledBtn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
175wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxHORIZONTAL);
176itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
178wxButton* itemButton8 =
newwxButton( itemDialog1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
179itemBoxSizer7->Add(itemButton8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
181wxButton* itemButton9 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
182itemBoxSizer7->Add(itemButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
241vector<string> values;
244 ITERATE(vector<string>, it, values) {
262 "Overlapping sequence",
263 "Overlapping sequences"};
270 return "BLAST is not an assembly program. Please provide valid assembly program information.";
272 stringprogram = assem;
274 if(pos != string::npos) {
275program = assem.substr(0, pos);
279 return "The assembly program name is not valid. Please enter the name of the program used to assemble these sequences.";
282 if(pos == string::npos) {
283 return "You must provide the version as well as the name of the assembly program.";
297 "Overlapping sequence",
298 "Overlapping sequences" 319 constobjects::CUser_field& field = user->GetField(field_name);
320 if(field.IsSetData() && field.GetData().IsStr()) {
321 val= field.GetData().GetStr();
323}
catch(
constexception&) {
333 return "Missing Sequencing Technology!";
339 return "You must select whether the sequences are assembled or raw.";
342 return "Do not use TSA wizard for unassembled Sanger or ABI sequences";
344 return "Raw sequence reads generated by next generation sequencing technologies should be submitted to the Sequence Read Archive (SRA), not GenBank. Please see: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi";
353 return "Please provide the assembly program and version in the form.";
355 return "BLAST is not an assembly program. Please provide valid assembly program information.";
363 return "Sequencing technology is not a valid answer. Please enter the specific type of technology used to obtain these sequences.";
367 return "'"+ seq_tech +
"' is not a sequencing technology. Please only enter the type of technology that was used to generate your sequences.";
376 stringraw_or_assembled =
"";
378raw_or_assembled =
kRaw;
382 returnraw_or_assembled;
401objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
402 for( ; b_iter ; ++b_iter ) {
406new_desc->SetUser(*new_user);
409 for(objects::CSeqdesc_CI desc_ci( *b_iter, objects::CSeqdesc::e_User);
412 constobjects::CUser_object& u = desc_ci->GetUser();
413 if(u.IsSetType() && u.GetType().IsStr() &&
NStr::EqualNocase(u.GetType().GetStr(),
"StructuredComment")) {
415 constobjects::CUser_field& prefix = desc_ci->GetUser().GetField(
"StructuredCommentPrefix");
416 if(prefix.IsSetData() && prefix.GetData().IsStr()
420 cmd->AddCommand (*ecmd);
423}
catch(
constexception&) {
428objects::CBioseq_set_Handle bssh = b_iter->GetParentBioseq_set();
429 if(bssh && bssh.IsSetClass() && bssh.GetClass() == objects::CBioseq_set::eClass_nuc_prot) {
450problem =
"Unknown error";
458objects::CBioseq_CI b_iter(
m_TopSeqEntry, objects::CSeq_inst::eMol_na);
459 for( ; b_iter ; ++b_iter ) {
460objects::CSeqdesc_CI it (*b_iter, objects::CSeqdesc::e_User);
462 if(it->GetUser().IsSetType()
463&& it->GetUser().GetType().IsStr()
465 ITERATE(objects::CUser_object::TData, field_it, it->GetUser().GetData()) {
466 if((*field_it)->IsSetLabel()
467&& (*field_it)->GetLabel().IsStr()
468&&
NStr::EqualNocase((*field_it)->GetLabel().GetStr(),
"StructuredCommentPrefix")
469&& (*field_it)->IsSetData()
470&& (*field_it)->GetData().IsStr()
471&&
NStr::EqualNocase((*field_it)->GetData().GetStr(),
"##Assembly-Data-START##")) {
481 m_EditedObj->SetType().SetStr(
"StructuredComment");
482objects::CUser_field& prefix =
m_EditedObj->SetField(
"StructuredCommentPrefix");
483prefix.SetData().SetStr(
"##Assembly-Data-START##");
484objects::CUser_field& suffix =
m_EditedObj->SetField(
"StructuredCommentSuffix");
485suffix.SetData().SetStr(
"##Assembly-Data-END##");
virtual CRef< CCmdComposite > GetCommand()
CSeqTechDlg()
Constructors.
CSourceRequirements::EWizardType m_WizardType
static string CheckSequencingTechnology(CRef< objects::CUser_object > user, CSourceRequirements::EWizardType wizard_type, string raw_or_assembled)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
CRef< objects::CUser_object > m_EditedObj
string x_GetRawOrAssembled()
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
bool Create(wxWindow *parent, wxWindowID id=10014, const wxString &caption=_("Sequencing Technology"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
objects::CSeq_entry_Handle m_TopSeqEntry
wxBoxSizer * m_PanelSizer
~CSeqTechDlg()
Destructor.
CSequencingTechnologyPanel * m_Panel
wxRadioButton * m_AssembledBtn
virtual string GetErrorMessage()
void CreateControls()
Creates the controls and sizers.
static bool x_IsSpecialTech(string tech)
void Init()
Initialises member variables.
void x_GetSeqTechUserFromSeqEntry()
void OnAssembledBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_ASSEMBLED_BTN
static bool ShowToolTips()
Should we show tooltips?
void OnRawBtnSelected(wxCommandEvent &event)
wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RAW_BTN
virtual bool TransferDataFromWindow()
CRef< objects::CUser_object > GetUser_object() const
virtual bool TransferDataToWindow()
static string GetWizardFieldFromSeqEntry(objects::CSeq_entry_Handle entry, string field_name)
static CRef< CCmdComposite > SetWizardFieldInSeqEntry(objects::CSeq_entry_Handle entry, string field_name, string value)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
@ eNocase
Case insensitive compare.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
static const string kAssembled
bool s_IsBadMethod(string method)
static const int k_NumBadAssemblyPrograms
string s_IsAssemblyMethodValid(string assem)
static string s_GetFieldValFromUserObj(CRef< objects::CUser_object > user, string field_name)
static const int k_NumBadMethods
static string s_BadMethods[]
static const string kRawOrAssembled
static string s_BadAssemblyPrograms[]
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