wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
72 Create(parent,
id, caption, pos,
size, style);
78SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
84GetSizer()->SetSizeHints(
this);
109 ITERATE(vector<const CFeatListItem *>, ft_it, feat_list) {
112 intfeat_type = item.
GetType();
114 m_Types[pair<int,int>(feat_type,feat_subtype)] = desc;
115 if(existing.
find(desc) == existing.
end())
137wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxVERTICAL);
138itemDialog1->SetSizer(itemBoxSizer2);
140wxBoxSizer* itemBoxSizer3 =
newwxBoxSizer(wxHORIZONTAL);
141itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
144itemBoxSizer3->Add(
m_ListCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
146 m_ListCtrl->InsertColumn(0,
" Feature",wxLIST_FORMAT_LEFT,237);
151wxBoxSizer* itemBoxSizer5 =
newwxBoxSizer(wxHORIZONTAL);
152itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
154wxBoxSizer* itemBoxSizer6 =
newwxBoxSizer(wxVERTICAL);
155itemBoxSizer5->Add(itemBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
157wxStaticBox* itemStaticBoxSizer7Static =
newwxStaticBox(itemDialog1,
wxID_ANY,
_(
"Remove Gene Xrefs that are"));
158wxStaticBoxSizer* itemStaticBoxSizer7 =
newwxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
159itemBoxSizer6->Add(itemStaticBoxSizer7, 0, wxALIGN_LEFT|wxALL, 5);
163itemStaticBoxSizer7->Add(
m_Suppressing, 0, wxALIGN_LEFT|wxALL, 5);
171itemStaticBoxSizer7->Add(
m_Unnecessary, 0, wxALIGN_LEFT|wxALL, 5);
173wxStaticBox* itemStaticBoxSizer17Static =
newwxStaticBox(itemDialog1,
wxID_ANY, wxEmptyString);
174wxStaticBoxSizer* itemStaticBoxSizer17 =
newwxStaticBoxSizer(itemStaticBoxSizer17Static, wxHORIZONTAL);
175itemBoxSizer2->Add(itemStaticBoxSizer17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
177wxStaticText* itemStaticText4 =
newwxStaticText( itemDialog1, wxID_STATIC,
_(
"Where feature text"), wxDefaultPosition, wxDefaultSize, 0 );
178itemStaticBoxSizer17->Add(itemStaticText4, 0, wxALIGN_TOP|wxALL, 5);
186itemBoxSizer2->Add(OkCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
223 if(!
f.IsSetXref()) {
226 boolany_removed =
false;
227CSeq_feat::TXref::iterator xit =
f.SetXref().begin();
228 while(xit !=
f.SetXref().end()) {
229 if((*xit)->IsSetData() && (*xit)->GetData().IsGene() &&
230(*xit)->GetData().GetGene().IsSuppressed()) {
231xit =
f.SetXref().erase(xit);
238 if(
f.IsSetXref() &&
f.GetXref().empty()) {
255list<string> non_refseq;
259refseq.push_back(*it);
261non_refseq.push_back(*it);
270 if(non_refseq.size()) {
271 if( !accs.empty() ) {
277 if( !accs.empty() ) {
285 if( !lines.empty() ) {
286 ITERATE(list<string>, iter, lines) {
287 if(iter != lines.begin()) {
288ostream <<
" "<< *iter << endl;
290ostream << *iter << endl;
303list< CConstRef<CUser_object> > objs;
310objs.push_back(sub_o);
336ostream <<
"Model Generation Method: ";
339method =
f->GetData().GetStr();
342ostream <<
"<unknown>";
349 if(method ==
"Chainer"|| method ==
"Gnomon") {
359 if( !core.empty() ) {
365 if( !core.empty() ) {
366s =
"Model Based On: ";
368ostream << s << endl;
390stringstream& ostream,
constobjects::CSeq_feat& feat, objects::CScope& scope)
396ostream <<
text<< endl;
399 TSeqRangerange = feat.GetLocation().GetTotalRange();
400ostream <<
"Total Range: ";
417ostream <<
"Total Length: " 421ostream <<
"Processed Length: " 426 if(feat.IsSetProduct()) {
431ostream <<
"Product Length: " 451 CFeat_CIfeat_it(scope, feat.GetLocation(), sel);
452 for(; feat_it ; ++feat_it) {
458string::size_type pos = s.find_first_not_of(
" \n\r\t");
459 if( pos != string::npos ){
463string::size_type lpos = string::npos;
466lpos = s.find_first_of(
"\n\r", pos );
468 if( lpos == string::npos ){
469 text= s.substr( pos );
471 text= s.substr( pos, lpos - pos );
473ostream <<
text<< endl;
475}
while( lpos != string::npos );
495item =
m_ListCtrl->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
496 if( item == -1 )
break;
501 boolfilter =
false;
506 else if(subtypeAnyFlag)
508 int type= feat->GetOriginalFeature().GetData().Which();
510 stringdesc =
m_Types[pair<int,int>(
type,subtype)];
514 else if(feat->GetOriginalFeature().CanGetData())
516 int type= feat->GetOriginalFeature().GetData().Which();
517 intsubtype = feat->GetOriginalFeature().GetData().GetSubtype();
518 stringdesc =
m_Types[pair<int,int>(
type,subtype)];
531go = constraint->DoesTextMatch(
str.str());
539 boolmodified =
false;
567 for(
CFeat_CIfeat_ci(seh); feat_ci; ++feat_ci)
572 boolmodified =
false;
575 if((*xref)->IsSetData() && (*xref)->GetData().IsGene())
595 for(
CFeat_CIfeat_ci(seh); feat_ci; ++feat_ci)
612 for(
CFeat_CIfeat_ci(seh); feat_ci; ++feat_ci)
629 for(
CFeat_CIfeat_ci(seh); feat_ci; ++feat_ci)
636 if(parent.
IsSeq())
654 for(
CFeat_CIfeat_ci(seh); feat_ci; ++feat_ci)
661 if(parent.
IsSeq())
objects::CSeq_entry_Handle m_TopSeqEntry
bool Create(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE, const wxString &name=wxFrameNameStr)
bool GetTopLevelSeqEntryAndProcessor()
static bool RemoveOrphanLocus_tagGeneXrefs(CSeq_feat &f, CBioseq_Handle bsh)
Removes orphaned locus_tag Gene-xrefs.
static bool RemoveOrphanLocusGeneXrefs(CSeq_feat &f, CBioseq_Handle bsh)
Removes orphaned locus Gene-xrefs.
static bool RemoveUnnecessaryGeneXrefs(CSeq_feat &f, CScope &scope)
Removes unnecessary Gene-xrefs.
static bool RemoveNonsuppressingGeneXrefs(CSeq_feat &f)
Removes non-suppressing Gene-xrefs.
CFeatListItem - basic configuration data for one "feature" type.
string GetDescription() const
CFlatFileConfig & SetNeverTranslateCDS(bool val=true)
static string GetSeqFeatText(const CMappedFeat &feat, CScope &scope, const CFlatFileConfig &cfg, CRef< feature::CFeatTree > ftree=null)
wxCheckBox * m_Suppressing
CRemoveGeneXrefs()
Constructors.
static CRef< CCmdComposite > RemoveNonsuppressing(CSeq_entry_Handle seh)
wxCheckBox * m_Nonsuppressing
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
~CRemoveGeneXrefs()
Destructor.
map< pair< int, int >, string > m_Types
static bool ShowToolTips()
Should we show tooltips?
vector< bool > m_SubtypeAnyFlag
CStringConstraintPanel * m_StringConstraintPanel
static CRef< CCmdComposite > RemoveOrphanLocus_tag(CSeq_entry_Handle seh)
static CRef< CCmdComposite > RemoveAll(CSeq_entry_Handle seh)
void Init()
Initialises member variables.
static CRef< CCmdComposite > RemoveUnnecessary(CSeq_entry_Handle seh)
virtual CRef< CCmdComposite > GetCommand()
bool Create(wxWindow *parent, wxWindowID id=14000, const wxString &caption=_("Remove Gene Xrefs"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
static CRef< CCmdComposite > RemoveOrphanLocus(CSeq_entry_Handle seh)
wxCheckBox * m_Unnecessary
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
void CreateControls()
Creates the controls and sizers.
bool RemoveSuppressingGeneXrefs(CSeq_feat &f)
vector< string > m_Descriptions
namespace ncbi::objects::
void SetStringSelection(const wxString &str)
CRef< edit::CStringConstraint > GetStringConstraint()
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
IWorkbench is the central interface in the application framework.
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
static const char * str(char *buf, int n)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
static objects::SAnnotSelector GetAnnotSelector(TAnnotFlags flags=0)
request an annotation selector for a given type
vector< const objects::CFeatListItem * > GetSortedFeatList(objects::CSeq_entry_Handle seh, size_t max=numeric_limits< size_t >::max())
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)
Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...
EAccessionInfo
For IdentifyAccession (below)
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
ENa_strand GetStrand(const CSeq_loc &loc, CScope *scope=0)
Returns eNa_strand_unknown if multiple Bioseqs in loc Returns eNa_strand_other if multiple strands in...
TSeqPos GetBioseqLength(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
SAnnotSelector & IncludeFeatSubtype(TFeatSubtype subtype)
Include feature subtype in the search.
const CSeq_feat & GetOriginalFeature(void) const
Get original feature with unmapped location/product.
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
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 void Wrap(const string &str, SIZE_TYPE width, IWrapDest &dest, TWrapFlags flags, const string *prefix, const string *prefix1)
@ fWithCommas
Use commas as thousands separator.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
bool IsSetType(void) const
type of object within class Check if a value has been assigned to Type data member.
const TData & GetData(void) const
Get the Data member data.
vector< CRef< CUser_field > > TFields
const TStr & GetStr(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TObject & GetObject(void) const
Get the variant data.
const TLabel & GetLabel(void) const
Get the Label member data.
const TType & GetType(void) const
Get the Type member data.
vector< CStringUTF8 > TStrs
vector< CRef< CUser_field > > TData
const TExts & GetExts(void) const
Get the Exts member data.
bool IsSetExt(void) const
user defined structure extension Check if a value has been assigned to Ext data member.
bool IsSetXref(void) const
cite other relevant features Check if a value has been assigned to Xref data member.
bool IsSetExts(void) const
set of extensions; will replace 'ext' field Check if a value has been assigned to Exts data member.
const TXref & GetXref(void) const
Get the Xref member data.
void ResetXref(void)
Reset Xref data member.
const TExt & GetExt(void) const
Get the Ext member data.
@ e_Other
for historical reasons, 'other' = 'refseq'
@ eMol_na
just a nucleic acid
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
static void s_Render_SeqFeat(stringstream &ostream, const objects::CSeq_feat &feat, objects::CScope &scope)
USING_SCOPE(ncbi::objects)
static void s_RenderAccList(stringstream &ostream, const CUser_field::TData::TStrs &item_data, const string &title)
static void s_Render_Feat_Evidence(stringstream &ostream, const CSeq_feat &feat, CScope &)
#define ID_SUPPRESSING_CHECKBOX
#define ID_UNNECESSARY_CHECKBOX
#define ID_REMOVE_GENE_XREFS_LISTCTRL
#define ID_REMOVE_GENE_XREFS_OKCANCEL
#define ID_NONSUPPRESSING_CHECKBOX
Utility macros and typedefs for exploring NCBI objects from seqfeat.asn.
#define ERASE_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
ERASE_SEQFEATXREF_ON_SEQFEAT.
#define EDIT_EACH_SEQFEATXREF_ON_SEQFEAT(Itr, Var)
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