wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
284: m_TopSeqEntry(seh), m_CmdProcessor(processor)
288 Create(parent,
id, caption, pos,
size, style);
298wxFrame::Create( parent,
id, caption, pos,
size, style );
303GetSizer()->SetSizeHints(
this);
306Centre(wxBOTH|wxCENTRE_ON_SCREEN);
343wxMenuBar *menubar =
newwxMenuBar();
345wxMenu *file_menu =
newwxMenu();
346menubar->Append(file_menu,
wxT(
"&File"));
348wxMenu *export_submenu =
newwxMenu();
349file_menu->AppendSubMenu(export_submenu,
_(
"Export"));
352export_submenu->Append(interleave_item);
354export_submenu->Append(cont_item);
358wxMenuItem *close_item =
newwxMenuItem(file_menu, wxID_CLOSE,
_(
"Close"),
_(
"Close"), wxITEM_NORMAL);
359file_menu->Append(close_item);
361wxMenu *edit_menu =
newwxMenu();
362menubar->Append(edit_menu,
wxT(
"&Edit"));
365edit_menu->Append(remove_seq_item);
368edit_menu->Append(rev_strands_item);
371edit_menu->Append(validate_item);
374edit_menu->Append(propagate_item);
376wxMenu *view_menu =
newwxMenu();
377menubar->Append(view_menu,
wxT(
"&View"));
390view_menu->Append(substitute_item);
393view_menu->Append(features_item);
395wxMenu *feature_menu =
newwxMenu();
396menubar->Append(feature_menu,
wxT(
"Features"));
399feature_menu->AppendSubMenu(annotate_seq_submenu,
_(
"Apply To Target Sequence"));
401wxMenu *annotate_alignment_submenu =
newwxMenu();
402feature_menu->AppendSubMenu(annotate_alignment_submenu,
_(
"Apply To Alignment"));
405annotate_alignment_submenu->Append(align_cds_item);
408annotate_alignment_submenu->Append(align_rna_item);
411annotate_alignment_submenu->Append(align_other_item);
415wxPanel *Dialog1 =
newwxPanel(
this,
wxID_ANY);
417wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
418Dialog1->SetSizer(itemBoxSizer2);
420wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
421itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_LEFT, 0);
424itemBoxSizer3->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
427itemBoxSizer3->Add(
m_GoTo_TextCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
430itemBoxSizer3->Add(itemButton7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
435wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxHORIZONTAL);
436itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_LEFT, 0);
438 m_Range=
newwxStaticText( Dialog1, wxID_STATIC,
wxT(
""), wxDefaultPosition, wxSize(Dialog1->ConvertDialogToPixels(wxSize(40, -1)).x, -1), wxNO_BORDER );
439itemBoxSizer4->Add(
m_Range, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5);
441wxBoxSizer *BoxSizer =
newwxBoxSizer(wxHORIZONTAL);
442itemBoxSizer2->Add(BoxSizer, 1, wxGROW, 0);
444BoxSizer->Add(
m_Panel, 1, wxGROW|wxALL, 5);
448wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
449itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL, 0);
452itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
454wxStatusBar *status = CreateStatusBar();
465 if(!align || align->
Equals(align_ci.GetOriginalSeq_align()) || align->
Equals(*align_ci))
520wxStatusBar *status = GetStatusBar();
526 if(pos1 > 0 && pos2 > 0)
532 m_Range->SetLabel(wxEmptyString);
541 if(
val.ToLong(&pos))
552 if(
val.ToLong(&pos))
568vector<string> labels;
579labels.push_back(
label);
585 msg=
"Cannot resolve the following bioseq";
586 msg+= (labels.size() > 1) ?
"s: \n":
": \n";
589report->SetTitle(
wxT(
"Unresolved bioseqs"));
591report->Show(
true);
626vector<vector<pair<TSeqPos,TSeqPos> > > feat_ranges;
627vector<pair<string,CSeqFeatData::ESubtype> > feat_types;
628vector<CBioseq_Handle::EVectorStrand> feat_strand;
638vector<pair<TSeqPos,TSeqPos> > vec;
644vec.push_back(pair<TSeqPos,TSeqPos>(feat_start,feat_stop));
651feat_types.push_back(pair<string,CSeqFeatData::ESubtype>(
label,subtype));
652feat_ranges.push_back(vec);
653feat_strand.push_back(strand);
679 if(event.IsChecked())
693 if(event.IsChecked())
734 if(sel.first >=0 && sel.second >= 0 && sel.second != sel.first)
737 if(sel.first > sel.second)
740 swap(sel.first, sel.second);
742interval->
SetInt().SetFrom(sel.first);
743interval->
SetInt().SetTo(sel.second);
752interval->
SetInt().SetId(*
id);
759wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
762 if(edit_dlg.ShowModal() == wxID_OK)
781 intfrom_align = align_sel.first;
782 intto_align = align_sel.second;
787 if(wxYES != wxMessageBox(
_(
"You are not trimming the ends, the selection is internal. Are you sure?"),
wxT(
"Confirm"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION))
796vector<int>
offset(num_rows, 0);
805 if(sel.first < 0 || sel.second < 0)
807 intfrom = sel.first;
847 if(start >= from && start +
len- 1 <= to)
849seqmap_i = seqmap_i.
Remove();
851 else if(from > start && from < start+len && to >= start+
len-1)
858 stringseq_out = seq_in.substr(0, from - start);
865 else if(from > start && from < start+
len&& to < start+
len-1)
872 stringseq_out = seq_in.substr(0, from - start) + seq_in.substr(to - start + 1);
879 else if(from <= start && to >= start && to < start +
len- 1)
886 stringseq_out = seq_in.substr(to - start + 1);
901 cmd->AddCommand(*cmd_bioseq);
923 boolalready_moved =
false;
929 if(from > pos && from < pos + len && to >= pos +
len- 1)
931new_len = from - pos;
932ds->
SetLens().push_back(new_len);
951already_moved =
true;
960ds->
SetStarts()[seg1 * num_rows + dim] = start1;
974 else if(from <= pos && to >= pos +
len- 1)
979already_moved =
true;
988ds->
SetStarts()[seg1 * num_rows + dim] = start1;
994 else if(from <= pos && to >= pos && to < pos +
len- 1)
996new_len = pos +
len- 1 - to;
997ds->
SetLens().push_back(new_len);
1022 else if(from > pos && from < pos + len - 1 && to > pos && to < pos +
len- 1)
1024 TSeqPosnew_len1 = from - pos;
1025ds->
SetLens().push_back(new_len1);
1044already_moved =
true;
1053ds->
SetStarts()[seg1 * num_rows + dim] = start1;
1060ds->
SetLens().push_back(new_len2);
1089 else if(from < pos && to < pos)
1091ds->
SetLens().push_back(new_len);
1118ds->
SetLens().push_back(new_len);
1136align->
SetSegs().SetDenseg(*ds);
1139 cmd->AddCommand(*cmd_align);
1149 for(
CFeat_CIfeat_it(scope, *loc, sel); feat_it; ++feat_it)
1152new_feat->
Assign(feat_it->GetOriginalFeature());
1153 const CSeq_loc& feat_loc = feat_it->GetLocation();
1154 boolmodified =
false;
1155 boolremoved =
false;
1165 cmd->AddCommand(*cmd_del);
1174 if((*code_break)->IsSetLoc())
1176 boolcb_modified =
false;
1177 boolcb_removed =
false;
1184(*code_break)->SetLoc(*cb_loc);
1190new_feat->
SetData().SetCdregion().ResetFrame();
1200 boolac_modified =
false;
1201 boolac_removed =
false;
1206new_feat->
SetData().SetRna().SetExt().SetTRNA().ResetAnticodon();
1208new_feat->
SetData().SetRna().SetExt().SetTRNA().SetAnticodon(*ac_loc);
1213 if(cmd_change_feat)
1215 cmd->AddCommand(*cmd_change_feat);
1226new_loc->
Assign(feat_loc);
1234 if(feat_start < from && feat_stop >= from && feat_stop <= to)
1236loc_it.
SetTo(from - 1);
1238 else if(feat_start < from && feat_stop > to)
1240loc_it.
SetTo(feat_stop - (to - from + 1));
1242 else if(feat_start >= from && feat_start <= to && feat_stop > to)
1244loc_it.
SetFrom(to + 1 - (to - from + 1));
1245loc_it.
SetTo(feat_stop - (to - from + 1));
1247 else if(feat_start >= from && feat_start <= to && feat_stop >= from && feat_stop <= to)
1252 else if(feat_start > to)
1254loc_it.
SetFrom(feat_start - (to - from + 1));
1255loc_it.
SetTo(feat_stop - (to - from + 1));
1313 for(; graph_ci; ++graph_ci)
1323 boolg_modified =
false;
1324 boolg_removed =
false;
1332 command->AddCommand(*delGraph);
1338 switch( src_data.
Which() )
1361step = new_graph->
GetComp();
1367 for(
TSeqPospos = feat_start; pos <= feat_stop; pos += step, graph_pos++)
1369 if(pos >= from && pos <= to)
1371 switch( src_data.
Which() )
1397new_graph->
SetLoc(*g_loc);
1398 switch( src_data.
Which() )
1419 command->AddCommand(*chgGraph);
1434 if(sel.first > sel.second)
1437 swap(sel.first, sel.second);
1439interval->
SetInt().SetFrom(sel.first);
1440interval->
SetInt().SetTo(sel.second);
1446 id->SetLocal().SetStr(
str);
1448interval->
SetInt().SetId(*
id);
1452 if(edit_dlg.ShowModal() == wxID_OK)
1474 if(sel.first > sel.second)
1477 swap(sel.first, sel.second);
1479interval->
SetInt().SetFrom(sel.first);
1480interval->
SetInt().SetTo(sel.second);
1486 id->SetLocal().SetStr(
str);
1488interval->
SetInt().SetId(*
id);
1492 if(edit_dlg.ShowModal() == wxID_OK)
1514 if(sel.first > sel.second)
1517 swap(sel.first, sel.second);
1519interval->
SetInt().SetFrom(sel.first);
1520interval->
SetInt().SetTo(sel.second);
1526 id->SetLocal().SetStr(
str);
1528interval->
SetInt().SetId(*
id);
1532 if(edit_dlg.ShowModal() == wxID_OK)
1559 id->Assign(row_id);
1560new_loc->
SetId(*
id);
1575 if(new_start < 0 || new_stop < 0)
1580 if(new_stop < new_start)
1582 swap(new_start, new_stop);
1612loc_it.
SetTo(new_stop);
1624wxMenuBar *menu_bar = GetMenuBar();
1625wxMenuItem *menu_item = menu_bar->FindItem( event.GetId() );
1626 string label= menu_item->GetItemLabelText().ToStdString();
1631 row=
static_cast<int>(
i);
1640wxFileDialog save_file(
this,
wxT(
"Export to file"), wxEmptyString, wxEmptyString,
1642wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
1644 if(save_file.ShowModal() == wxID_OK)
1646wxString path = save_file.GetPath();
1647 if( !path.IsEmpty())
1659wxFileDialog save_file(
this,
wxT(
"Export to file"), wxEmptyString, wxEmptyString,
1661wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
1663 if(save_file.ShowModal() == wxID_OK)
1665wxString path = save_file.GetPath();
1666 if( !path.IsEmpty())
1679 unsigned intoptions = validator::CValidator::eVal_val_align;
1682validator::CValidErrorFormat::SetSuppressionRules(
m_TopSeqEntry, *errors);
1685validator::CValidator validator(*objmgr);
1691 stringdescription = vit->GetAccnver() +
":" 1693+ vit->GetErrCode() +
":" 1695 if(!description.empty())
1696 msg+= description +
"\n";
1699 msg=
"Validation test of the alignment succeeded";
1701report->SetTitle(
wxT(
"Validator Report"));
1703report->Show(
true);
1717vector<CConstRef<CSeq_feat>> propagatedFeats;
1718 for(
CFeat_CIci(bsh); ci; ++ci) {
1719propagatedFeats.push_back(ci->GetSeq_feat());
1728wxWindow* editorWindow = editor->CreateWindow(&edit_dlg);
1731 if(edit_dlg.ShowModal() == wxID_OK)
1742}
catch(
CException&e) {}
catch(exception &e) {}
1753 if(wxYES != wxMessageBox(
_(
"You are about to remove 1 sequence from the alignment. Are you sure?"),
wxT(
"Confirm"), wxYES_NO | wxICON_QUESTION))
1766ids.push_back(*id_iter);
1776CDense_seg::TStarts::const_iterator start_iter;
1778CDense_seg::TStrands::const_iterator strand_iter;
1783 for(
unsigned intseg = 0; seg<numseg; seg++)
1784 for(
unsigned int i=0;
i<dim;
i++)
1789starts.push_back(*start_iter);
1794strands.push_back(*strand_iter);
1813align->
SetSegs().SetDenseg().SetIds().swap(ids);
1814align->
SetSegs().SetDenseg().RemovePureGapSegs();
1820wxMessageBox(
_(
"Cannot remove last pair of bioseqs from alignment"),
wxT(
"Error"), wxOK|wxICON_ERROR);
1843 if(wxYES != wxMessageBox(
_(
"You are about to reverse 1 sequence in the alignment. Are you sure?"),
wxT(
"Confirm"), wxYES_NO | wxICON_QUESTION))
1859vector<ENa_strand> new_strands(num_rows * num_segs,
eNa_strand_plus);
1918: m_Loc(align_loc), m_scope(&scope)
1937GetSizer()->SetSizeHints(
this);
1982wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
1983itemCBulkCmdPanel1->SetSizer(itemBoxSizer2);
1985wxFlexGridSizer* itemFlexGridSizer3 =
newwxFlexGridSizer(0, 2, 0, 0);
1986itemBoxSizer2->Add(itemFlexGridSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
1988wxStaticText* itemStaticText8 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Gene Symbol"), wxDefaultPosition, wxDefaultSize, 0 );
1989itemFlexGridSizer3->Add(itemStaticText8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
1992itemFlexGridSizer3->Add(
m_GeneSymbol, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
1994wxStaticText* itemStaticText9 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Gene Description"), wxDefaultPosition, wxDefaultSize, 0 );
1995itemFlexGridSizer3->Add(itemStaticText9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
1998itemFlexGridSizer3->Add(
m_GeneDescription, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2000wxStaticText* itemStaticText4 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Protein Name"), wxDefaultPosition, wxDefaultSize, 0 );
2001itemFlexGridSizer3->Add(itemStaticText4, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2004itemFlexGridSizer3->Add(
m_ProteinName, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2006wxStaticText* itemStaticText6 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Protein Description"), wxDefaultPosition, wxDefaultSize, 0 );
2007itemFlexGridSizer3->Add(itemStaticText6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2012wxStaticText* itemStaticText10 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Comment"), wxDefaultPosition, wxDefaultSize, 0 );
2013itemFlexGridSizer3->Add(itemStaticText10, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2016itemFlexGridSizer3->Add(
m_Comment, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2022wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
2023itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2025wxButton* itemButton13 =
newwxButton( itemCBulkCmdPanel1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
2026itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2028wxButton* itemButton14 =
newwxButton( itemCBulkCmdPanel1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
2029itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2052 returnwxNullBitmap;
2078 if(!locations.empty())
2081 for(
size_t i= 0;
i< locations.size(); ++
i)
2093 if(!seq_loc || !bsh || (seq_loc->
IsMix() && !seq_loc->
GetMix().
IsSet()))
2104cds->SetData().SetCdregion();
2106cds->SetComment(cds_comment);
2112cds->SetData().SetCdregion().SetCode(*
code);
2115cds->SetLocation().Assign(*seq_loc);
2121 if(seq_loc->
IsPnt())
2127cds->SetData().SetCdregion().SetFrame(objects::CSeqTranslator::FindBestFrame(*cds, bsh.
GetScope()));
2135 prot->SetData().SetProt().SetName().push_back(prot_name);
2138 prot->SetData().SetProt().SetDesc(prot_desc);
2150new_gene->SetData().SetGene().SetLocus(gene_symbol);
2152new_gene->SetData().SetGene().SetDesc(gene_desc);
2153new_gene->SetLocation().Assign(cds->GetLocation());
2157new_gene->SetPartial(
true);
2204: m_Loc(align_loc), m_scope(&scope)
2223GetSizer()->SetSizeHints(
this);
2274wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
2275itemCBulkCmdPanel1->SetSizer(itemBoxSizer2);
2277itemBoxSizer2->Add(0, 500, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0);
2279wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
2280itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2282wxStaticBox* itemStaticBoxSizer5Static =
newwxStaticBox(itemCBulkCmdPanel1,
wxID_ANY,
_(
"RNA Type"));
2283wxStaticBoxSizer* itemStaticBoxSizer5 =
newwxStaticBoxSizer(itemStaticBoxSizer5Static, wxVERTICAL);
2284itemBoxSizer4->Add(itemStaticBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2286wxArrayString m_RNATypeStrings;
2287m_RNATypeStrings.Add(
_(
"preRNA"));
2288m_RNATypeStrings.Add(
_(
"mRNA"));
2289m_RNATypeStrings.Add(
_(
"tRNA"));
2290m_RNATypeStrings.Add(
_(
"rRNA"));
2291m_RNATypeStrings.Add(
_(
"ncRNA"));
2292m_RNATypeStrings.Add(
_(
"tmRNA"));
2293m_RNATypeStrings.Add(
_(
"miscRNA"));
2295 m_RNAType->SetStringSelection(
_(
"rRNA"));
2296itemStaticBoxSizer5->Add(
m_RNAType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2298wxBoxSizer* itemBoxSizer7 =
newwxBoxSizer(wxHORIZONTAL);
2299itemStaticBoxSizer5->Add(itemBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2301wxStaticText* itemStaticText8 =
newwxStaticText( itemStaticBoxSizer5->GetStaticBox(), wxID_STATIC,
_(
"ncRNA class"), wxDefaultPosition, wxDefaultSize, 0 );
2302itemBoxSizer7->Add(itemStaticText8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2304wxArrayString m_ncRNAClassStrings;
2307itemBoxSizer7->Add(
m_ncRNAClass, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2310itemBoxSizer4->Add(
m_FieldSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2312wxStaticText* itemStaticText11 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"RNA Name"), wxDefaultPosition, wxDefaultSize, 0 );
2313 m_FieldSizer->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2318wxStaticText* itemStaticText13 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Comment"), wxDefaultPosition, wxDefaultSize, 0 );
2319 m_FieldSizer->Add(itemStaticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2325itemBoxSizer4->Add(
m_ButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2327wxButton* itemButton16 =
newwxButton( itemCBulkCmdPanel1,
ID_CALIGN_RNA_ADD_PANEL_BUTTON11,
_(
"Add '18S-ITS-5.8S-ITS-28S' to comment"), wxDefaultPosition, wxDefaultSize, 0 );
2328 m_ButtonsSizer->Add(itemButton16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2330wxButton* itemButton17 =
newwxButton( itemCBulkCmdPanel1,
ID_CALIGN_RNA_ADD_PANEL_BUTTON12,
_(
"Add '16S-IGS-23S' to comment"), wxDefaultPosition, wxDefaultSize, 0 );
2331 m_ButtonsSizer->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2339 ITERATE(vector<string>, it, class_vals) {
2346wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
2347itemBoxSizer4->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2349wxButton* itemButton13 =
newwxButton( itemCBulkCmdPanel1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
2350itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2352wxButton* itemButton14 =
newwxButton( itemCBulkCmdPanel1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
2353itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2375 returnwxNullBitmap;
2410wxStaticText* itemStaticText11 =
newwxStaticText(
this, wxID_STATIC,
_(
"Gene Symbol"), wxDefaultPosition, wxDefaultSize, 0 );
2411 m_FieldSizer->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2413 m_Locus=
newwxTextCtrl(
this,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, -1), 0 );
2414 m_FieldSizer->Add(
m_Locus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2416wxStaticText* itemStaticText13 =
newwxStaticText(
this, wxID_STATIC,
_(
"Gene Description"), wxDefaultPosition, wxDefaultSize, 0 );
2417 m_FieldSizer->Add(itemStaticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2419 m_GeneDesc=
newwxTextCtrl(
this,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, -1), 0 );
2431 boolneed_layout =
false;
2433 while(num_items > 4) {
2434 size_tpos = num_items - 1;
2437need_layout =
true;
2448 boolneed_layout =
false;
2451wxArrayString m_NameStrings;
2452m_NameStrings.Add(
_(
"16S ribosomal RNA"));
2453m_NameStrings.Add(
_(
"18S ribosomal RNA"));
2454m_NameStrings.Add(
_(
"23S ribosomal RNA"));
2455m_NameStrings.Add(
_(
"26S ribosomal RNA"));
2456m_NameStrings.Add(
_(
"28S ribosomal RNA"));
2457m_NameStrings.Add(
_(
"5.8S ribosomal RNA"));
2458m_NameStrings.Add(
_(
"large subunit ribosomal RNA"));
2459m_NameStrings.Add(
_(
"small subunit ribosomal RNA"));
2460 m_rRNAname=
newwxComboBox(
this,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, m_NameStrings, wxCB_DROPDOWN );
2462need_layout =
true;
2475 boolneed_layout =
false;
2483 if(!buttons_shown) {
2485need_layout =
true;
2488 if(buttons_shown) {
2490need_layout =
true;
2497wxArrayString m_tRNAStrings;
2498m_tRNAStrings.Add(
_(
"A Alanine"));
2499m_tRNAStrings.Add(
_(
"B Asp or Asn"));
2500m_tRNAStrings.Add(
_(
"C Cysteine"));
2501m_tRNAStrings.Add(
_(
"D Aspartic Acid"));
2502m_tRNAStrings.Add(
_(
"E Glutamic Acid"));
2503m_tRNAStrings.Add(
_(
"F Phenylalanine"));
2504m_tRNAStrings.Add(
_(
"G Glycine"));
2505m_tRNAStrings.Add(
_(
"H Histidine"));
2506m_tRNAStrings.Add(
_(
"I Isoleucine"));
2507m_tRNAStrings.Add(
_(
"J Leu or Ile"));
2508m_tRNAStrings.Add(
_(
"K Lysine"));
2509m_tRNAStrings.Add(
_(
"L Leucine"));
2510m_tRNAStrings.Add(
_(
"M Methionine"));
2511m_tRNAStrings.Add(
_(
"N Asparagine"));
2512m_tRNAStrings.Add(
_(
"O Pyrrolysine"));
2513m_tRNAStrings.Add(
_(
"P Proline"));
2514m_tRNAStrings.Add(
_(
"Q Glutamine"));
2515m_tRNAStrings.Add(
_(
"R Arginine"));
2516m_tRNAStrings.Add(
_(
"S Serine"));
2517m_tRNAStrings.Add(
_(
"T Threonine"));
2518m_tRNAStrings.Add(
_(
"U Selenocysteine"));
2519m_tRNAStrings.Add(
_(
"V Valine"));
2520m_tRNAStrings.Add(
_(
"W Tryptophan"));
2521m_tRNAStrings.Add(
_(
"X Undetermined or atypical"));
2522m_tRNAStrings.Add(
_(
"Y Tyrosine"));
2523m_tRNAStrings.Add(
_(
"Z Glu or Gln"));
2524 m_tRNAname=
newwxChoice(
this,
wxID_ANY, wxDefaultPosition, wxDefaultSize, m_tRNAStrings, 0 );
2526need_layout =
true;
2542 m_RNAname=
newwxTextCtrl(
this,
wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, -1), 0 );
2544need_layout =
true;
2564comment +=
"contains 18S ribosomal RNA, internal transcribed spacer 1, 5.8S ribosomal RNA, internal transcribed spacer 2, and 28S ribosomal RNA";
2579comment +=
"contains 16S ribosomal RNA, 16S-23S ribosomal RNA intergenic spacer, and 23S ribosomal RNA";
2586 rna->SetExt().SetTRNA();
2591 char a= aa.c_str()[0];
2592 rna->SetExt().SetTRNA().SetAa().SetIupacaa(
a);
2631 stringrna_name =
"";
2659 for(
size_t i= 0;
i< locations.size(); ++
i)
2672 if(!seq_loc || !bsh || (seq_loc->
IsMix() && !seq_loc->
GetMix().
IsSet()))
2679 stringgene_symbol =
"";
2683 stringgene_desc =
"";
2694rna_ref->
SetExt().SetGen();
2696rna_ref->
SetExt().SetGen().SetProduct(rna_name);
2699rna_ref->
SetExt().SetGen().SetClass(ncrna_class);
2709rna_ref->
SetExt().SetName(rna_name);
2716 rna->SetData().SetRna().Assign(*rna_ref);
2719 rna->SetComment(comment);
2722 rna->SetLocation().Assign(*seq_loc);
2725 rna->SetPartial(
true);
2732new_gene->SetData().SetGene().SetLocus(gene_symbol);
2733new_gene->SetData().SetGene().SetDesc(gene_desc);
2734new_gene->SetLocation().Assign(*seq_loc);
2737new_gene->SetPartial(
true);
2777: m_Loc(align_loc), m_TopSeqEntry(seh), m_scope(&seh.
GetScope())
2796GetSizer()->SetSizeHints(
this);
2831 m_QualFeat->SetData().SetImp().SetKey(
"misc_feature");
2844wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
2845itemCBulkCmdPanel1->SetSizer(itemBoxSizer2);
2847wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
2848itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_LEFT|wxALL, 5);
2850wxBoxSizer* itemBoxSizer4 =
newwxBoxSizer(wxVERTICAL);
2851itemBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2853wxStaticText* itemStaticText5 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Feature Type"), wxDefaultPosition, wxDefaultSize, 0 );
2854itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2856wxArrayString m_FeatureTypeStrings;
2858itemBoxSizer4->Add(
m_FeatureType, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2863wxFlexGridSizer* itemFlexGridSizer8 =
newwxFlexGridSizer(0, 2, 0, 0);
2864itemBoxSizer2->Add(itemFlexGridSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2866wxStaticText* itemStaticText9 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Gene Symbol"), wxDefaultPosition, wxDefaultSize, 0 );
2867itemFlexGridSizer8->Add(itemStaticText9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2870itemFlexGridSizer8->Add(
m_Locus, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2872wxStaticText* itemStaticText11 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Gene Description"), wxDefaultPosition, wxDefaultSize, 0 );
2873itemFlexGridSizer8->Add(itemStaticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2876itemFlexGridSizer8->Add(
m_GeneDesc, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2878wxStaticText* itemStaticText13 =
newwxStaticText( itemCBulkCmdPanel1, wxID_STATIC,
_(
"Comment"), wxDefaultPosition, wxDefaultSize, 0 );
2879itemFlexGridSizer8->Add(itemStaticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2882itemFlexGridSizer8->Add(
m_Comment, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
2889itemBoxSizer2->Add(500, 0, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
2899wxBoxSizer* itemBoxSizer12 =
newwxBoxSizer(wxHORIZONTAL);
2900itemBoxSizer2->Add(itemBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
2902wxButton* itemButton13 =
newwxButton( itemCBulkCmdPanel1, wxID_OK,
_(
"Accept"), wxDefaultPosition, wxDefaultSize, 0 );
2903itemBoxSizer12->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2905wxButton* itemButton14 =
newwxButton( itemCBulkCmdPanel1, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
2906itemBoxSizer12->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2928vector<string> listed_feat;
2932listed_feat.push_back(
"Gene");
2933listed_feat.push_back(
"misc_feature");
2934existing.
insert(listed_feat[0]);
2935existing.
insert(listed_feat[1]);
2938 ITERATE(vector<const CFeatListItem *>, feat_it, featlist) {
2941 intfeat_type = item.
GetType();
2946 types[pair<int,int>(feat_type,feat_subtype)] = desc;
2947 if(existing.
find(desc) == existing.
end()) {
2949listed_feat.push_back(desc);
2955 for(
size_t i= 0;
i< listed_feat.size(); ++
i) {
2959 if(find(listed_feat.begin(), listed_feat.end(),
m_DefaultKey) != listed_feat.end()) {
2984 returnwxNullBitmap;
3017 for(
size_t i= 0;
i< locations.size(); ++
i)
3030 if(!seq_loc || !bsh || (seq_loc->
IsMix() && !seq_loc->
GetMix().
IsSet()))
3044feat->SetData().SetImp().SetKey(
key);
3046feat->SetComment(comment);
3048feat->SetLocation().Assign(*seq_loc);
3051feat->SetPartial(
true);
3059new_gene->SetData().SetGene().SetLocus(gene_symbol);
3061new_gene->SetData().SetGene().SetDesc(gene_desc);
3064new_gene->SetComment(comment);
3066new_gene->SetLocation().Assign(*seq_loc);
3069new_gene->SetPartial(
true);
3119feat.SetQual().push_back(q);
3122&& feat.GetData().GetImp().IsSetKey() && feat.GetData().GetImp().GetKey() ==
"repeat_region")
3124feat.SetData().SetImp().SetKey(
"mobile_element");
3136 string val= (*it)->GetVal();
3137 stringqual = (*it)->GetQual();
3138 if(qual ==
"locus")
3139gene.SetData().SetGene().SetLocus(
val);
3140 if(qual ==
"locus_tag")
3141gene.SetData().SetGene().SetLocus_tag(
val);
3142 if(qual ==
"allele")
3143gene.SetData().SetGene().SetAllele(
val);
3145gene.SetData().SetGene().SetMaploc(
val);
3146 if(qual ==
"gene_synonym")
3147gene.SetData().SetGene().SetSyn().push_back(
val);
bool IsReverse(ENa_strand s)
ENa_strand Reverse(ENa_strand s)
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
static bool s_IsRNAFeature(int feat_subtype)
static void s_SettRNAProduct(string aa, CRef< CRNA_ref > rna)
#define ID_CALIGN_RNA_ADD_PANEL_COMBOBOX
#define ID_SHOW_FEATURES_ALIGNMENT_ASSISTANT_MENU
#define ID_SHOW_SUBSTITUTE_ALIGNMENT_ASSISTANT_MENU
#define ID_GOTO_ALIGNMENT_ASSISTANT_BUTTON
#define ID_EDIT_REV_STRANDS_ALIGNMENT_ASSISTANT_MENU
#define ID_EDIT_RM_SEQ_ALIGNMENT_ASSISTANT_MENU
#define ID_ALIGNCDSADD_COMMENT
#define SYMBOL_CALIGNCDSADDPANEL_TITLE
#define ID_CALIGN_RNA_ADD_PANEL_TEXTCTRL10
#define ID_ALIGNCDSADD_GENE_DESC
#define ID_EDIT_PROPAGATE_ALIGNMENT_ASSISTANT_MENU
#define SYMBOL_CALIGN_RNA_ADD_PANEL_TITLE
#define ID_ADD_ALIGN_RNA_ALIGNMENT_ASSISTANT_MENU
#define ID_CALIGN_OTHER_ADDPANEL_TEXTCTRL12
#define ID_ALIGNCDSADD_PROTEIN_NAME
#define ID_EXPORT_CONT_ALIGNMENT_ASSISTANT_MENU
#define ID_CLOSE_ALIGNMENT_ASSISTANT_BUTTON
#define ID_CALIGN_OTHER_ADDPANEL_FEATURE_TYPE_LISTBOX
#define ID_EDIT_VALIDATE_ALIGNMENT_ASSISTANT_MENU
#define ID_ALIGNCDSADD_PROTEIN_DESC
#define ID_CALIGN_RNA_ADD_PANEL_BUTTON11
#define ID_ALIGNCDSADD_GENE_NAME
#define ID_ADD_ALIGN_OTHER_ALIGNMENT_ASSISTANT_MENU
#define ID_EXPORT_INTER_ALIGNMENT_ASSISTANT_MENU
#define ID_GOTO_SEQ_ALIGNMENT_ASSISTANT_BUTTON
#define ID_CALIGN_RNA_ADD_PANEL_BUTTON12
#define ID_CALIGN_OTHER_ADDPANEL_TEXTCTRL11
#define ID_CALIGN_OTHER_ADDPANEL_TEXTCTRL14
#define SYMBOL_CALIGN_OTHER_ADDPANEL_TITLE
#define ID_ADD_ALIGN_CDS_ALIGNMENT_ASSISTANT_MENU
#define ID_CALIGN_RNA_ADD_PANEL_CHOICE1
@ eCmdCreateMobileElement
@ eCmdCreateMiscStructure
@ eCmdCreateBiosourceFeat
@ eCmdCreatePrimTranscript
@ eCmdCreateCommentDescriptor
@ eCmdCreatePubFeatureLabeled
@ eCmdCreateTransitPeptide
@ eCmdCreateSecondaryStructure
@ eCmdCreateMiscDifference
bool IsGeneralIdProtPresent(objects::CSeq_entry_Handle tse)
CRef< CGenetic_code > GetGeneticCodeForBioseq(CBioseq_Handle bh)
GetGeneticCodeForBioseq A function to construct the appropriate CGenetic_code object to use when cons...
bool m_create_general_only
void CreateControls()
Creates the controls and sizers.
void AddOneCommand(const objects::CBioseq_Handle &bsh, CRef< CSeq_loc > seq_loc, CRef< CCmdComposite > cmd)
wxTextCtrl * m_GeneDescription
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
~CAlignCDSAddPanel()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
wxTextCtrl * m_ProteinName
wxTextCtrl * m_GeneSymbol
CAlignCDSAddPanel()
Constructors.
void Init()
Initialises member variables.
wxTextCtrl * m_ProteinDescription
static bool ShowToolTips()
Should we show tooltips?
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CLocationPanel * m_Location
CRef< CCmdComposite > GetCommand()
wxListBox * m_FeatureType
CGBQualPanel * m_GBQualPanel
CRef< CCmdComposite > GetCommand()
void Init()
Initialises member variables.
CAlignOtherAddPanel()
Constructors.
CLocationPanel * m_Location
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void x_ChangeFeatureType(const string &key)
void x_AddQuals(objects::CSeq_feat &feat)
CSeq_entry_Handle m_TopSeqEntry
void CreateControls()
Creates the controls and sizers.
static bool ShowToolTips()
Should we show tooltips?
CRef< objects::CSeq_feat > m_QualFeat
wxBoxSizer * m_GBQualSizer
~CAlignOtherAddPanel()
Destructor.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void x_AddGeneQuals(objects::CSeq_feat &gene)
void AddOneCommand(const objects::CBioseq_Handle &bsh, CRef< CSeq_loc > seq_loc, CRef< CCmdComposite > cmd)
void OnFeatureTypeListboxSelected(wxCommandEvent &event)
wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_FEATURE_TYPE_LISTBOX
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void CreateControls()
Creates the controls and sizers.
wxBoxSizer * m_RNANameSizer
CLocationPanel * m_Location
bool x_RemoveGeneFields()
void OnAdd18SToComment(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON11
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void AddOneCommand(const objects::CBioseq_Handle &bsh, CRef< CSeq_loc > seq_loc, CRef< CCmdComposite > cmd)
wxFlexGridSizer * m_FieldSizer
wxComboBox * m_ncRNAClass
wxBoxSizer * m_ButtonsSizer
CAlignRNAAddPanel()
Constructors.
static bool ShowToolTips()
Should we show tooltips?
objects::CRNA_ref::TType x_GetRnaType()
~CAlignRNAAddPanel()
Destructor.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
void OnSelectRNAType(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE1
void Init()
Initialises member variables.
void OnAdd16StoComment(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON12
CRef< CCmdComposite > GetCommand()
void OnTarget(wxCommandEvent &event)
CRef< CSeq_align > AdjustAlign(int from, int to, const vector< int > &offset, CRef< CCmdComposite > cmd)
void OnGoTo(wxCommandEvent &event)
void TrimQualityScores(CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > command)
vector< vector< pair< string, CSeqFeatData::ESubtype > > > m_FeatTypes
void OnValidate(wxCommandEvent &event)
void OnExportCont(wxCommandEvent &event)
void IsNucleotide(wxUpdateUIEvent &event)
void AdjustBioseq(CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > cmd)
vector< vector< vector< pair< TSeqPos, TSeqPos > > > > m_FeatRanges
void OnRemoveSeqFromAlign(wxCommandEvent &)
wxMenu * m_target_submenu
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void AdjustFeatureLocations(CBioseq_Handle bsh, int from, int to, CRef< CCmdComposite > cmd)
void OnAddAlignCDS(wxCommandEvent &)
void OnFeatures(wxCommandEvent &event)
static bool ShowToolTips()
Should we show tooltips?
void OnExportInter(wxCommandEvent &event)
CPaintAlignment * m_Panel
void IsSelectionAndClean(wxUpdateUIEvent &event)
void OnReverseStrand(wxCommandEvent &)
wxTextCtrl * m_GoTo_TextCtrl
ICommandProccessor * m_CmdProcessor
vector< string > m_Labels
CSeq_entry_Handle m_TopSeqEntry
void OnAddAlignRNA(wxCommandEvent &)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
CRef< CSeq_loc > AdjustLoc(const CSeq_loc &feat_loc, int from, int to, bool &modified, bool &removed)
virtual ~CAlignmentAssistant()
Destructor.
void OnAddAlignOther(wxCommandEvent &)
void GetAlignment(CConstRef< CSeq_align > align)
void ReportPos(int pos, const string &label)
void CreateControls()
Creates the controls and sizers.
CSeq_align_Handle m_Alignment
void CreateFeature(wxCommandEvent &event)
void Init()
Initialises member variables.
void OnSubstitute(wxCommandEvent &event)
void TranslateLocations(CRef< CSeq_loc > loc, vector< pair< CRef< CSeq_loc >, CBioseq_Handle > > &locations)
CAlignmentAssistant()
Constructors.
void OnPropagateFeatures(wxCommandEvent &)
bool x_ExecuteCommand(IEditCommand *command)
vector< vector< CBioseq_Handle::EVectorStrand > > m_FeatStrand
void ReportUnresolvedBioseqs(void)
wxTextCtrl * m_GoToSeq_TextCtrl
void ReportRange(int pos1, int pos2, const string &label)
void OnClose(wxCommandEvent &event)
void OnGoToSeq(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Alignment Assistant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(775, 595), long style=wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
static CRef< objects::CSeq_feat > MakeDefaultFeature(objects::CSeqFeatData::ESubtype subtype)
static objects::CSeqFeatData::ESubtype GetFeatTypeFromCmdID(int cmd_id)
const CSeq_id & GetSeq_id(TDim row) const
void SetEditorWindow(wxWindow *editorWindow)
void SetEditor(CIRef< IEditObject > editor)
CFeatListItem - basic configuration data for one "feature" type.
string GetDescription() const
static bool s_IsRarelyUsedOrDiscouragedFeatureType(int subtype)
static wxString GetDialogFilter(EFileType fileType)
virtual bool TransferDataToWindow()
virtual bool TransferDataFromWindow()
void PopulateGBQuals(objects::CSeq_feat &seq_feat)
@Gb_qual.hpp User-defined methods of the data storage class.
void SetText(const wxString &text)
CRef< CInt_fuzz > Negative(TSeqPos n) const
virtual bool TransferDataFromWindow()
CRef< objects::CSeq_loc > GetSeq_loc() const
virtual bool TransferDataToWindow()
int AlignPosToSeqPos(int pos, int row, bool left) const
static string GetSeqTitle(CBioseq_Handle bsh)
pair< int, int > GetSelection(int row)
void SetAlign(CSeq_align_Handle ah)
void EnableSubstitute(bool enable)
void EnableFeatures(bool enable)
pair< int, int > GetAlignSelection(void)
size_t GetTotalLength() const
void UpdateFeatures(const vector< vector< vector< pair< TSeqPos, TSeqPos > > > > &feat_ranges, const vector< vector< pair< string, objects::CSeqFeatData::ESubtype > > > &feat_types, const vector< vector< objects::CBioseq_Handle::EVectorStrand > > &feat_strand)
static vector< string > GetncRNAClassList()
@RNA_ref.hpp User-defined methods of the data storage class.
static EFeatureLocationAllowed AllowedFeatureLocation(ESubtype subtype)
@ eFeatureLocationAllowed_NucOnly
@ eFeatureLocationAllowed_ProtOnly
ESubtype GetSubtype(void) const
static bool IsRegulatory(ESubtype subtype)
Non-const iterator over CSeqMap (allows to edit the sequence).
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
namespace ncbi::objects::
Seq-loc iterator class â iterates all intervals from a seq-loc in the correct order.
Seq-loc iterator class â iterates all intervals from a seq-loc in the correct order.
static CUICommandRegistry & GetInstance()
the main instance associated with the application
wxMenu * CreateMenu(const SwxMenuItemRec *items)
create a menu from a static definition (see WX_*_MENU macros)
static const string & ConvertSeverity(EDiagSev sev)
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
Interface (functor) for object editing.
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
CRef< objects::CSeq_entry > CreateTranslatedProteinSequence(CRef< objects::CSeq_feat > cds, objects::CBioseq_Handle nuc_h, bool create_general_only, int *offset=nullptr)
CRef< objects::CSeq_feat > AddProteinFeatureToProtein(CRef< objects::CSeq_entry > protein, bool partial5, bool partial3)
static const char si[8][64]
std::ofstream out("events_result.xml")
main entry point for tests
static void cleanup(void)
static const char * str(char *buf, int n)
static const struct type types[]
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int TSignedSeqPos
Type for signed sequence position.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
vector< const objects::CFeatListItem * > GetSortedFeatList(objects::CSeq_entry_Handle seh, size_t max=numeric_limits< size_t >::max())
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
string GetLabel(const CSeq_id &id)
@ eContent
Untagged human-readable accession or the like.
CRef< CSeq_loc > MakeSeq_loc(EMakeType make_type=eMake_CompactType) const
return constructed CSeq_loc with all changes
void Rewind(void)
Reset the iterator to the initial state.
void SetFrom(TSeqPos from)
Set the range from position.
void SetTo(TSeqPos to)
Set the range to position.
void Delete(void)
Delete current element, and make iterator to point to the next element.
ENa_strand GetStrand(void) const
Get the location's strand.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
void ResetFuzzTo(void)
Reset fuzz to.
void ResetFuzzFrom(void)
Reset fuzz from.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
void SetStrand(ENa_strand strand)
Set the range strand.
bool HasChanges(void) const
return true of any part was changed since initialization
const CInt_fuzz * GetFuzzFrom(void) const
const CInt_fuzz * GetFuzzTo(void) const
void SetFuzzTo(CInt_fuzz &fuzz)
Change fuzz to values.
bool IsEmpty(void) const
True if the current location is empty.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
size_t GetSize(void) const
Get number of ranges.
TRange GetRange(void) const
Get the range.
void SetFuzzFrom(CInt_fuzz &fuzz)
Change fuzz from.
ENa_strand GetStrand(void) const
TSeqPos GetStop(ESeqLocExtremes ext) const
@ fFGL_Content
Include its content if there is any.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool IsNucleotide(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
TSeqPos GetBioseqLength(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
const CSeq_align::TSegs & GetSegs(void) const
CConstRef< CSeq_align > GetSeq_align(void) const
Get const reference to current seq-align.
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
CScope & GetScope(void) const
Get scope this handle belongs to.
CScope & GetScope(void) const
Get scope this handle belongs to.
CRef< CSeq_loc > GetRangeSeq_loc(TSeqPos start, TSeqPos stop, ENa_strand strand=eNa_strand_unknown) const
Return CSeq_loc referencing the given range and strand on the bioseq If start == 0,...
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to the seq-annot.
@ eStrand_Plus
Plus strand.
@ eStrand_Minus
Minus strand.
CSeqMap_I & Remove(void)
Remove current segment.
void GetSequence(string &buffer, CSeqUtil::ECoding buffer_coding) const
Get current sequence as a string with the selected encoding.
const CSeq_loc & GetLocation(void) const
SSeqMapSelector & SetFlags(TFlags flags)
Select segment type(s)
void SetSequence(const string &buffer, CSeqUtil::ECoding buffer_coding, CSeq_data::E_Choice seq_data_coding)
Set sequence data.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_graph & GetOriginalGraph(void) const
Get original graph with unmapped location/product.
TSeqPos GetLength(void) const
return length of current segment
CSeq_graph_Handle GetSeq_graph_Handle(void) const
Get original graph handle.
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
static string & ToUpper(string &str)
Convert string to upper case â string& version.
static const char label[]
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TAnticodon & GetAnticodon(void) const
Get the Anticodon member data.
bool IsTRNA(void) const
Check if variant TRNA is selected.
bool IsSetAnticodon(void) const
location of anticodon Check if a value has been assigned to Anticodon data member.
EType
type of RNA feature
void SetExt(TExt &value)
Assign a value to Ext data member.
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
void SetType(TType value)
Assign a value to Type data member.
const TExt & GetExt(void) const
Get the Ext member data.
const TTRNA & GetTRNA(void) const
Get the variant data.
@ eType_ncRNA
non-coding RNA; subsumes snRNA, scRNA, snoRNA
bool IsSetLens(void) const
lengths in ids order within segs Check if a value has been assigned to Lens data member.
const TDenseg & GetDenseg(void) const
Get the variant data.
bool IsSetDim(void) const
dimensionality Check if a value has been assigned to Dim data member.
TLens & SetLens(void)
Assign a value to Lens data member.
bool IsSetNumseg(void) const
number of segments here Check if a value has been assigned to Numseg data member.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetStrands(void) const
Check if a value has been assigned to Strands data member.
void ResetSegs(void)
Reset Segs data member.
const TStarts & GetStarts(void) const
Get the Starts member data.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
vector< ENa_strand > TStrands
const TLens & GetLens(void) const
Get the Lens member data.
void SetDim(TDim value)
Assign a value to Dim data member.
vector< TSignedSeqPos > TStarts
void SetDim(TDim value)
Assign a value to Dim data member.
vector< CRef< CSeq_id > > TIds
TDim GetDim(void) const
Get the Dim member data.
TStarts & SetStarts(void)
Assign a value to Starts data member.
TStrands & SetStrands(void)
Assign a value to Strands data member.
bool IsSetStarts(void) const
start OFFSETS in ids order within segs Check if a value has been assigned to Starts data member.
void SetNumseg(TNumseg value)
Assign a value to Numseg data member.
const TIds & GetIds(void) const
Get the Ids member data.
TNumseg GetNumseg(void) const
Get the Numseg member data.
TIds & SetIds(void)
Assign a value to Ids data member.
const TStrands & GetStrands(void) const
Get the Strands member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
bool IsSetIds(void) const
sequences in order Check if a value has been assigned to Ids data member.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
vector< CRef< CGb_qual > > TQual
const TQual & GetQual(void) const
Get the Qual member data.
const TRna & GetRna(void) const
Get the variant data.
bool IsRna(void) const
Check if variant Rna is selected.
@ eFrame_not_set
not set, code uses one
bool IsMix(void) const
Check if variant Mix is selected.
ENa_strand
strand of nucleic acid
E_Choice Which(void) const
Which variant is currently selected.
bool IsSet(void) const
Check if a value has been assigned to data member.
const TMix & GetMix(void) const
Get the variant data.
bool IsPnt(void) const
Check if variant Pnt is selected.
@ e_not_set
No variant selected.
@ e_Empty
to NULL one Seq-id in a collection
bool IsSetComp(void) const
compression (residues/value) Check if a value has been assigned to Comp data member.
bool IsSetLoc(void) const
region this applies to Check if a value has been assigned to Loc data member.
void ResetValues(void)
Reset Values data member.
TValues & SetValues(void)
Assign a value to Values data member.
TByte & SetByte(void)
Select the variant.
const TInt & GetInt(void) const
Get the variant data.
void SetNumval(TNumval value)
Assign a value to Numval data member.
TReal & SetReal(void)
Select the variant.
TInt & SetInt(void)
Select the variant.
const TGraph & GetGraph(void) const
Get the Graph member data.
TValues & SetValues(void)
Assign a value to Values data member.
const TValues & GetValues(void) const
Get the Values member data.
const TByte & GetByte(void) const
Get the variant data.
void SetGraph(TGraph &value)
Assign a value to Graph data member.
const TReal & GetReal(void) const
Get the variant data.
void ResetValues(void)
Reset Values data member.
void ResetLoc(void)
Reset Loc data member.
const TValues & GetValues(void) const
Get the Values member data.
void ResetValues(void)
Reset Values data member.
E_Choice Which(void) const
Which variant is currently selected.
const TValues & GetValues(void) const
Get the Values member data.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
TComp GetComp(void) const
Get the Comp member data.
TValues & SetValues(void)
Assign a value to Values data member.
const TSeq & GetSeq(void) const
Get the variant data.
const TInst & GetInst(void) const
Get the Inst member data.
@ e_Iupacna
IUPAC 1 letter nuc acid code.
@ e_Iupacaa
IUPAC 1 letter amino acid code.
CMinPanelContainer::OnRestoreWindow EVT_UPDATE_UI_RANGE(eCmdCloseDockPanel, eCmdWindowRestore, CMinPanelContainer::OnUpdateWindowCommand) CMinPanelContainer
void ReportUsage(const wxString &dialog_name)
Report opening & accepting events in the editing package.
constexpr bool empty(list< Ts... >) noexcept
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
#define EDIT_EACH_CODEBREAK_ON_CDREGION(Itr, Var)
#define ERASE_CODEBREAK_ON_CDREGION(Itr, Var)
ERASE_CODEBREAK_ON_CDREGION.
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
Selector used in CSeqMap methods returning iterators.
#define WX_DEFINE_MENU(name)
New macros for defining menus for use with CUICommandRegistry.
#define WX_SUBMENU(label)
#define WX_MENU_ITEM(cmd)
#define WX_MENU_ITEM_INT(cmd)
wxString ToWxString(const string &s)
string ToStdString(const wxString &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