wxMessageDialog msgdlg(
NULL, message,
_(
"Debug") );
154m_pParentWindow =
NULL;
161wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle )
162: m_TopSeqEntry(seh),
163m_CmdProcessor(cmdProcessor),
164m_pParentWindow(parent)
176wxWindowID
id,
constwxPoint& pos,
constwxSize&
size,
longstyle )
179wxPanel::Create( parent,
id, pos,
size, style );
185GetSizer()->SetSizeHints(
this);
225wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
226itemPanel1->SetSizer(itemBoxSizer2);
231wxBoxSizer* sizerLabels =
newwxBoxSizer(wxHORIZONTAL);
232wxStaticText* matches =
233 newwxStaticText(
this,
wxID_ANY,
_(
"Sequences with Vector Match"),
234wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_VERTICAL );
235wxStaticText* locations =
236 newwxStaticText(
this,
wxID_ANY,
_(
"Location of Vector Match"),
237wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_VERTICAL );
238sizerLabels->Add(matches, 1, wxEXPAND|wxALL, 5);
239sizerLabels->Add(locations, 1, wxEXPAND|wxALL, 5);
240itemBoxSizer2->Add(sizerLabels, 0, wxEXPAND|wxALL, 5);
245wxLC_REPORT | wxLC_SINGLE_SEL );
251dwStyle |= LVS_EX_FULLROWSELECT;
252::SendMessage((
HWND)
m_listMatches->GetHandle(), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
265wxLC_REPORT | wxLC_SINGLE_SEL );
277wxBoxSizer* sizerSearchVector =
newwxBoxSizer(wxHORIZONTAL);
283itemBoxSizer2->Add(sizerSearchVector, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
286wxBoxSizer* sizerFindText =
newwxBoxSizer(wxHORIZONTAL);
287wxStaticText* findtext =
288 newwxStaticText(
this,
wxID_ANY,
_(
"Find Text"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE_HORIZONTAL );
289sizerFindText->Add(findtext, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
291sizerFindText->Add(
m_textFind, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
296itemBoxSizer2->Add(sizerFindText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
299wxArrayString buttons;
300buttons.Add(
_(
"Internal, 5', 3'"));
301buttons.Add(
_(
"Strength"));
302buttons.Add(
_(
"Marked"));
303buttons.Add(
_(
"Accession"));
305buttons, 0, wxRA_SPECIFY_COLS );
306itemBoxSizer2->Add(
m_radioBoxSort, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
309wxArrayString buttons2;
310buttons2.Add(
_(
"Trim to closest end"));
311buttons2.Add(
_(
"Trim to 5' end"));
312buttons2.Add(
_(
"Trim to 3' end"));
314 _(
"Internal Trim Options"),
315wxDefaultPosition, wxDefaultSize,
316buttons2, 0, wxRA_SPECIFY_COLS );
320wxBoxSizer* sizerSelectResults =
newwxBoxSizer(wxHORIZONTAL);
322sizerSelectResults->Add(
m_buttonSelectAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
331itemBoxSizer2->Add(sizerSelectResults, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
333 m_CitSub=
newwxCheckBox(
this,
wxID_ANY,
_(
"Add CitSub Update to trimmed sequences"), wxDefaultPosition, wxDefaultSize, 0 );
335itemBoxSizer2->Add(
m_CitSub, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
338wxBoxSizer* sizerTrimSelected =
newwxBoxSizer(wxHORIZONTAL);
345sizerTrimSelected->Add(
m_buttonDismiss, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
346itemBoxSizer2->Add(sizerTrimSelected, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
352 if(!wxPanel::TransferDataToWindow())
362 if(!wxPanel::TransferDataFromWindow())
473vecscreenReport->Show();
554 const TCuts& sorted_cuts)
570 for(
const auto& cut : sorted_cuts) {
571 if(cut.m_range.GetTo() == right_pos) {
572right_pos = cut.m_range.GetFrom() - 1;
575 if(cut.m_range.GetFrom() == left_pos) {
576left_pos = cut.m_range.GetTo() + 1;
5841 + (right_pos - left_pos));
585 for(; seqmap_ci; ++seqmap_ci) {
586 switch(seqmap_ci.
GetType()) {
596 if(pOriginalGapSeqLiteral) {
597pNewGapLiteral->Assign(*pOriginalGapSeqLiteral);
599 if(!bIsLengthKnown) {
602pNewGapLiteral->SetLength(uGapLength);
603pDeltaSeq->SetLiteral(*pNewGapLiteral);
618pDeltaSeq->SetLiteral().SetLength(seqmap_ci.
GetLength());
619pDeltaSeq->SetLiteral().SetSeq_data(*pSeqData);
633inst->
SetLength(1 + (right_pos - left_pos));
634 if(pDeltaExt->
Set().size() == 1) {
638 CSeq_data& seq_data = pDeltaSeq->SetLiteral().SetSeq_data();
643inst->
SetExt().SetDelta(*pDeltaExt);
665 TSeqPoscut_size = cut_to - cut_from + 1;
668 if(feat_to < cut_from)
675 if(feat_from >= cut_from && feat_to <= cut_to)
678bCompleteCut =
true;
683 if(feat_from > cut_to)
686feat_from -= cut_size;
688interval->
SetFrom(feat_from);
689interval->
SetTo(feat_to);
704 if(feat_to > cut_to) {
710feat_to = cut_from - 1;
714 if(feat_from >= cut_from) {
715feat_from = cut_to + 1;
716feat_from -= cut_size;
719interval->
SetFrom(feat_from);
720interval->
SetTo(feat_to);
733 switch(loc->
Which())
741bCompleteCut, bTrimmed);
751 if(intervals->CanGet()) {
753CPacked_seqint::Tdata::iterator it;
754 for(it = intervals->Set().begin();
755it != intervals->Set().end(); )
761 if(it == intervals->Set().begin()) {
762bCompleteCut =
true;
765 boolbDeleted =
false;
771it = intervals->Set().erase(it);
775bCompleteCut =
false;
789mix->Assign(loc->
GetMix());
792CSeq_loc_mix::Tdata::iterator it;
793 for(it = mix->Set().begin();
794it != mix->Set().end(); )
800 if(it == mix->Set().begin()) {
801bCompleteCut =
true;
804 boolbDeleted =
false;
809it = mix->Set().erase(it);
813bCompleteCut =
false;
833 const TCuts& sorted_cuts,
835 bool& bFeatureDeleted,
836 bool& bFeatureTrimmed,
840 for(
intii = 0; ii < sorted_cuts.size(); ++ii)
852bFeatureDeleted, bFeatureTrimmed);
857 if(bFeatureDeleted) {
867 x_SeqLocDelete(new_product, from, to, seqid, bProdDeleted, bProdTrimmed);
879 for(
intii = 0; ii < cuts.size(); ++ii)
886 if(from != 0 && to != seq_length-1) {
889 if(from - 0 < seq_length-1 - to) {
916 for(it = sorted_cuts.begin(); it != sorted_cuts.end(); )
923 if( it+1 != sorted_cuts.end() ) {
928 if( next_from <= (to + 1) ) {
932sorted_cuts.erase(it+1);
989 if( !new_protein_bioseq ) {
996 command->AddCommand(*chgInst);
1000 CFeat_CIprot_feat_ci(prot_bsh, sel);
1001 for( ; prot_feat_ci; ++prot_feat_ci ) {
1014 command->AddCommand(*chgFeat);
1026 for(seg = 0; seg < denseg.
GetNumseg(); ++seg) {
1030 if(pos >= start && pos < start +
len) {
1060 if(pos == seg_start) {
1107 TSeqPosfirst_len, second_len;
1111first_len = pos - seg_start;
1112second_len = denseg.
GetLens()[foundseg] - first_len;
1115second_len = pos - seg_start;
1116first_len = denseg.
GetLens()[foundseg] - second_len;
1123 if(denseg.
GetStarts()[index] == -1) {
1124new_denseg->
SetStarts().push_back(-1);
1137new_denseg->
SetLens().push_back(first_len);
1141 if(denseg.
GetStarts()[index] == -1) {
1142new_denseg->
SetStarts().push_back(-1);
1155new_denseg->
SetLens().push_back(second_len);
1181align->
SetSegs().SetDenseg(*new_denseg);
1187 const TCuts& sorted_cuts)
1189 for(
intii = 0; ii < sorted_cuts.size(); ++ii)
1195 TSeqPoscut_len = cut_to - cut_from + 1;
1196 if(cut_to < cut_from) {
1197cut_len = cut_from - cut_to + 1;
1213 if(seg_start < 0) {
1216 else if(seg_start < cut_from) {
1219 else if(seg_start >= cut_from &&
1220seg_start + denseg.
GetLens()[curseg] <= cut_from + cut_len) {
1222align->
SetSegs().SetDenseg().SetStarts()[index] = -1;
1226align->
SetSegs().SetDenseg().SetStarts()[index] -= cut_len;
1234 const autonum_cuts = sorted_cuts.size();
1235 _ASSERT(num_cuts == 1 || num_cuts == 2);
1238 const auto& first_cut = sorted_cuts[0].m_range;
1239 if(num_cuts == 1) {
1240 if(first_cut.GetFrom() == 0) {
1241range.
SetFrom(first_cut.GetTo() + 1);
1242range.
SetTo(seqLength - 1);
1246range.
SetTo(first_cut.GetFrom() - 1);
1252 _ASSERT(first_cut.GetFrom() > 0);
1253range.
SetTo(first_cut.GetFrom() - 1);
1254range.
SetFrom(sorted_cuts[1].m_range.GetTo() + 1);
1287 command->AddCommand(*chgInst);
1296copy_id->
Assign(*seqid);
1299 CFeat_CIfeat_ci(scope, *search_loc, feat_sel);
1300 for(; feat_ci; ++feat_ci)
1307 boolbFeatureDeleted =
false;
1310 boolbFeatureTrimmed =
false;
1312 boolbProdDeleted =
false;
1313 boolbProdTrimmed =
false;
1317bFeatureDeleted, bFeatureTrimmed,
1318bProdDeleted, bProdTrimmed);
1320 if(bFeatureDeleted) {
1323 command->AddCommand(*delFeat);
1341 command->AddCommand(*delProt);
1346 if(bFeatureTrimmed) {
1355 autonew_frame = sequence::CFeatTrim::GetCdsFrame(feat_ci->
GetOriginalFeature(), retainedRange);
1356new_feat->
SetData().SetCdregion().SetFrame(new_frame);
1378 command->AddCommand(*chgFeat);
1389 if(changedORadded_citsub) {
1390 if(changedSeqdesc && seh_for_desc) {
1392 command->AddCommand(*change_cmd);
1394 else if(!changedSeqdesc) {
1403 command->AddCommand(*cmdAddDesc);
1421 sort(sorted_cuts.begin(), sorted_cuts.end(), asc);
1437 sort(sorted_cuts.begin(), sorted_cuts.end(), descend);
1447 for(; align_ci; ++align_ci)
1469 for(cit = trimOnly.
begin(); cit != trimOnly.
end(); ++cit)
1471 const CSeq_id* seqid = cit->first;
1477 for(
intii = 0; ii < ids.size(); ++ii) {
1478 if( ids[ii]->Match(*seqid) ) {
1496 command->AddCommand(*chgAlign);
1503 command->AddCommand(*delAlign);
1510 const TCuts& sorted_cuts,
1513 for(
intii = 0; ii < sorted_cuts.size(); ++ii)
1522new_loc->Assign(new_graph->
GetLoc());
1523 boolbDeleted =
false;
1524 boolbTrimmed =
false;
1526new_graph->
SetLoc(*new_loc);
1546 for(
intii = 0; ii < sorted_cuts.size(); ++ii)
1554 if( trim_start <= to ) {
1555trim_start = to + 1;
1561 if( trim_stop >= from ) {
1562trim_stop = from - 1;
1571 const TCuts& sorted_cuts,
1584 TSeqPoscopy_start = graph_start;
1585 if(trim_start > graph_start) {
1586copy_start = trim_start;
1588 TSeqPoscopy_stop = graph_stop;
1589 if(trim_stop < graph_stop) {
1590copy_stop = trim_stop;
1598 switch( src_data.
Which() ) {
1607copy_start -= graph_start;
1608copy_stop -= graph_start;
1618new_graph->
SetNumval(copy_stop - copy_start + 1);
1634 for(; graph_ci; ++graph_ci)
1650 for(cit = trimOnly.
begin(); cit != trimOnly.
end(); ++cit)
1652 const CSeq_id* seqid = cit->first;
1656 if( graph.
GetLoc().GetId()->Match(*seqid) ) {
1666 command->AddCommand(*chgGraph);
1682 if(sorted_cuts.empty()) {
1688 if(sorted_cuts.size() == 1) {
1692 if(from == 0 && to == seq_length - 1) {
1704 for(
intii = 0; ii < sorted_cuts.size(); ++ii)
1717 if(from > max_to + 1) {
1722min_from =
min(min_from, from);
1723max_to =
max(max_to, to);
1727 if(min_from == 0 && max_to == seq_length - 1) {
1745 for(cit = seqidSummary.
begin(); cit != seqidSummary.
end(); ++cit)
1747 const CSeq_id* seqid = cit->first;
1761 sort(sorted_cuts.begin(), sorted_cuts.end(), asc);
1803 command->AddCommand(*delSet);
1809 command->AddCommand(*delSeq);
1827 if( !completeDeletions.
empty() ) {
1831header <<
"The following "<< completeDeletions.
size()
1832<<
" sequences are 100% matches to vector and \n" 1833<<
"will be deleted from your submission:";
1838 for(cit = completeDeletions.
begin(); cit != completeDeletions.
end(); ++cit)
1840 const CSeq_id* seqid = cit->first;
1848footer <<
"Do you want to continue?";
1851 if( listReport->ShowModal() == wxID_CANCEL ) {
1863 for(cit = completeDeletions.
begin(); cit != completeDeletions.
end(); ++cit)
1865 const CSeq_id* seqid = cit->first;
1872 for(cit = trimOnly.
begin(); cit != trimOnly.
end(); ++cit)
1874 const CSeq_id* seqid = cit->first;
1891 if(!report.IsEmpty()) {
1897 _(
"Trimmed Location(s)"),
1902vecscreenReport->Show();
1938 constwxWindowID
id,
1940 constwxSize&
size,
1955 constwxSize &
size,
1972InsertColumn( 0,
_(
"Select"), wxLIST_FORMAT_LEFT);
1973InsertColumn( 1,
_(
"Location"), wxLIST_FORMAT_LEFT);
1974InsertColumn( 2,
_(
"Seqid"), wxLIST_FORMAT_LEFT );
1975InsertColumn( 3,
_(
"Match"), wxLIST_FORMAT_LEFT );
2003 return _(
"5' End");
2007 return _(
"Internal");
2013ss <<
_(
"Internal: ") << start <<
_(
" from 5' end, ")
2014<< hitloc.
m_SeqLen- stop <<
_(
" from 3' end");
2015 return _( ss.str() );
2018 return _(
"3' End");
2020 return _(
"Unknown");
2034stringstream ssMatchType;
2035 for(
intii = 0; ii < hitloc.
m_matches.size(); ++ii)
2039ssMatchType <<
"; ";
2041ssMatchType << hitloc.
m_matches[ii].m_match_type;
2043 return _( ssMatchType.str() );
2079SetItem(
row, col,
_(
"No vector contamination found"));
2083GetColumn(col, objcol);
2084objcol.SetWidth(450);
2085SetColumn(col, objcol);
2093GetColumn(col, objcol);
2094objcol.SetWidth(50);
2095SetColumn(col, objcol);
2111seqidSummaryBySeqid.
clear();
2112TVecscreenSummaryByLocation::const_iterator cit;
2113 for(cit = seqidSummaryByLocation.begin(); cit != seqidSummaryByLocation.end(); ++cit) {
2122pair<TVecscreenSummaryBySeqid::iterator, bool> ins_res =
2126 if(!ins_res.second) {
2137 constvector<SRangeMatch>& sorted_matches,
2141 if(sorted_matches.empty()) {
2147 static const TSeqPoskTerminalLenFromEnd = 50;
2149 const TSeqPosloc_start = sorted_matches[0].m_range.GetFrom();
2150 const TSeqPosloc_stop = sorted_matches[sorted_matches.size()-1].m_range.GetTo();
2151 if(loc_start < kTerminalLenFromEnd) {
2155 if(vecres.
m_SeqLen- loc_stop < kTerminalLenFromEnd) {
2164 boolselected =
true;
2171seqidSummaryByLocation.push_back(hits);
2184seqidSummaryByLocation.clear();
2186 for(cit = vecscreen_summary.
begin(); cit != vecscreen_summary.
end(); ++cit) {
2187 const CSeq_id* seqid = cit->first;
2196 intprevious_to = -99;
2197vector<SRangeMatch> previous_matches;
2201 if(
match.m_range.GetFrom() <= previous_to+1) {
2204previous_matches.push_back(
match);
2208vector<SRangeMatch> current_matches;
2209current_matches.push_back(
match);
2212 x_InsertMatches(seqidSummaryByLocation, previous_matches, seqid, vecres);
2215previous_matches.swap(current_matches);
2218previous_to =
match.m_range.GetTo();
2222 x_InsertMatches(seqidSummaryByLocation, previous_matches, seqid, vecres);
2230report <<
_(
"No vector contamination found");
2235TVecscreenSummaryByLocation::const_iterator cit;
2253 sort(seqidSummaryByLocation.begin(), seqidSummaryByLocation.end(),
cmp);
2255TVecscreenSummaryByLocation::const_iterator cit;
2256 for(cit = seqidSummaryByLocation.begin(); cit != seqidSummaryByLocation.end(); ++cit)
2258 if(cit->m_Selected && !cit->m_matches.empty()) {
2260report << cit->m_FastaSeqid <<
_(
":");
2262 const SRangeMatch& firstrange = cit->m_matches[0];
2263 const SRangeMatch& lastrange = cit->m_matches[cit->m_matches.size()-1];
2273 TSeqPosseq_length = cit->m_SeqLen;
2274 if(from != 0 && to != seq_length-1) {
2280 if(from - 0 < seq_length-1 - to) {
2300report << from + 1 <<
"-"<< to + 1 <<
_(
"\n");
2317 if(searchstr.empty()) {
2323 if(s.Find(searchstr) != wxNOT_FOUND) {
2329 if(s.Find(searchstr) != wxNOT_FOUND) {
2335 if(s.Find(searchstr) != wxNOT_FOUND) {
2353SetItemState(
row, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
2358wxMessageDialog
msg(
NULL,
_(
"Text not found!"),
_(
"Info") );
2366 boolbFound =
false;
2375 autoinitialSearchRow =
row;
2378bFound =
x_Find(hitloc, searchstr);
2387initialSearchRow =
row;
2400 boolbFound =
false;
2409 autoinitialSearchRow =
row;
2412bFound =
x_Find(hitloc, searchstr);
2421initialSearchRow =
row;
2434TVecscreenSummaryByLocation::const_iterator cit;
2437 if(!cit->m_Selected) {
2457 for(
intii = 0; ii < matches.size(); ++ii) {
2458 stringmatchstr = matches[ii].m_match_type;
2462 if(matchstr ==
"strong") {
2466 if(matchstr ==
"moderate") {
2470 if(matchstr ==
"weak") {
2474 if(matchstr ==
"suspect") {
2479 if(current < matchtype) {
2480matchtype = current;
2487 constvector<SRangeMatch>& y)
const 2490x_FindStrongestMatchType(x, xMatchType);
2493x_FindStrongestMatchType(y, yMatchType);
2495 returnxMatchType - yMatchType;
2557TVecscreenSummaryByLocation::const_iterator cit;
2570SetItem(
row, 0, wxEmptyString );
2583SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
2584SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER);
2585SetColumnWidth(2, wxLIST_AUTOSIZE);
2586SetColumnWidth(3, wxLIST_AUTOSIZE);
2592TVecscreenSummaryByLocation::iterator it;
2607TVecscreenSummaryByLocation::iterator it;
2614 for(
intii = 0; ii < hitloc.
m_matches.size(); ++ii)
2632TVecscreenSummaryByLocation::iterator it;
2647TVecscreenSummaryByLocation::iterator it;
2667 intcol =
event.GetColumn();
2702 if( GetWindowStyle() & wxLC_REPORT )
2704 autoselected_row =
event.GetIndex();
2706TVecscreenSummaryByLocation::const_iterator cit;
2710 if(
count== selected_row)
2728 autoselected_row =
event.GetIndex();
2749 constwxWindowID
id,
2751 constwxSize&
size,
2766 constwxSize &
size,
2769wxListCtrl::Create(parent,
id, pos,
size, style);
2779col0.SetText(
_(
"Seqid") );
2781InsertColumn( 0, col0 );
2785 col1.SetText(
_(
"Range") );
2786 col1.SetWidth(220);
2787InsertColumn( 1,
col1);
2794 constvector<SRangeMatch>& matches)
2800 for(
intii = 0; ii < matches.size(); ++ii)
2810SetItem( ii, 0,
_( fastaseqid ) );
2813stringstream ssRange;
2816SetItem( ii, 1,
_( ssRange.str() ) );
2825 if( GetWindowStyle() & wxLC_REPORT )
2828 info.m_itemId =
event.GetIndex();
2849 Create(parent,
id, caption, pos,
size, style);
2855SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
2856wxDialog::Create( parent,
id, caption, pos,
size, style );
2861GetSizer()->SetSizeHints(
this);
2880wxBoxSizer* dialogSizer =
newwxBoxSizer(wxVERTICAL);
2881this->SetSizer(dialogSizer);
2885m_textHeader =
newwxStaticText(
this,
2891dialogSizer->Add(m_textHeader, 0, wxEXPAND|wxALL, 5);
2895m_textList =
newwxTextCtrl(
this,
2900wxTE_MULTILINE|wxTE_READONLY );
2901dialogSizer->Add(m_textList, 1, wxEXPAND|wxALL, 5);
2905m_textFooter =
newwxStaticText(
this,
2911dialogSizer->Add(m_textFooter, 0, wxEXPAND|wxALL, 5);
2915wxBoxSizer* buttonSizer =
newwxBoxSizer(wxHORIZONTAL);
2916wxButton* okButton =
newwxButton(
this, wxID_OK,
_(
"Ok"), wxDefaultPosition, wxDefaultSize, 0 );
2917wxButton* cancelButton =
newwxButton(
this, wxID_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
2918buttonSizer->Add(okButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2919buttonSizer->Add(cancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
2920dialogSizer->Add(buttonSizer, 0, wxEXPAND|wxALL, 5);
2926m_textHeader->SetLabel(header);
2932m_textList->SetValue(list);
2938m_textFooter->SetLabel(footer);
2963wxPanel::Create( parent,
id, pos,
size, style );
2968GetSizer()->SetSizeHints(
this);
2987wxBoxSizer* panelSizer =
newwxBoxSizer(wxVERTICAL);
2988this->SetSizer(panelSizer);
2992m_textReport =
newwxTextCtrl(
this,
2998panelSizer->Add(m_textReport, 1, wxEXPAND|wxALL, 5);
3004m_textReport->SetValue(report);
3023 Create(parent,
id, caption, pos,
size, style);
3029wxDialog::Create( parent,
id, caption, pos,
size, style );
3034GetSizer()->SetSizeHints(
this);
3053wxBoxSizer* dialogSizer =
newwxBoxSizer(wxVERTICAL);
3054this->SetSizer(dialogSizer);
3057dialogSizer->Add(m_panel, 1, wxEXPAND|wxALL, 5);
3063m_panel->SetReport(report);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
User-defined methods of the data storage class.
void Set(T *object)
Initialize with an existing object.
TSeqPos GetLength(void) const
static CRef< objects::CSeqdesc > s_GetCitSubForTrimmedSequence(const objects::CBioseq_Handle &bsh, string &message, CConstRef< objects::CSeqdesc > &changedSeqdesc, objects::CSeq_entry_Handle &seh)
void SetHeader(const wxString &header)
~CListReportDlg()
Destructor.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &caption=_("Report Dialog"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CListReportDlg()
Constructors.
void CreateControls()
Creates the controls and sizers.
void Init()
Initialises member variables.
void SetList(const wxString &list)
void SetFooter(const wxString &footer)
bool Create(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_ICON)
void OnSelected(wxListEvent &event)
bool UpdateData(const string &fastaseqid, const vector< SRangeMatch > &matches)
int x_Compare(const CUVHitLoc &x, const CUVHitLoc &y) const
void x_FindStrongestMatchType(const vector< SRangeMatch > &matches, SRangeMatch::EMatchType &matchtype) const
int x_CompareMatches(const vector< SRangeMatch > &x, const vector< SRangeMatch > &y) const
bool operator()(const CUVHitLoc &x, const CUVHitLoc &y) const
vector< SRangeMatch > m_matches
@ eSortInternal5Prime3Prime
bool x_Find(const CUVHitLoc &hitloc, const wxString &searchstr)
void x_DisplaySearchResult(bool bFound, long row)
void x_InsertMatches(TVecscreenSummaryByLocation &seqidSummaryByLocation, const vector< SRangeMatch > &sorted_matches, const CSeq_id *seqid, const SVecscreenResult &vecres) const
vector< CUVHitLoc > TVecscreenSummaryByLocation
bool UpdateData(const TVecscreenSummaryBySeqid &vecscreen_summary)
TVecscreenSummaryBySeqid m_seqidSummaryBySeqid
void Sort(ESortOption eSortOption, bool bAscending)
const TVecscreenSummaryBySeqid & GetSelectedVecscreenSummaryBySeqid()
void x_ConvertSelectedToBySeqid(const TVecscreenSummaryByLocation &seqidSummaryByLocation, TVecscreenSummaryBySeqid &seqidSummaryBySeqid) const
bool Create(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_ICON)
void OnSelected(wxListEvent &event)
void SetAlignGraphicView(wxHtmlWindow *view)
void OnColClick(wxListEvent &event)
void SetRangeView(CLocationsListCtrl *view)
CLocationsListCtrl * m_RangeView
wxString x_GetSeqid(const CUVHitLoc &hitloc)
void OnChecked(wxListEvent &event)
void GetSelectedLocations(wxString &report, CVectorTrimPanel::EInternalTrimType eInternalTrimType)
wxListItemAttr m_listItemAttr
void SelectStrongModerate()
wxString x_GetHitLocation(const CUVHitLoc &hitloc)
wxHtmlWindow * m_AlignView
bool x_GetSelected(const CUVHitLoc &hitloc)
void FindReverse(wxString searchstr)
TVecscreenSummaryByLocation m_seqidSummaryByLocation
void GetReport(wxString &report)
bool x_IsValidRow(long row)
wxString x_GetMatchType(const CUVHitLoc &hitloc)
void x_ConvertAllToByLocation(const TVecscreenSummaryBySeqid &vecscreen_summary, TVecscreenSummaryByLocation &seqidSummaryByLocation) const
void FindForward(wxString searchstr)
Helper functor to compare cuts during sorting.
bool operator()(const SRangeMatch &a1, const SRangeMatch &a2)
CRangeCmp(ESortOrder sortorder=eAscending)
namespace ncbi::objects::
static TSeqPos Pack(CSeq_data *in_seq, TSeqPos uLength=ncbi::numeric_limits< TSeqPos >::max())
void SetReport(const wxString &report)
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBORDER_SIMPLE)
Creation.
~CVecscreenReportPanel()
Destructor.
CVecscreenReportPanel()
Constructors.
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("VecScreen Report"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Creation.
void CreateControls()
Creates the controls and sizers.
void SetReport(const wxString &report)
void Init()
Initialises member variables.
~CVecscreenReport()
Destructor.
CVecscreenReport()
Constructors.
void Run(objects::CSeq_entry_Handle seh, wxGauge &progress)
static bool IsDbAvailable()
const TVecscreenSummaryBySeqid & GetVecscreenSummaryBySeqid() const
void OnTrimSelected(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=ID_CVECTORTRIMPANEL, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Creation.
void OnDismiss(wxCommandEvent &event)
CLocationsListCtrl * m_listLocations
wxButton * m_buttonSelectStrongModerate
void x_RetranslateCDS(CScope &scope, CRef< CCmdComposite > command, CRef< CSeq_feat > cds)
wxHtmlWindow * m_viewAlignGraphic
void x_SeqLocDelete(CRef< CSeq_loc > loc, TSeqPos from, TSeqPos to, const CSeq_id *seqid, bool &bCompleteCut, bool &bTrimmed)
void OnUnselectInternal(wxCommandEvent &event)
objects::CSeq_entry_Handle m_TopSeqEntry
void OnFindReverse(wxCommandEvent &event)
CRange< TSeqPos > x_GetRetainedRange(const TCuts &sorted_cuts, TSeqPos seqLength)
void x_TrimSeqGraphs(CRef< CCmdComposite > command, const TVecscreenSummaryBySeqid &trimOnly)
void OnSort(wxCommandEvent &event)
void Init()
Initialises member variables.
bool x_FindSegment(const CDense_seg &denseg, CDense_seg::TDim row, TSeqPos pos, CDense_seg::TNumseg &seg, TSeqPos &seg_start) const
wxGauge * m_gaugeProgressBar
void x_TrimSeqGraphData(CRef< CSeq_graph > new_graph, const CMappedGraph &orig_graph, const TCuts &sorted_cuts, const CSeq_id *seqid)
void x_TrimFeatureLocations(CRef< CSeq_feat > feat, const TCuts &sorted_cuts, const CSeq_id *seqid, bool &bFeatureDeleted, bool &bFeatureTrimmed, bool &bProdDeleted, bool &bProdTrimmed)
~CVectorTrimPanel()
Destructor.
void x_CutDensegSegment(CRef< CSeq_align > align, CDense_seg::TDim row, TSeqPos pos)
void x_AdjustDensegAlignment(CRef< CSeq_align > align, CDense_seg::TDim row, const TCuts &sorted_cuts)
wxButton * m_buttonUnselectInternal
wxButton * m_buttonUnselectAll
void x_GetSortedCuts(TCuts &sorted_cuts, const CSeq_id *seqid)
wxButton * m_buttonMakeReport
void CreateControls()
Creates the controls and sizers.
wxButton * m_buttonFindForward
static bool ShowToolTips()
Should we show tooltips?
wxRadioBox * m_radioBoxInternalTrimOptions
void OnSelectStrongModerate(wxCommandEvent &event)
void x_AdjustInternalCutLocations(TCuts &cuts, TSeqPos seq_length)
void OnUnselectAll(wxCommandEvent &event)
wxButton * m_buttonSelectAll
void x_MergeCuts(TCuts &sorted_cuts)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void DisplaySummaryBySeqid(const TVecscreenSummaryBySeqid &vecscreen_summary)
wxButton * m_buttonDismiss
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void x_FindCompleteDeletions(const TVecscreenSummaryBySeqid &seqidSummary, TVecscreenSummaryBySeqid &completeDeletions, TVecscreenSummaryBySeqid &trimOnly)
CVectorScreen m_vectorscreen
void OnSelectAll(wxCommandEvent &event)
void x_SetSeqData(const CBioseq_Handle &bsh, CRef< objects::CSeq_inst > inst, const TCuts &sorted_cuts)
void x_DeleteSelected(CRef< CCmdComposite > command, const CSeq_id *seqid)
void OnFindForward(wxCommandEvent &event)
void x_TrimAlignments(CRef< CCmdComposite > command, const TVecscreenSummaryBySeqid &trimOnly)
wxButton * m_buttonRunVecscreen
void OnRunVecscreen(wxCommandEvent &event)
void x_SeqIntervalDelete(CRef< CSeq_interval > interval, TSeqPos cut_from, TSeqPos cut_to, const CSeq_id *seqid, bool &bCompleteCut, bool &bTrimmed)
ICommandProccessor * m_CmdProcessor
void x_UpdateSeqGraphLoc(CRef< CSeq_graph > new_graph, const TCuts &sorted_cuts, const CSeq_id *seqid)
void OnMakeReport(wxCommandEvent &event)
bool x_IsCompleteCut(const TCuts &sorted_cuts, TSeqPos seq_length)
vector< SRangeMatch > TCuts
wxWindow * m_pParentWindow
CMatchesListCtrl * m_listMatches
void x_GetTrimCoordinates(const TCuts &sorted_cuts, const CSeq_id *seqid, TSeqPos &trim_start, TSeqPos &trim_stop)
wxRadioBox * m_radioBoxSort
CVectorTrimPanel()
Constructors.
virtual bool TransferDataToWindow()
wxButton * m_buttonTrimSelected
virtual bool TransferDataFromWindow()
wxBoxSizer * m_sizerVectorResults
wxButton * m_buttonFindReverse
Undo/Redo interface for editing operations.
virtual void Execute(IEditCommand *command, wxWindow *window=0)=0
container_type::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
bool Create(wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_REPORT, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListCtrlNameStr)
bool IsChecked(long item) const
void SetChecked(long item, bool checked)
static const char si[8][64]
static const char location[]
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.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
const TPrim & Get(void) const
const string AsFastaString(void) const
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
void SetPacked_int(TPacked_int &v)
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
TSeqPos GetStop(ESeqLocExtremes ext) const
static CRef< CBioseq > TranslateToProtein(const CSeq_feat &cds, CScope &scope)
CBioseq_Handle AddBioseq(CBioseq &bioseq, TPriority pri=kPriority_Default, EExist action=eExist_Throw)
Add bioseq, return bioseq handle.
void RemoveBioseq(const CBioseq_Handle &seq)
Revoke Bioseq previously added using AddBioseq().
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool IsNucleotide(void) const
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
TClass GetClass(void) const
CBioseq_set_Handle GetParentBioseq_set(void) const
Return a handle for the parent Bioseq-set, or null handle.
bool CanGetClass(void) const
const CSeqFeatData & GetData(void) const
TSeqPos GetBioseqLength(void) const
CSeq_entry_Handle GetSeq_entry_Handle(void) const
Get parent Seq-entry handle.
bool IsSetProduct(void) const
void SetInst(TInst &v) const
bool IsProtein(void) const
CBioseq_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CSeq_entry_Handle GetParentEntry(void) const
Return a handle for the parent seq-entry of the bioseq.
CScope & GetScope(void) const
Get scope this handle belongs to.
CScope & GetScope(void) const
Get scope this handle belongs to.
const CSeqMap & GetSeqMap(void) const
Get sequence map.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
bool IsSetData(void) const
const TInst & GetInst(void) const
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
TSeqPos GetEndPosition(void) const
return end position of current segment in sequence (exclusive)
const string & GetTitle(void) const
bool IsSetTitle(void) const
const CSeq_align & GetOriginalSeq_align(void) const
Get original alignment.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
const CSeq_loc & GetProduct(void) const
CSeqMap::ESegmentType GetType(void) const
bool IsUnknownLength(void) const
return true if current segment is a gap of unknown length
const CSeq_graph & GetOriginalGraph(void) const
Get original graph with unmapped location/product.
const CSeq_loc & GetLoc(void) const
CSeq_align_Handle GetSeq_align_Handle(void) const
Get original alignment handle.
TSeqPos GetPosition(void) const
return position of current segment in sequence
TSeqPos GetLength(void) const
return length of current segment
CConstRef< CSeq_literal > GetRefGapLiteral(void) const
return CSeq_literal with gap data, or null if either the segment is not a gap, or an unspecified gap
const CSeq_graph::C_Graph & GetGraph(void) const
CSeq_graph_Handle GetSeq_graph_Handle(void) const
Get original graph handle.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
CSeqMap_CI ResolvedRangeIterator(CScope *scope, TSeqPos from, TSeqPos length, ENa_strand strand=eNa_strand_plus, size_t maxResolve=size_t(-1), TFlags flags=fDefaultFlags) const
Iterate segments in the range with specified strand coordinates.
@ eSeqData
real sequence data
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
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 string & ToLower(string &str)
Convert string to lower case â string& version.
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
bool CanGetDim(void) const
Check if it is safe to call GetDim method.
const TDenseg & GetDenseg(void) const
Get the variant data.
TLens & SetLens(void)
Assign a value to Lens 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.
const TStarts & GetStarts(void) const
Get the Starts member data.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
const TLens & GetLens(void) const
Get the Lens member data.
bool CanGetNumseg(void) const
Check if it is safe to call GetNumseg method.
void SetDim(TDim value)
Assign a value to Dim data member.
bool CanGetIds(void) const
Check if it is safe to call GetIds method.
vector< CRef< CSeq_id > > TIds
bool CanGetSegs(void) const
Check if it is safe to call GetSegs method.
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.
void SetNumseg(TNumseg value)
Assign a value to Numseg data member.
const TIds & GetIds(void) const
Get the Ids member data.
bool CanGetStarts(void) const
Check if it is safe to call GetStarts method.
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 CanGetLens(void) const
Check if it is safe to call GetLens method.
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
E_Choice Which(void) const
Which variant is currently selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetProduct(TProduct &value)
Assign a value to Product data member.
const TLocation & GetLocation(void) const
Get the Location member data.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
bool CanGetLocation(void) const
Check if it is safe to call GetLocation method.
const TProduct & GetProduct(void) const
Get the Product member data.
bool CanGetProduct(void) const
Check if it is safe to call GetProduct method.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
void SetTo(TTo value)
Assign a value to To data member.
TFrom GetFrom(void) const
Get the From member data.
bool CanGetTo(void) const
Check if it is safe to call GetTo method.
E_Choice Which(void) const
Which variant is currently selected.
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
bool IsInt(void) const
Check if variant Int is selected.
const TInt & GetInt(void) const
Get the variant data.
const TMix & GetMix(void) const
Get the variant data.
const TPacked_int & GetPacked_int(void) const
Get the variant data.
bool CanGetFrom(void) const
Check if it is safe to call GetFrom method.
void SetMin(TMin value)
Assign a value to Min data member.
TByte & SetByte(void)
Select the variant.
void SetNumval(TNumval value)
Assign a value to Numval data member.
TAxis GetAxis(void) const
Get the Axis member data.
TValues & SetValues(void)
Assign a value to Values data member.
TMax GetMax(void) const
Get the Max member data.
const TByte & GetByte(void) const
Get the variant data.
void SetGraph(TGraph &value)
Assign a value to Graph data member.
bool CanGetLoc(void) const
Check if it is safe to call GetLoc method.
void SetMax(TMax value)
Assign a value to Max data member.
TMin GetMin(void) const
Get the Min member data.
const TValues & GetValues(void) const
Get the Values member data.
E_Choice Which(void) const
Which variant is currently selected.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
void SetAxis(TAxis value)
Assign a value to Axis data member.
void Reset(void)
Reset the whole object.
@ eClass_nuc_prot
nuc acid and coded proteins
const TIupacaa & GetIupacaa(void) const
Get the variant data.
bool IsSetSeq_data(void) const
the sequence Check if a value has been assigned to Seq_data data member.
bool IsNcbieaa(void) const
Check if variant Ncbieaa is selected.
const TInst & GetInst(void) const
Get the Inst member data.
bool IsIupacaa(void) const
Check if variant Iupacaa is selected.
void SetExt(TExt &value)
Assign a value to Ext data member.
TIupacna & SetIupacna(void)
Select the variant.
TLength GetLength(void) const
Get the Length member data.
const TNcbieaa & GetNcbieaa(void) const
Get the variant data.
void SetRepr(TRepr value)
Assign a value to Repr data member.
void SetLength(TLength value)
Assign a value to Length data member.
void SetSeq_data(TSeq_data &value)
Assign a value to Seq_data data member.
void ResetExt(void)
Reset Ext data member.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
void ResetSeq_data(void)
Reset Seq_data data member.
@ eRepr_raw
continuous sequence
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
CRange< TSeqPos > m_range
vector< SRangeMatch > m_arrRangeMatch
@ MYID_BUTTON_RUN_VECSCREEN
@ MYID_CHECKBOX_VIEWGRAPHIC
@ MYID_BUTTON_SELECT_STRONG_MODERATE
@ MYID_BUTTON_FIND_REVERSE
@ MYID_RADIOBOX_INTERNAL_TRIM_OPTIONS
@ MYID_BUTTON_UNSELECT_INTERNAL
@ MYID_BUTTON_UNSELECT_ALL
@ MYID_BUTTON_MAKE_REPORT
@ MYID_BUTTON_TRIM_SELECTED
@ MYID_BUTTON_FIND_FORWARD
@ MYID_LISTCTRL_LOCATIONS
void ShowDebugMessage(const wxString &message)
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